From f7be4b4ec0935945f34cbfef9bd12aa857cb49f5 Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Sun, 13 Jun 2021 15:41:34 -0400 Subject: [PATCH 1/9] Merge pull request #8261 from tinyspeck/am_vreplication_log [workflow] Add vreplication_log data to workflow protos, and `VtctldServer.GetWorkflows` method Signed-off-by: Andrew Mason --- go/vt/proto/vtctldata/vtctldata.pb.go | 462 +- go/vt/vtctl/workflow/server.go | 151 + go/vt/vtctl/workflow/vexec/query_plan.go | 114 +- go/vt/vtctl/workflow/vexec/query_plan_test.go | 18 +- go/vt/vtctl/workflow/vexec/query_planner.go | 148 +- .../workflow/vexec/query_planner_test.go | 145 +- go/vt/vtctl/workflow/vexec/vexec.go | 41 + proto/vtctldata.proto | 21 + web/vtadmin/src/proto/vtadmin.d.ts | 30472 +------ web/vtadmin/src/proto/vtadmin.js | 75646 +--------------- 10 files changed, 3796 insertions(+), 103422 deletions(-) diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 7f82e4ac495..022eb4f1b12 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -569,9 +569,19 @@ type Workflow_Stream struct { TimeUpdated *vttime.Time `protobuf:"bytes,10,opt,name=time_updated,json=timeUpdated,proto3" json:"time_updated,omitempty"` Message string `protobuf:"bytes,11,opt,name=message,proto3" json:"message,omitempty"` CopyStates []*Workflow_Stream_CopyState `protobuf:"bytes,12,rep,name=copy_states,json=copyStates,proto3" json:"copy_states,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Logs []*Workflow_Stream_Log `protobuf:"bytes,13,rep,name=logs,proto3" json:"logs,omitempty"` + // LogFetchError is set if we fail to fetch some logs for this stream. We + // will never fail to fetch workflows because we cannot fetch the logs, but + // we will still forward log-fetch errors to the caller, should that be + // relevant to the context in which they are fetching workflows. + // + // Note that this field being set does not necessarily mean that Logs is nil; + // if there are N logs that exist for the stream, and we fail to fetch the + // ith log, we will still return logs in [0, i) + (i, N]. + LogFetchError string `protobuf:"bytes,14,opt,name=log_fetch_error,json=logFetchError,proto3" json:"log_fetch_error,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Workflow_Stream) Reset() { *m = Workflow_Stream{} } @@ -683,6 +693,20 @@ func (m *Workflow_Stream) GetCopyStates() []*Workflow_Stream_CopyState { return nil } +func (m *Workflow_Stream) GetLogs() []*Workflow_Stream_Log { + if m != nil { + return m.Logs + } + return nil +} + +func (m *Workflow_Stream) GetLogFetchError() string { + if m != nil { + return m.LogFetchError + } + return "" +} + type Workflow_Stream_CopyState struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` LastPk string `protobuf:"bytes,2,opt,name=last_pk,json=lastPk,proto3" json:"last_pk,omitempty"` @@ -730,6 +754,101 @@ func (m *Workflow_Stream_CopyState) GetLastPk() string { return "" } +type Workflow_Stream_Log struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + StreamId int64 `protobuf:"varint,2,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + CreatedAt *vttime.Time `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *vttime.Time `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Message string `protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"` + Count int64 `protobuf:"varint,8,opt,name=count,proto3" json:"count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Workflow_Stream_Log) Reset() { *m = Workflow_Stream_Log{} } +func (m *Workflow_Stream_Log) String() string { return proto.CompactTextString(m) } +func (*Workflow_Stream_Log) ProtoMessage() {} +func (*Workflow_Stream_Log) Descriptor() ([]byte, []int) { + return fileDescriptor_f41247b323a1ab2e, []int{6, 3, 1} +} + +func (m *Workflow_Stream_Log) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Workflow_Stream_Log.Unmarshal(m, b) +} +func (m *Workflow_Stream_Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Workflow_Stream_Log.Marshal(b, m, deterministic) +} +func (m *Workflow_Stream_Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Workflow_Stream_Log.Merge(m, src) +} +func (m *Workflow_Stream_Log) XXX_Size() int { + return xxx_messageInfo_Workflow_Stream_Log.Size(m) +} +func (m *Workflow_Stream_Log) XXX_DiscardUnknown() { + xxx_messageInfo_Workflow_Stream_Log.DiscardUnknown(m) +} + +var xxx_messageInfo_Workflow_Stream_Log proto.InternalMessageInfo + +func (m *Workflow_Stream_Log) GetId() int64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Workflow_Stream_Log) GetStreamId() int64 { + if m != nil { + return m.StreamId + } + return 0 +} + +func (m *Workflow_Stream_Log) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Workflow_Stream_Log) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *Workflow_Stream_Log) GetCreatedAt() *vttime.Time { + if m != nil { + return m.CreatedAt + } + return nil +} + +func (m *Workflow_Stream_Log) GetUpdatedAt() *vttime.Time { + if m != nil { + return m.UpdatedAt + } + return nil +} + +func (m *Workflow_Stream_Log) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *Workflow_Stream_Log) GetCount() int64 { + if m != nil { + return m.Count + } + return 0 +} + type ChangeTabletTypeRequest struct { TabletAlias *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` DbType topodata.TabletType `protobuf:"varint,2,opt,name=db_type,json=dbType,proto3,enum=topodata.TabletType" json:"db_type,omitempty"` @@ -3328,6 +3447,7 @@ func init() { proto.RegisterType((*Workflow_ShardStream)(nil), "vtctldata.Workflow.ShardStream") proto.RegisterType((*Workflow_Stream)(nil), "vtctldata.Workflow.Stream") proto.RegisterType((*Workflow_Stream_CopyState)(nil), "vtctldata.Workflow.Stream.CopyState") + proto.RegisterType((*Workflow_Stream_Log)(nil), "vtctldata.Workflow.Stream.Log") proto.RegisterType((*ChangeTabletTypeRequest)(nil), "vtctldata.ChangeTabletTypeRequest") proto.RegisterType((*ChangeTabletTypeResponse)(nil), "vtctldata.ChangeTabletTypeResponse") proto.RegisterType((*CreateKeyspaceRequest)(nil), "vtctldata.CreateKeyspaceRequest") @@ -3392,168 +3512,176 @@ func init() { func init() { proto.RegisterFile("vtctldata.proto", fileDescriptor_f41247b323a1ab2e) } var fileDescriptor_f41247b323a1ab2e = []byte{ - // 2601 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x19, 0x4d, 0x6f, 0x1b, 0xc7, - 0x15, 0x14, 0x3f, 0x24, 0x3e, 0x52, 0x94, 0x34, 0xa2, 0xa4, 0x35, 0x1b, 0xdb, 0xf2, 0x3a, 0x76, - 0x54, 0x27, 0xa6, 0x6c, 0x25, 0x31, 0x02, 0x27, 0x69, 0x6d, 0xeb, 0xc3, 0x90, 0xe3, 0xa8, 0xea, - 0x52, 0x55, 0xd0, 0x1c, 0xba, 0x1d, 0x91, 0x23, 0x7a, 0xa1, 0xe5, 0xee, 0x66, 0x67, 0x48, 0x89, - 0xe9, 0xa1, 0x97, 0xf6, 0x50, 0xa0, 0x40, 0x7f, 0x40, 0x50, 0xa0, 0xa7, 0xa2, 0xe8, 0xad, 0x97, - 0x00, 0x05, 0x8a, 0x1e, 0x7b, 0xea, 0x1f, 0xe8, 0xbf, 0x29, 0xe6, 0x6b, 0xb9, 0xbb, 0x5c, 0xd2, - 0xb2, 0x9c, 0x13, 0x77, 0xde, 0xbc, 0x37, 0xef, 0xcd, 0xfb, 0x7e, 0x43, 0x58, 0x18, 0xb0, 0x36, - 0x73, 0x3b, 0x98, 0xe1, 0x66, 0x10, 0xfa, 0xcc, 0x47, 0xe5, 0x08, 0xd0, 0x58, 0x3c, 0x71, 0x3c, - 0xd7, 0xef, 0x8e, 0x36, 0x1b, 0xf3, 0xae, 0xdf, 0xed, 0x33, 0xc7, 0x55, 0xcb, 0x5a, 0x6f, 0x48, - 0xbf, 0x71, 0xdb, 0x4c, 0xaf, 0x57, 0x42, 0x12, 0xb8, 0x4e, 0x1b, 0x33, 0xc7, 0xf7, 0x62, 0x54, - 0x6b, 0x0c, 0x9f, 0xb8, 0x84, 0xf5, 0xb0, 0x87, 0xbb, 0x24, 0x8c, 0x6d, 0xd4, 0x98, 0x1f, 0xf8, - 0xf1, 0xe3, 0x07, 0xb4, 0xfd, 0x8a, 0xf4, 0xf4, 0xb2, 0x3a, 0x60, 0xcc, 0xe9, 0x11, 0xb9, 0x32, - 0xbf, 0x82, 0xc6, 0xee, 0x05, 0x69, 0xf7, 0x19, 0x39, 0xe6, 0x12, 0x6e, 0xfb, 0xbd, 0x1e, 0xf6, - 0x3a, 0x16, 0xf9, 0xa6, 0x4f, 0x28, 0x43, 0x08, 0x0a, 0x38, 0xec, 0x52, 0x23, 0xb7, 0x9e, 0xdf, - 0x28, 0x5b, 0xe2, 0x1b, 0xdd, 0x81, 0x1a, 0x6e, 0x73, 0x59, 0x6c, 0x7e, 0x8c, 0xdf, 0x67, 0xc6, - 0xcc, 0x7a, 0x6e, 0x23, 0x6f, 0xcd, 0x4b, 0xe8, 0x91, 0x04, 0x9a, 0xdb, 0xf0, 0xa3, 0xcc, 0x83, - 0x69, 0xe0, 0x7b, 0x94, 0xa0, 0x77, 0xa1, 0x48, 0x06, 0xc4, 0x63, 0x46, 0x6e, 0x3d, 0xb7, 0x51, - 0xd9, 0xaa, 0x35, 0xb5, 0x0e, 0x76, 0x39, 0xd4, 0x92, 0x9b, 0xe6, 0x1f, 0x72, 0x60, 0x1c, 0xf1, - 0x6b, 0x7e, 0x89, 0x19, 0x09, 0x1d, 0xec, 0x3a, 0xdf, 0x92, 0x16, 0x61, 0xcc, 0xf1, 0xba, 0x14, - 0xdd, 0x82, 0x2a, 0xc3, 0x61, 0x97, 0x30, 0x5b, 0x68, 0x42, 0x9c, 0x54, 0xb6, 0x2a, 0x12, 0x26, - 0xa8, 0xd0, 0xfb, 0xb0, 0x44, 0xfd, 0x7e, 0xd8, 0x26, 0x36, 0xb9, 0x08, 0x42, 0x42, 0xa9, 0xe3, - 0x7b, 0x42, 0xdc, 0xb2, 0xb5, 0x28, 0x37, 0x76, 0x23, 0x38, 0xba, 0x0e, 0xd0, 0x0e, 0x09, 0x66, - 0xc4, 0xee, 0x74, 0x5c, 0x23, 0x2f, 0xb0, 0xca, 0x12, 0xb2, 0xd3, 0x71, 0xcd, 0xff, 0xcd, 0xc0, - 0x72, 0x96, 0x18, 0x0d, 0x98, 0x3b, 0xf7, 0xc3, 0xb3, 0x53, 0xd7, 0x3f, 0x57, 0x22, 0x44, 0x6b, - 0xf4, 0x1e, 0x2c, 0x28, 0xfe, 0x67, 0x64, 0x48, 0x03, 0xdc, 0x26, 0x8a, 0x7b, 0x4d, 0x82, 0xbf, - 0x50, 0x50, 0x8e, 0xa8, 0xee, 0x12, 0x21, 0x4a, 0x01, 0x6a, 0x12, 0x1c, 0x21, 0xde, 0x85, 0x05, - 0xca, 0xfc, 0xc0, 0xc6, 0xa7, 0x8c, 0x84, 0x76, 0xdb, 0x0f, 0x86, 0x46, 0x61, 0x3d, 0xb7, 0x31, - 0x67, 0xcd, 0x73, 0xf0, 0x53, 0x0e, 0xdd, 0xf6, 0x83, 0x21, 0x7a, 0x01, 0x35, 0xa1, 0x15, 0x9b, - 0x2a, 0x39, 0x8d, 0xe2, 0x7a, 0x7e, 0xa3, 0xb2, 0x75, 0xbb, 0x39, 0x72, 0xcd, 0x49, 0x9a, 0xb5, - 0xe6, 0x05, 0x69, 0x74, 0x43, 0x04, 0x85, 0x36, 0x71, 0x5d, 0xa3, 0x24, 0x24, 0x12, 0xdf, 0x52, - 0xf9, 0xdc, 0xff, 0x6c, 0x36, 0x0c, 0x08, 0x35, 0x66, 0xb5, 0xf2, 0x39, 0xec, 0x88, 0x83, 0xd0, - 0x8f, 0x61, 0x91, 0x5c, 0x30, 0x12, 0x7a, 0xd8, 0xb5, 0xdb, 0x6e, 0x9f, 0x32, 0x12, 0x1a, 0x73, - 0x02, 0x6d, 0x41, 0xc3, 0xb7, 0x25, 0xd8, 0x3c, 0x80, 0xb9, 0xe8, 0x86, 0x08, 0x0a, 0x1e, 0xee, - 0x69, 0x73, 0x8a, 0x6f, 0xd4, 0x84, 0xb9, 0x84, 0x02, 0x2b, 0x5b, 0xa8, 0x19, 0x79, 0xb9, 0xa6, - 0xb4, 0x22, 0x1c, 0xf3, 0x57, 0x50, 0x6c, 0xbd, 0xc2, 0x61, 0x87, 0x1b, 0x27, 0x22, 0x54, 0xc6, - 0x39, 0x4b, 0x33, 0x9a, 0x89, 0x31, 0xba, 0x03, 0x45, 0xca, 0x09, 0x85, 0xf6, 0x2b, 0x5b, 0x0b, - 0x23, 0x2e, 0xe2, 0x3c, 0x4b, 0xee, 0x9a, 0x7f, 0x2b, 0xc3, 0xdc, 0x57, 0xda, 0xc8, 0x59, 0x02, - 0xff, 0x14, 0x4a, 0xd2, 0xc2, 0x4a, 0xdc, 0xf7, 0x62, 0x6a, 0xd7, 0x84, 0x4d, 0x6b, 0x14, 0xd7, - 0x2f, 0x7d, 0xf9, 0x6b, 0x29, 0x32, 0x7e, 0x80, 0xb4, 0xbc, 0x92, 0xe4, 0xf2, 0x07, 0x48, 0x32, - 0xf4, 0x10, 0x56, 0x7a, 0xf8, 0xc2, 0x1e, 0xd8, 0xb1, 0xec, 0x61, 0xbb, 0xb8, 0x2b, 0xdc, 0x25, - 0x6f, 0xa1, 0x1e, 0xbe, 0x38, 0x8e, 0xd3, 0xe3, 0x2e, 0x7a, 0x01, 0xf3, 0xe2, 0x7a, 0x36, 0x65, - 0x21, 0xc1, 0x3d, 0xed, 0x32, 0x77, 0xb2, 0x58, 0x0b, 0x75, 0xb4, 0x24, 0xde, 0xae, 0xc7, 0xc2, - 0xa1, 0x55, 0xa5, 0x31, 0x50, 0xe3, 0xd7, 0xb0, 0x34, 0x86, 0x82, 0x16, 0x21, 0x7f, 0x46, 0x86, - 0x4a, 0x51, 0xfc, 0x13, 0x7d, 0x0c, 0xc5, 0x01, 0x76, 0xfb, 0x5a, 0x4d, 0x37, 0x5f, 0xc3, 0xca, - 0x92, 0xd8, 0x8f, 0x67, 0x3e, 0xc9, 0x35, 0xf6, 0x61, 0x39, 0xe3, 0xfe, 0x53, 0x2d, 0xbe, 0x0a, - 0x25, 0x21, 0x24, 0x35, 0x66, 0x44, 0x42, 0x53, 0xab, 0xc6, 0x3f, 0x73, 0x50, 0x89, 0x71, 0x41, - 0x1f, 0xc1, 0xac, 0x56, 0x41, 0x4e, 0xa8, 0xa0, 0x91, 0x29, 0x97, 0x14, 0x49, 0xa3, 0xa2, 0x3d, - 0x1e, 0xc3, 0x22, 0x24, 0xda, 0xbe, 0xc7, 0x42, 0xdf, 0x95, 0x6c, 0x2a, 0x5b, 0xd7, 0x53, 0x5e, - 0x24, 0x03, 0x8f, 0x6d, 0x4b, 0x2c, 0x4b, 0x06, 0xaa, 0x5e, 0x52, 0xf4, 0x01, 0x20, 0x87, 0xda, - 0x41, 0xe8, 0xf4, 0x70, 0x38, 0xb4, 0x29, 0x09, 0x07, 0x8e, 0xd7, 0x15, 0x6e, 0x30, 0x67, 0x2d, - 0x3a, 0xf4, 0x50, 0x6e, 0xb4, 0x24, 0xbc, 0xf1, 0xe7, 0x02, 0x94, 0x94, 0xd8, 0x35, 0x98, 0x71, - 0x3a, 0xe2, 0xd2, 0x79, 0x6b, 0xc6, 0xe9, 0xa0, 0xba, 0x76, 0x66, 0xe9, 0xe1, 0x72, 0x81, 0xee, - 0x73, 0xcf, 0xe2, 0x0c, 0x95, 0x67, 0xad, 0x8c, 0xa4, 0x93, 0x72, 0x3d, 0x75, 0x1d, 0x4c, 0x2d, - 0x85, 0x84, 0x3e, 0x87, 0x79, 0x59, 0xb0, 0x6c, 0xe5, 0xd0, 0x05, 0x41, 0x65, 0x34, 0x63, 0x65, - 0xec, 0x99, 0xf8, 0x6c, 0x89, 0x7d, 0xab, 0x7a, 0x12, 0x5b, 0x71, 0x73, 0x04, 0x3e, 0x75, 0xb8, - 0x69, 0x8c, 0xa2, 0x34, 0x87, 0x5e, 0xa3, 0xdb, 0x20, 0x92, 0x96, 0x1d, 0x21, 0xc8, 0x04, 0x53, - 0xe5, 0xc0, 0x43, 0x8d, 0xc4, 0x2f, 0xc1, 0x30, 0x23, 0x2a, 0xc3, 0xc8, 0x05, 0x5a, 0x83, 0xd9, - 0xce, 0x89, 0x2d, 0xc2, 0x4e, 0xa6, 0x94, 0x52, 0xe7, 0xe4, 0x80, 0x07, 0xde, 0x53, 0x58, 0x61, - 0x21, 0xf6, 0x68, 0xac, 0x44, 0x51, 0x86, 0x7b, 0x81, 0x51, 0x16, 0x62, 0x57, 0x9b, 0xaa, 0xfa, - 0xf1, 0x32, 0x65, 0xd5, 0x63, 0xa8, 0x47, 0x1a, 0x13, 0x6d, 0x42, 0x95, 0xa3, 0xd8, 0xfd, 0xa0, - 0x83, 0x19, 0xe9, 0x18, 0x90, 0x41, 0x59, 0xe1, 0x9f, 0xbf, 0x90, 0x08, 0xc8, 0x80, 0xd9, 0x1e, - 0xa1, 0x14, 0x77, 0x89, 0x51, 0x11, 0xc2, 0xe8, 0x25, 0xda, 0x85, 0x0a, 0x4f, 0xd1, 0xb6, 0x10, - 0x9a, 0x1a, 0x55, 0xe1, 0x0e, 0xef, 0x4e, 0x76, 0xa6, 0x26, 0xcf, 0xdd, 0x2d, 0x8e, 0x6c, 0x41, - 0x5b, 0x7f, 0xd2, 0xc6, 0x63, 0x28, 0x47, 0x1b, 0x5c, 0x21, 0xf1, 0x7a, 0x27, 0x17, 0x5c, 0x21, - 0x2e, 0xa6, 0xcc, 0x0e, 0xce, 0x94, 0xb5, 0x4b, 0x7c, 0x79, 0x78, 0x66, 0x7e, 0x97, 0x83, 0xb5, - 0xed, 0x57, 0xd8, 0xeb, 0x92, 0xa3, 0x28, 0x37, 0xeb, 0xf2, 0xfe, 0x49, 0x94, 0xc4, 0x31, 0xb7, - 0xb9, 0xaa, 0xc5, 0x13, 0x1c, 0x42, 0xe5, 0x76, 0xb1, 0x40, 0xf7, 0x85, 0xfe, 0x79, 0xea, 0x17, - 0xec, 0x6a, 0x5b, 0xf5, 0x34, 0x91, 0xe0, 0x53, 0xea, 0x9c, 0xf0, 0x5f, 0x61, 0xae, 0x70, 0x68, - 0x87, 0x7d, 0x4f, 0xf9, 0x71, 0xa9, 0x13, 0x0e, 0xad, 0xbe, 0x67, 0xfe, 0x35, 0x07, 0xc6, 0xb8, - 0x74, 0xaa, 0x47, 0xf8, 0x18, 0xe6, 0x4f, 0xc8, 0xa9, 0x1f, 0x12, 0x5b, 0x39, 0xac, 0x94, 0x6f, - 0x31, 0xcd, 0xca, 0xaa, 0x4a, 0x34, 0xb9, 0x42, 0x1f, 0x42, 0x55, 0x56, 0x47, 0x45, 0x35, 0x33, - 0x81, 0xaa, 0x22, 0xb0, 0x14, 0xd1, 0x0d, 0xa8, 0x9c, 0x63, 0x6a, 0x27, 0xa5, 0x2c, 0x9f, 0x63, - 0xba, 0x23, 0x05, 0xfd, 0x3e, 0x0f, 0x2b, 0xdb, 0xa2, 0x17, 0x88, 0xca, 0xcd, 0xa8, 0x47, 0x1a, - 0x4b, 0xff, 0x75, 0x28, 0x9e, 0xfa, 0x3a, 0xfb, 0xcf, 0x59, 0x72, 0x81, 0x36, 0xa1, 0x8e, 0x5d, - 0xd7, 0x3f, 0xb7, 0x49, 0x2f, 0x60, 0x43, 0x7b, 0x60, 0xcb, 0xbe, 0x4c, 0x31, 0x5b, 0x12, 0x7b, - 0xbb, 0x7c, 0xeb, 0xb8, 0x25, 0x36, 0xd0, 0x03, 0xa8, 0x8b, 0x98, 0x75, 0xbc, 0xae, 0xdd, 0xf6, - 0xdd, 0x7e, 0xcf, 0x93, 0x2e, 0x5f, 0x10, 0xac, 0x90, 0xde, 0xdb, 0x16, 0x5b, 0xc2, 0xfd, 0x5f, - 0x8c, 0x53, 0x08, 0x23, 0x15, 0x85, 0x91, 0x8c, 0xf1, 0xa2, 0xb9, 0xdf, 0x11, 0x2a, 0x4f, 0x9d, - 0x25, 0x8c, 0xf6, 0x04, 0xaa, 0x3c, 0xf9, 0x90, 0x8e, 0x7d, 0x1a, 0xfa, 0x3d, 0x6a, 0x94, 0xd2, - 0xc9, 0x4c, 0x9f, 0xd1, 0x6c, 0x09, 0xb4, 0xbd, 0xd0, 0xef, 0x59, 0x15, 0x1a, 0x7d, 0x53, 0x74, - 0x0f, 0x0a, 0x82, 0xfb, 0xac, 0xe0, 0xbe, 0x3a, 0x4e, 0x29, 0x78, 0x0b, 0x1c, 0x9e, 0x0c, 0x4e, - 0x30, 0x8d, 0x35, 0x4a, 0x32, 0xae, 0xab, 0x1c, 0x18, 0xf5, 0x06, 0x0f, 0x61, 0x9e, 0x7a, 0x38, - 0xa0, 0xaf, 0x7c, 0x26, 0x42, 0x3b, 0x33, 0xaa, 0xab, 0x1a, 0x85, 0xaf, 0xcc, 0x7d, 0x58, 0x4d, - 0xdb, 0x4d, 0xb9, 0xd7, 0x66, 0xaa, 0x52, 0x54, 0xb6, 0x96, 0x63, 0x91, 0x99, 0xd1, 0x55, 0xfc, - 0x31, 0x07, 0x48, 0x9e, 0x25, 0x9b, 0x01, 0xe5, 0x00, 0xd3, 0x2a, 0xce, 0x75, 0x00, 0x59, 0x52, - 0x63, 0x9d, 0x46, 0x59, 0x40, 0x0e, 0x12, 0x7e, 0x92, 0x8f, 0xfb, 0xc9, 0x1d, 0xa8, 0x39, 0x5e, - 0xdb, 0xed, 0x77, 0x88, 0x1d, 0xe0, 0x90, 0x37, 0xc9, 0xaa, 0xc5, 0x53, 0xd0, 0x43, 0x01, 0x34, - 0xff, 0x92, 0x83, 0xe5, 0x84, 0x38, 0x57, 0xbc, 0x17, 0xba, 0x1b, 0xaf, 0x13, 0x3c, 0x52, 0x46, - 0xd8, 0xf1, 0xae, 0x27, 0x72, 0x47, 0x1b, 0xbb, 0x21, 0xc1, 0x9d, 0xa1, 0x4d, 0x2e, 0x1c, 0xca, - 0xa8, 0x12, 0x5e, 0xba, 0xd0, 0x53, 0xb9, 0xb5, 0x2b, 0x76, 0xcc, 0x9f, 0xc3, 0xca, 0x0e, 0x71, - 0xc9, 0x78, 0xd0, 0x4c, 0xd3, 0xd9, 0x3b, 0x50, 0x0e, 0x49, 0xbb, 0x1f, 0x52, 0x67, 0xa0, 0x03, - 0x68, 0x04, 0x30, 0x0d, 0x58, 0x4d, 0x1f, 0x29, 0xef, 0x6d, 0xfe, 0x3e, 0x07, 0xcb, 0x72, 0x4b, - 0x48, 0x4d, 0x35, 0xaf, 0x8d, 0xa8, 0xea, 0xcb, 0x62, 0x3e, 0x7e, 0x3f, 0xb5, 0x3f, 0x9d, 0x33, - 0x6f, 0xbd, 0xf9, 0x54, 0x62, 0x3b, 0xa7, 0x51, 0x51, 0x56, 0x76, 0xe1, 0xe0, 0xfd, 0x53, 0x55, - 0x91, 0xcd, 0x55, 0xa8, 0x27, 0xc5, 0x50, 0xf2, 0x0d, 0x35, 0x5c, 0xa6, 0x9c, 0x48, 0xbe, 0xcf, - 0x54, 0xab, 0xae, 0xb2, 0x30, 0xd1, 0x72, 0x4e, 0xc8, 0xc3, 0xf3, 0xb1, 0x3c, 0x4c, 0x28, 0x8f, - 0x1b, 0x99, 0x54, 0x54, 0xc3, 0xa0, 0xe4, 0xae, 0x0a, 0xa0, 0xea, 0x15, 0xcc, 0x35, 0x6d, 0x87, - 0x88, 0xb5, 0x92, 0xe9, 0x4f, 0x33, 0x70, 0x7d, 0xb7, 0x47, 0xc2, 0x2e, 0xf1, 0xda, 0x43, 0x8b, - 0x48, 0x77, 0xbb, 0xb4, 0x77, 0x67, 0x37, 0x18, 0x8f, 0xa0, 0xe2, 0x91, 0x91, 0x3c, 0x53, 0xbb, - 0x0c, 0xf0, 0x88, 0x16, 0x12, 0xfd, 0x04, 0x16, 0x9c, 0xae, 0xc7, 0xd3, 0xbd, 0x6a, 0x59, 0xa9, - 0x51, 0x98, 0xa6, 0x88, 0x9a, 0xc4, 0x56, 0x4d, 0x20, 0x45, 0x3b, 0xb0, 0x72, 0x8e, 0x1d, 0x16, - 0x51, 0x47, 0xf3, 0x69, 0x31, 0x72, 0x6b, 0x91, 0x24, 0x76, 0xfa, 0xa1, 0x6c, 0x95, 0x97, 0x39, - 0xba, 0x26, 0xd7, 0x73, 0xeb, 0xbf, 0x72, 0x70, 0x63, 0x92, 0x46, 0x54, 0x80, 0xbd, 0xb9, 0x4a, - 0x9e, 0xc0, 0x62, 0x10, 0xfa, 0x3d, 0x9f, 0x91, 0xce, 0xe5, 0xf4, 0xb2, 0xa0, 0xd1, 0xb5, 0x72, - 0xee, 0x42, 0x49, 0x8c, 0xc4, 0x5a, 0x27, 0xe9, 0x81, 0x59, 0xed, 0x9a, 0x9f, 0xc1, 0x8d, 0x3d, - 0xc7, 0xeb, 0x3c, 0x75, 0x5d, 0xe9, 0x7d, 0xfb, 0xde, 0x1b, 0x84, 0x9e, 0xf9, 0xef, 0x1c, 0xdc, - 0x9c, 0x48, 0xae, 0x6e, 0x7f, 0x90, 0x0a, 0xa7, 0x47, 0xb1, 0x70, 0x7a, 0x0d, 0xad, 0x0c, 0x37, - 0x35, 0x2f, 0xe8, 0xe6, 0xfb, 0x0b, 0xd5, 0x7b, 0x4f, 0x9c, 0x11, 0xee, 0x26, 0x67, 0x84, 0x8c, - 0xf4, 0x14, 0x0d, 0x05, 0xe6, 0x2e, 0x2c, 0x3d, 0x27, 0xec, 0x19, 0x6e, 0x9f, 0xf5, 0x03, 0x7a, - 0x65, 0x17, 0x36, 0x77, 0x00, 0xc5, 0x8f, 0x51, 0x37, 0x6f, 0xc2, 0xec, 0x89, 0x04, 0xa9, 0xab, - 0xd7, 0x9b, 0xd1, 0x53, 0x8d, 0xc4, 0xdd, 0xf7, 0x4e, 0x7d, 0x4b, 0x23, 0x99, 0xd7, 0x60, 0xed, - 0x39, 0x61, 0xdb, 0xc4, 0x75, 0x39, 0x9c, 0x27, 0x7c, 0x2d, 0x92, 0xf9, 0x00, 0x8c, 0xf1, 0x2d, - 0xc5, 0xa6, 0x0e, 0x45, 0x5e, 0x2d, 0xf4, 0xab, 0x8b, 0x5c, 0x98, 0x1b, 0x42, 0x24, 0x4d, 0x11, - 0x6b, 0x3e, 0xc4, 0x68, 0x9e, 0x1b, 0x8d, 0xe6, 0xe6, 0x1e, 0x2c, 0x27, 0x30, 0xa3, 0xb2, 0x50, - 0xe6, 0xdb, 0xb6, 0xe3, 0x9d, 0xfa, 0xaa, 0x2e, 0xc4, 0x86, 0xe8, 0x08, 0x7d, 0xae, 0xad, 0xbe, - 0x78, 0xa6, 0x55, 0xe7, 0x50, 0x95, 0x6c, 0xb4, 0xf4, 0xdf, 0xe7, 0xa2, 0x9b, 0x8d, 0xb6, 0x14, - 0x9b, 0x7d, 0x98, 0x4d, 0xa6, 0xb1, 0xcd, 0x98, 0xbd, 0x26, 0x10, 0x35, 0xd5, 0x5a, 0x3a, 0x86, - 0xa6, 0x6f, 0x1c, 0x42, 0x35, 0xbe, 0x91, 0xe1, 0x1a, 0xf7, 0x92, 0xae, 0x51, 0x4f, 0xde, 0x47, - 0xb2, 0x89, 0xbb, 0xc7, 0x8a, 0x50, 0x8d, 0x76, 0xcb, 0xe8, 0x3e, 0xfb, 0x50, 0x4f, 0x82, 0xd5, - 0x5d, 0x1e, 0x42, 0x59, 0x3b, 0x8a, 0xbe, 0x4d, 0x66, 0x29, 0x1d, 0x61, 0x99, 0x0f, 0x84, 0x99, - 0xde, 0x24, 0xe6, 0xf6, 0x12, 0x32, 0x5d, 0xbd, 0x3b, 0xf9, 0xdd, 0x0c, 0x2c, 0x3e, 0x27, 0x4c, - 0xb6, 0x8e, 0x6f, 0xdf, 0xe1, 0xaf, 0xaa, 0x31, 0x31, 0x9a, 0x95, 0xe5, 0x8a, 0x37, 0x27, 0xe4, - 0x42, 0x36, 0x27, 0x6a, 0x3f, 0x2f, 0xf6, 0xe7, 0x15, 0xf4, 0x48, 0xa2, 0xdd, 0x06, 0xdd, 0xad, - 0xd8, 0x03, 0x87, 0x9c, 0x53, 0x55, 0x2a, 0xab, 0x0a, 0x78, 0xcc, 0x61, 0x68, 0x03, 0x16, 0xe5, - 0x23, 0x95, 0x70, 0x71, 0xdb, 0xf7, 0xdc, 0xa1, 0x48, 0xd6, 0x73, 0x6a, 0x26, 0x16, 0x71, 0xf1, - 0x33, 0xcf, 0x1d, 0x8e, 0x30, 0xa9, 0xf3, 0xad, 0xc6, 0x2c, 0xc5, 0x30, 0x5b, 0x1c, 0xcc, 0x31, - 0xcd, 0x43, 0x91, 0x01, 0xb4, 0x16, 0x94, 0x32, 0x3f, 0x85, 0x92, 0xea, 0xb5, 0xa5, 0x02, 0x6e, - 0x37, 0xc7, 0x1f, 0x4f, 0x25, 0xc9, 0x0e, 0x39, 0x75, 0x3c, 0x47, 0x3d, 0xc5, 0x08, 0x88, 0xf9, - 0x12, 0x16, 0xf8, 0x89, 0x3f, 0x4c, 0xcb, 0x67, 0x3e, 0x96, 0x56, 0x4a, 0x14, 0x94, 0xa8, 0x01, - 0xcb, 0x4d, 0x6d, 0xc0, 0xcc, 0x17, 0x22, 0x22, 0x5b, 0xe1, 0x20, 0xed, 0xc1, 0xaf, 0x4b, 0x71, - 0x3c, 0xa6, 0xb5, 0x21, 0xe5, 0xc2, 0xfc, 0xaf, 0x8c, 0xe1, 0xe4, 0x61, 0x4a, 0x9e, 0x5f, 0xc2, - 0x3c, 0x0d, 0x07, 0x76, 0xda, 0xf7, 0x3f, 0x4a, 0x46, 0x72, 0x16, 0x69, 0x33, 0x0e, 0xd4, 0xef, - 0x42, 0x31, 0x50, 0xe3, 0x18, 0x96, 0xc6, 0x50, 0x32, 0x02, 0xfb, 0xfd, 0x64, 0x60, 0xc7, 0x1c, - 0x36, 0x46, 0x1d, 0x8f, 0xec, 0x7b, 0x22, 0x84, 0x5b, 0xe1, 0xe0, 0x38, 0x19, 0x00, 0x59, 0x09, - 0xf2, 0x00, 0x56, 0x52, 0xb8, 0xd1, 0xc0, 0xc9, 0x85, 0x1d, 0x0d, 0x66, 0x51, 0xdc, 0xa9, 0x07, - 0xf4, 0x18, 0x09, 0xd0, 0xe8, 0xdb, 0x7c, 0x29, 0x4c, 0xaa, 0xa6, 0xca, 0xb7, 0x0d, 0x3c, 0xf3, - 0x73, 0xe1, 0xc0, 0xfa, 0x34, 0x25, 0xd9, 0x46, 0xf4, 0x68, 0x33, 0x69, 0x06, 0x56, 0xfb, 0xe6, - 0x3f, 0x72, 0x31, 0xfa, 0xab, 0x97, 0xc0, 0x91, 0xd7, 0xe4, 0x63, 0x5e, 0x23, 0x5e, 0xd0, 0x58, - 0xe8, 0xb4, 0xf5, 0x48, 0xa2, 0x56, 0x19, 0x3d, 0x6c, 0xf1, 0xf2, 0x3d, 0xac, 0xf9, 0x44, 0x24, - 0xcd, 0x54, 0x6f, 0x8a, 0xee, 0xc1, 0xac, 0x44, 0x1b, 0x35, 0xee, 0xe9, 0x4b, 0x6b, 0x04, 0x73, - 0x53, 0x5c, 0x3a, 0x65, 0xfb, 0x69, 0x59, 0xf7, 0x99, 0x60, 0x99, 0x76, 0x80, 0x0f, 0x60, 0x2e, - 0x65, 0xfc, 0xa5, 0xc8, 0xf8, 0x91, 0xd7, 0xcd, 0x0e, 0x94, 0xdd, 0x2d, 0x91, 0xb9, 0xf5, 0x13, - 0xce, 0xa5, 0x74, 0x7d, 0x13, 0x2a, 0xb8, 0xcd, 0x9c, 0x01, 0x91, 0x29, 0x4c, 0xf6, 0xea, 0x20, - 0x41, 0x22, 0x7d, 0xc9, 0x52, 0x14, 0x3b, 0x73, 0x54, 0x8a, 0xf4, 0xbf, 0x0a, 0x59, 0xa5, 0x48, - 0x13, 0x58, 0x23, 0x2c, 0xf3, 0xb7, 0x70, 0xcd, 0x22, 0x3d, 0x7f, 0x10, 0x4d, 0x4a, 0xbc, 0x26, - 0x5e, 0x46, 0x48, 0x1d, 0x33, 0x33, 0xb1, 0xf7, 0xfe, 0xec, 0x49, 0x35, 0x31, 0x30, 0x15, 0xd2, - 0xa3, 0xda, 0x3b, 0xd0, 0xc8, 0x12, 0x40, 0x8d, 0x1e, 0xdf, 0xe5, 0x60, 0x55, 0x6e, 0x8b, 0x1c, - 0x77, 0x59, 0xe1, 0x5e, 0x33, 0x51, 0x6b, 0xd9, 0xf3, 0x59, 0xb2, 0x17, 0x26, 0xca, 0x5e, 0x4c, - 0xcb, 0x7e, 0x0d, 0xd6, 0xc6, 0x84, 0x53, 0x82, 0xef, 0xc1, 0x8a, 0x9e, 0x0b, 0x92, 0x31, 0x7f, - 0x3f, 0x15, 0xa4, 0xd3, 0x5f, 0x56, 0xcd, 0xdf, 0xf0, 0xfb, 0x27, 0xcf, 0xb9, 0xf2, 0x80, 0xb1, - 0x09, 0xb3, 0x97, 0x9a, 0x2b, 0x34, 0x96, 0x79, 0x04, 0xeb, 0xaa, 0x06, 0x45, 0x4f, 0xe8, 0xfa, - 0xc9, 0xf5, 0x2d, 0xfa, 0xe6, 0xbf, 0xe7, 0xe1, 0xd6, 0x94, 0x63, 0xd5, 0xf5, 0x2e, 0xa0, 0x1e, - 0xff, 0x53, 0x82, 0x32, 0xcc, 0xfa, 0xa3, 0x7e, 0x71, 0x77, 0xac, 0xfa, 0x4d, 0x39, 0x2b, 0xfe, - 0x17, 0x48, 0x4b, 0x9d, 0x23, 0xcb, 0xce, 0x72, 0x38, 0xbe, 0x83, 0xbe, 0x06, 0x50, 0x69, 0xaa, - 0x87, 0x03, 0xf5, 0x3a, 0xff, 0xe9, 0x1b, 0xf1, 0x93, 0xca, 0xfc, 0x12, 0x07, 0x92, 0x4b, 0x99, - 0xe9, 0x75, 0xc3, 0x06, 0x63, 0x92, 0x30, 0x19, 0x05, 0xee, 0x7e, 0xb2, 0xc0, 0xad, 0x35, 0xd3, - 0x7f, 0xf2, 0xca, 0x03, 0xe2, 0x7f, 0x78, 0x1c, 0x40, 0x2d, 0xc9, 0xfd, 0x32, 0xb3, 0x52, 0x3a, - 0x63, 0xc6, 0x4a, 0xa6, 0x05, 0xb7, 0x24, 0x70, 0x57, 0xfd, 0x1b, 0xe7, 0x46, 0xf3, 0x2e, 0xe9, - 0x5c, 0xd1, 0xa7, 0xff, 0x93, 0x03, 0x73, 0xda, 0xa1, 0x57, 0x76, 0xf0, 0xab, 0x3e, 0x2a, 0x3c, - 0x82, 0x8a, 0xef, 0x8e, 0x86, 0xee, 0xc2, 0x54, 0x3a, 0xdf, 0xd5, 0xf3, 0xf6, 0xb3, 0x8d, 0xaf, - 0xef, 0x0e, 0x1c, 0x46, 0x28, 0x6d, 0x3a, 0xfe, 0xa6, 0xfc, 0xda, 0xec, 0xfa, 0x9b, 0x03, 0xb6, - 0x29, 0xfe, 0x37, 0xdf, 0x8c, 0x7c, 0xe6, 0xa4, 0x24, 0x00, 0x1f, 0xfe, 0x3f, 0x00, 0x00, 0xff, - 0xff, 0xc1, 0x39, 0x47, 0xd6, 0xf4, 0x1f, 0x00, 0x00, + // 2733 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x3a, 0xcb, 0x6f, 0x1b, 0xc7, + 0xf9, 0xa0, 0x28, 0x52, 0xe4, 0xc7, 0x87, 0xa4, 0x11, 0x25, 0x6d, 0x98, 0xd8, 0x51, 0xd6, 0xb1, + 0xa3, 0x9f, 0x1d, 0x53, 0xb6, 0x92, 0x18, 0x81, 0x93, 0xfc, 0x6a, 0x59, 0xa2, 0x0c, 0x39, 0x8e, + 0xaa, 0x2e, 0x55, 0x05, 0xcd, 0xa1, 0xdb, 0xd1, 0xee, 0x88, 0x5e, 0x68, 0xb9, 0xcb, 0xec, 0x0c, + 0x29, 0x31, 0x3d, 0xf4, 0xd2, 0x1e, 0x0a, 0x14, 0xe8, 0x1f, 0x90, 0x4b, 0x4f, 0x3d, 0xf4, 0xd6, + 0x4b, 0x80, 0x02, 0x45, 0x8f, 0x3d, 0xf5, 0x1f, 0xe8, 0xb5, 0x87, 0xde, 0xfa, 0x3f, 0x14, 0xf3, + 0x5a, 0x2e, 0x97, 0x0f, 0xcb, 0x72, 0x4f, 0xda, 0xf9, 0x1e, 0x33, 0xdf, 0x7c, 0xef, 0x6f, 0x28, + 0x58, 0xec, 0x33, 0x87, 0xf9, 0x2e, 0x66, 0xb8, 0xd1, 0x8d, 0x42, 0x16, 0xa2, 0x62, 0x0c, 0xa8, + 0x2f, 0x9d, 0x7a, 0x81, 0x1f, 0xb6, 0x87, 0xc8, 0x7a, 0xc5, 0x0f, 0xdb, 0x3d, 0xe6, 0xf9, 0x6a, + 0x59, 0xed, 0x0c, 0xe8, 0xb7, 0xbe, 0xc3, 0xf4, 0x7a, 0x35, 0x22, 0x5d, 0xdf, 0x73, 0x30, 0xf3, + 0xc2, 0x20, 0xc1, 0xb5, 0xce, 0xf0, 0xa9, 0x4f, 0x58, 0x07, 0x07, 0xb8, 0x4d, 0xa2, 0x04, 0xa2, + 0xca, 0xc2, 0x6e, 0x98, 0xdc, 0xbe, 0x4f, 0x9d, 0x97, 0xa4, 0xa3, 0x97, 0xe5, 0x3e, 0x63, 0x5e, + 0x87, 0xc8, 0x95, 0xf9, 0x35, 0xd4, 0x9b, 0x97, 0xc4, 0xe9, 0x31, 0x72, 0xc2, 0x25, 0xdc, 0x0d, + 0x3b, 0x1d, 0x1c, 0xb8, 0x16, 0xf9, 0xb6, 0x47, 0x28, 0x43, 0x08, 0xe6, 0x71, 0xd4, 0xa6, 0x46, + 0x66, 0x23, 0xbb, 0x59, 0xb4, 0xc4, 0x37, 0xba, 0x0d, 0x55, 0xec, 0x70, 0x59, 0x6c, 0xbe, 0x4d, + 0xd8, 0x63, 0xc6, 0xdc, 0x46, 0x66, 0x33, 0x6b, 0x55, 0x24, 0xf4, 0x58, 0x02, 0xcd, 0x5d, 0x78, + 0x7b, 0xe2, 0xc6, 0xb4, 0x1b, 0x06, 0x94, 0xa0, 0xf7, 0x21, 0x47, 0xfa, 0x24, 0x60, 0x46, 0x66, + 0x23, 0xb3, 0x59, 0xda, 0xae, 0x36, 0xb4, 0x0e, 0x9a, 0x1c, 0x6a, 0x49, 0xa4, 0xf9, 0xdb, 0x0c, + 0x18, 0xc7, 0xfc, 0x9a, 0x5f, 0x61, 0x46, 0x22, 0x0f, 0xfb, 0xde, 0x77, 0xa4, 0x45, 0x18, 0xf3, + 0x82, 0x36, 0x45, 0xef, 0x41, 0x99, 0xe1, 0xa8, 0x4d, 0x98, 0x2d, 0x34, 0x21, 0x76, 0x2a, 0x5a, + 0x25, 0x09, 0x13, 0x5c, 0xe8, 0x1e, 0x2c, 0xd3, 0xb0, 0x17, 0x39, 0xc4, 0x26, 0x97, 0xdd, 0x88, + 0x50, 0xea, 0x85, 0x81, 0x10, 0xb7, 0x68, 0x2d, 0x49, 0x44, 0x33, 0x86, 0xa3, 0x1b, 0x00, 0x4e, + 0x44, 0x30, 0x23, 0xb6, 0xeb, 0xfa, 0x46, 0x56, 0x50, 0x15, 0x25, 0x64, 0xcf, 0xf5, 0xcd, 0x7f, + 0xce, 0xc1, 0xca, 0x24, 0x31, 0xea, 0x50, 0xb8, 0x08, 0xa3, 0xf3, 0x33, 0x3f, 0xbc, 0x50, 0x22, + 0xc4, 0x6b, 0xf4, 0x01, 0x2c, 0xaa, 0xf3, 0xcf, 0xc9, 0x80, 0x76, 0xb1, 0x43, 0xd4, 0xe9, 0x55, + 0x09, 0xfe, 0x52, 0x41, 0x39, 0xa1, 0xba, 0x4b, 0x4c, 0x28, 0x05, 0xa8, 0x4a, 0x70, 0x4c, 0x78, + 0x07, 0x16, 0x29, 0x0b, 0xbb, 0x36, 0x3e, 0x63, 0x24, 0xb2, 0x9d, 0xb0, 0x3b, 0x30, 0xe6, 0x37, + 0x32, 0x9b, 0x05, 0xab, 0xc2, 0xc1, 0x3b, 0x1c, 0xba, 0x1b, 0x76, 0x07, 0xe8, 0x39, 0x54, 0x85, + 0x56, 0x6c, 0xaa, 0xe4, 0x34, 0x72, 0x1b, 0xd9, 0xcd, 0xd2, 0xf6, 0xad, 0xc6, 0xd0, 0x35, 0xa7, + 0x69, 0xd6, 0xaa, 0x08, 0xd6, 0xf8, 0x86, 0x08, 0xe6, 0x1d, 0xe2, 0xfb, 0x46, 0x5e, 0x48, 0x24, + 0xbe, 0xa5, 0xf2, 0xb9, 0xff, 0xd9, 0x6c, 0xd0, 0x25, 0xd4, 0x58, 0xd0, 0xca, 0xe7, 0xb0, 0x63, + 0x0e, 0x42, 0xff, 0x07, 0x4b, 0xe4, 0x92, 0x91, 0x28, 0xc0, 0xbe, 0xed, 0xf8, 0x3d, 0xca, 0x48, + 0x64, 0x14, 0x04, 0xd9, 0xa2, 0x86, 0xef, 0x4a, 0xb0, 0x79, 0x08, 0x85, 0xf8, 0x86, 0x08, 0xe6, + 0x03, 0xdc, 0xd1, 0xe6, 0x14, 0xdf, 0xa8, 0x01, 0x85, 0x11, 0x05, 0x96, 0xb6, 0x51, 0x23, 0xf6, + 0x72, 0xcd, 0x69, 0xc5, 0x34, 0xe6, 0xcf, 0x21, 0xd7, 0x7a, 0x89, 0x23, 0x97, 0x1b, 0x27, 0x66, + 0x54, 0xc6, 0x39, 0x4f, 0x1f, 0x34, 0x97, 0x38, 0xe8, 0x36, 0xe4, 0x28, 0x67, 0x14, 0xda, 0x2f, + 0x6d, 0x2f, 0x0e, 0x4f, 0x11, 0xfb, 0x59, 0x12, 0x6b, 0xfe, 0xa7, 0x04, 0x85, 0xaf, 0xb5, 0x91, + 0x27, 0x09, 0xfc, 0x23, 0xc8, 0x4b, 0x0b, 0x2b, 0x71, 0x3f, 0x48, 0xa8, 0x5d, 0x33, 0x36, 0xac, + 0x61, 0x5c, 0xbf, 0x08, 0xe5, 0x5f, 0x4b, 0xb1, 0xf1, 0x0d, 0xa4, 0xe5, 0x95, 0x24, 0x57, 0xdf, + 0x40, 0xb2, 0xa1, 0x87, 0xb0, 0xda, 0xc1, 0x97, 0x76, 0xdf, 0x4e, 0x64, 0x0f, 0xdb, 0xc7, 0x6d, + 0xe1, 0x2e, 0x59, 0x0b, 0x75, 0xf0, 0xe5, 0x49, 0x92, 0x1f, 0xb7, 0xd1, 0x73, 0xa8, 0x88, 0xeb, + 0xd9, 0x94, 0x45, 0x04, 0x77, 0xb4, 0xcb, 0xdc, 0x9e, 0x74, 0xb4, 0x50, 0x47, 0x4b, 0xd2, 0x35, + 0x03, 0x16, 0x0d, 0xac, 0x32, 0x4d, 0x80, 0xea, 0xbf, 0x80, 0xe5, 0x31, 0x12, 0xb4, 0x04, 0xd9, + 0x73, 0x32, 0x50, 0x8a, 0xe2, 0x9f, 0xe8, 0x13, 0xc8, 0xf5, 0xb1, 0xdf, 0xd3, 0x6a, 0x7a, 0xf7, + 0x15, 0x47, 0x59, 0x92, 0xfa, 0xf1, 0xdc, 0xa7, 0x99, 0xfa, 0x01, 0xac, 0x4c, 0xb8, 0xff, 0x4c, + 0x8b, 0xaf, 0x41, 0x5e, 0x08, 0x49, 0x8d, 0x39, 0x91, 0xd0, 0xd4, 0xaa, 0xfe, 0x97, 0x0c, 0x94, + 0x12, 0xa7, 0xa0, 0x8f, 0x61, 0x41, 0xab, 0x20, 0x23, 0x54, 0x50, 0x9f, 0x28, 0x97, 0x14, 0x49, + 0x93, 0xa2, 0x7d, 0x1e, 0xc3, 0x22, 0x24, 0x9c, 0x30, 0x60, 0x51, 0xe8, 0xcb, 0x63, 0x4a, 0xdb, + 0x37, 0x52, 0x5e, 0x24, 0x03, 0x8f, 0xed, 0x4a, 0x2a, 0x4b, 0x06, 0xaa, 0x5e, 0x52, 0xf4, 0x21, + 0x20, 0x8f, 0xda, 0xdd, 0xc8, 0xeb, 0xe0, 0x68, 0x60, 0x53, 0x12, 0xf5, 0xbd, 0xa0, 0x2d, 0xdc, + 0xa0, 0x60, 0x2d, 0x79, 0xf4, 0x48, 0x22, 0x5a, 0x12, 0x5e, 0xff, 0x57, 0x1e, 0xf2, 0x4a, 0xec, + 0x2a, 0xcc, 0x79, 0xae, 0xb8, 0x74, 0xd6, 0x9a, 0xf3, 0x5c, 0x54, 0xd3, 0xce, 0x2c, 0x3d, 0x5c, + 0x2e, 0xd0, 0x7d, 0xee, 0x59, 0xfc, 0x40, 0xe5, 0x59, 0xab, 0x43, 0xe9, 0xa4, 0x5c, 0x3b, 0xbe, + 0x87, 0xa9, 0xa5, 0x88, 0xd0, 0x17, 0x50, 0x91, 0x05, 0xcb, 0x56, 0x0e, 0x3d, 0x2f, 0xb8, 0x8c, + 0x46, 0xa2, 0x8c, 0x3d, 0x15, 0x9f, 0x2d, 0x81, 0xb7, 0xca, 0xa7, 0x89, 0x15, 0x37, 0x47, 0x37, + 0xa4, 0x1e, 0x37, 0x8d, 0x91, 0x93, 0xe6, 0xd0, 0x6b, 0x74, 0x0b, 0x44, 0xd2, 0xb2, 0x63, 0x02, + 0x99, 0x60, 0xca, 0x1c, 0x78, 0xa4, 0x89, 0xf8, 0x25, 0x18, 0x66, 0x44, 0x65, 0x18, 0xb9, 0x40, + 0xeb, 0xb0, 0xe0, 0x9e, 0xda, 0x22, 0xec, 0x64, 0x4a, 0xc9, 0xbb, 0xa7, 0x87, 0x3c, 0xf0, 0x76, + 0x60, 0x95, 0x45, 0x38, 0xa0, 0x89, 0x12, 0x45, 0x19, 0xee, 0x74, 0x8d, 0xa2, 0x10, 0xbb, 0xdc, + 0x50, 0xd5, 0x8f, 0x97, 0x29, 0xab, 0x96, 0x20, 0x3d, 0xd6, 0x94, 0x68, 0x0b, 0xca, 0x9c, 0xc4, + 0xee, 0x75, 0x5d, 0xcc, 0x88, 0x6b, 0xc0, 0x04, 0xce, 0x12, 0xff, 0xfc, 0xa9, 0x24, 0x40, 0x06, + 0x2c, 0x74, 0x08, 0xa5, 0xb8, 0x4d, 0x8c, 0x92, 0x10, 0x46, 0x2f, 0x51, 0x13, 0x4a, 0x3c, 0x45, + 0xdb, 0x42, 0x68, 0x6a, 0x94, 0x85, 0x3b, 0xbc, 0x3f, 0xdd, 0x99, 0x1a, 0x3c, 0x77, 0xb7, 0x38, + 0xb1, 0x05, 0x8e, 0xfe, 0xa4, 0x68, 0x1b, 0xe6, 0xfd, 0xb0, 0x4d, 0x8d, 0x8a, 0xe0, 0xbf, 0x39, + 0x83, 0xff, 0x45, 0xd8, 0xb6, 0x04, 0x2d, 0x2f, 0x14, 0xdc, 0x68, 0x67, 0x84, 0x39, 0x2f, 0x6d, + 0x12, 0x45, 0x61, 0x64, 0x54, 0x85, 0x70, 0xbc, 0xdb, 0xd8, 0xe7, 0xd0, 0x26, 0x07, 0xd6, 0x1f, + 0x43, 0x31, 0x3e, 0x94, 0x2b, 0x3b, 0x59, 0x4b, 0xe5, 0x82, 0x2b, 0xdb, 0xc7, 0x94, 0xd9, 0xdd, + 0x73, 0xe5, 0x49, 0x79, 0xbe, 0x3c, 0x3a, 0xaf, 0xff, 0x3b, 0x03, 0xd9, 0x17, 0x61, 0x7b, 0xcc, + 0xf1, 0xde, 0x86, 0xa2, 0x0c, 0x0a, 0xdb, 0x73, 0x55, 0x77, 0x50, 0x90, 0x80, 0x03, 0x97, 0xa7, + 0x4b, 0x5e, 0x32, 0x54, 0x7d, 0x13, 0xdf, 0x43, 0x23, 0xcf, 0x27, 0x8d, 0x7c, 0x4f, 0x17, 0x64, + 0xd7, 0xc6, 0x4c, 0x78, 0x4f, 0xda, 0x0c, 0xaa, 0x3c, 0xbb, 0x3b, 0x8c, 0x13, 0x2b, 0x83, 0x71, + 0xe2, 0xfc, 0x24, 0x62, 0x85, 0xdf, 0x61, 0x49, 0x8b, 0x2d, 0x8c, 0x5a, 0xac, 0x06, 0x39, 0x27, + 0xec, 0x05, 0x4c, 0xb8, 0x55, 0xd6, 0x92, 0x0b, 0xf3, 0xfb, 0x0c, 0xac, 0xef, 0xbe, 0xc4, 0x41, + 0x9b, 0x1c, 0xc7, 0x05, 0x4e, 0xf7, 0x48, 0x9f, 0xc6, 0x95, 0x10, 0xf3, 0xc0, 0x51, 0x0d, 0xcd, + 0x94, 0xa8, 0x52, 0x05, 0x52, 0x2c, 0xd0, 0x7d, 0xe1, 0xc4, 0x42, 0x19, 0x5c, 0x49, 0xd5, 0xed, + 0x5a, 0x9a, 0x49, 0x9c, 0x93, 0x77, 0x4f, 0xf9, 0x5f, 0xe1, 0xf3, 0xd1, 0xc0, 0x8e, 0x7a, 0x81, + 0x4a, 0x06, 0x79, 0x37, 0x1a, 0x58, 0xbd, 0xc0, 0xfc, 0x63, 0x06, 0x8c, 0x71, 0xe9, 0x54, 0xa3, + 0xf5, 0x09, 0x54, 0x4e, 0xc9, 0x59, 0x18, 0x11, 0x5b, 0x45, 0xbd, 0x94, 0x6f, 0x29, 0x7d, 0x94, + 0x55, 0x96, 0x64, 0x72, 0x85, 0x3e, 0x82, 0xb2, 0x6c, 0x31, 0x14, 0xd7, 0xdc, 0x14, 0xae, 0x92, + 0xa0, 0x52, 0x4c, 0x37, 0xa1, 0x74, 0x81, 0xa9, 0x3d, 0x2a, 0x65, 0xf1, 0x02, 0xd3, 0x3d, 0x29, + 0xe8, 0x0f, 0x59, 0x58, 0xdd, 0x15, 0x16, 0x8b, 0x6b, 0xf6, 0xb0, 0xd1, 0x1c, 0xab, 0xa1, 0x35, + 0xc8, 0x9d, 0x85, 0xba, 0x84, 0x16, 0x2c, 0xb9, 0x40, 0x5b, 0x50, 0xc3, 0xbe, 0x1f, 0x5e, 0xd8, + 0xa4, 0xd3, 0x65, 0x03, 0xbb, 0x6f, 0xcb, 0xe6, 0x56, 0x1d, 0xb6, 0x2c, 0x70, 0x4d, 0x8e, 0x3a, + 0x69, 0x09, 0x04, 0x7a, 0x00, 0x35, 0x91, 0xf8, 0xbc, 0xa0, 0x6d, 0x3b, 0xa1, 0xdf, 0xeb, 0x04, + 0x32, 0x6f, 0x48, 0x57, 0x43, 0x1a, 0xb7, 0x2b, 0x50, 0x22, 0x87, 0x3c, 0x1f, 0xe7, 0x10, 0x46, + 0xca, 0x09, 0x23, 0x19, 0xe3, 0x9d, 0xc7, 0x81, 0x2b, 0x54, 0x9e, 0xda, 0x4b, 0x18, 0xed, 0x09, + 0x94, 0x79, 0x06, 0x27, 0xae, 0x7d, 0x16, 0x85, 0x1d, 0x6a, 0xe4, 0xd3, 0x15, 0x41, 0xef, 0xd1, + 0x68, 0x09, 0xb2, 0xfd, 0x28, 0xec, 0x58, 0x25, 0x1a, 0x7f, 0x53, 0x74, 0x57, 0xc5, 0xcb, 0x82, + 0x38, 0x7d, 0x6d, 0x9c, 0x53, 0x9c, 0x2d, 0xe3, 0xe8, 0x16, 0x54, 0x4e, 0x31, 0x4d, 0x74, 0x9b, + 0x32, 0x39, 0x96, 0x39, 0x30, 0x6e, 0xb0, 0x1e, 0x42, 0x85, 0x06, 0xb8, 0x4b, 0x5f, 0x86, 0x4c, + 0xe4, 0xc7, 0x89, 0xa9, 0xb1, 0xac, 0x49, 0xf8, 0xca, 0x3c, 0x80, 0xb5, 0xb4, 0xdd, 0x94, 0x7b, + 0x6d, 0xa5, 0xca, 0x6d, 0x69, 0x7b, 0x25, 0x91, 0x9e, 0x26, 0xb4, 0x66, 0xbf, 0xcb, 0x00, 0x92, + 0x7b, 0xc9, 0x8e, 0x4a, 0x39, 0xc0, 0xac, 0xb2, 0x7d, 0x03, 0x40, 0xf6, 0x25, 0x89, 0x76, 0xad, + 0x28, 0x20, 0x87, 0x23, 0x7e, 0x92, 0x4d, 0xfa, 0xc9, 0x6d, 0xa8, 0x7a, 0x81, 0xe3, 0xf7, 0x5c, + 0x62, 0x77, 0x71, 0xc4, 0x27, 0x0d, 0xd5, 0x27, 0x2b, 0xe8, 0x91, 0x00, 0x9a, 0x7f, 0xc8, 0xc0, + 0xca, 0x88, 0x38, 0xd7, 0xbc, 0x17, 0xba, 0x93, 0x2c, 0xb6, 0x3c, 0x52, 0x86, 0xd4, 0xc9, 0xd6, + 0x31, 0x76, 0x47, 0x1b, 0xfb, 0x11, 0xc1, 0xee, 0xc0, 0x26, 0x97, 0x1e, 0x65, 0x54, 0x09, 0x2f, + 0x5d, 0x68, 0x47, 0xa2, 0x9a, 0x02, 0x63, 0xfe, 0x04, 0x56, 0xf7, 0x88, 0x4f, 0xc6, 0x83, 0x66, + 0x96, 0xce, 0xde, 0x81, 0x62, 0x44, 0x9c, 0x5e, 0x44, 0xbd, 0xbe, 0x0e, 0xa0, 0x21, 0xc0, 0x34, + 0x60, 0x2d, 0xbd, 0xa5, 0xbc, 0xb7, 0xf9, 0x9b, 0x0c, 0xac, 0x48, 0x94, 0x90, 0x9a, 0xea, 0xb3, + 0x36, 0xe3, 0xd6, 0x49, 0x76, 0x44, 0xe3, 0xf7, 0x53, 0xf8, 0xd9, 0x27, 0xf3, 0xb2, 0xc4, 0x47, + 0x3b, 0xdb, 0x3b, 0x8b, 0x3b, 0x1b, 0x65, 0x17, 0x0e, 0x3e, 0x38, 0x53, 0x6d, 0x8d, 0xb9, 0x06, + 0xb5, 0x51, 0x31, 0x94, 0x7c, 0x03, 0x0d, 0x97, 0x29, 0x27, 0x96, 0xef, 0x73, 0x35, 0xef, 0xa8, + 0x2c, 0x4c, 0xb4, 0x9c, 0x53, 0xf2, 0x70, 0x25, 0x91, 0x87, 0x09, 0xe5, 0x71, 0x23, 0x93, 0x8a, + 0xea, 0xba, 0x94, 0xdc, 0x65, 0x01, 0x54, 0x0d, 0x97, 0xb9, 0xae, 0xed, 0x10, 0x1f, 0xad, 0x64, + 0xfa, 0xfd, 0x1c, 0xdc, 0x68, 0x76, 0x48, 0xd4, 0x26, 0x81, 0x33, 0xb0, 0x88, 0x74, 0xb7, 0x2b, + 0x7b, 0xf7, 0xe4, 0x2e, 0xed, 0x11, 0x94, 0x02, 0x32, 0x94, 0x67, 0x66, 0xab, 0x06, 0x01, 0xd1, + 0x42, 0xa2, 0xff, 0x87, 0x45, 0xaf, 0x1d, 0xf0, 0x74, 0xaf, 0xfa, 0x7e, 0x6a, 0xcc, 0xcf, 0x52, + 0x44, 0x55, 0x52, 0xab, 0x4e, 0x9a, 0xa2, 0x3d, 0x58, 0xbd, 0xc0, 0x1e, 0x8b, 0xb9, 0xe3, 0x21, + 0x3f, 0x17, 0xbb, 0xb5, 0x48, 0x12, 0x7b, 0xbd, 0x48, 0xce, 0x1b, 0x2b, 0x9c, 0x5c, 0xb3, 0xeb, + 0xe1, 0xff, 0xaf, 0x19, 0xb8, 0x39, 0x4d, 0x23, 0x2a, 0xc0, 0x5e, 0x5f, 0x25, 0x4f, 0x60, 0xa9, + 0x1b, 0x85, 0x9d, 0x90, 0x97, 0xf8, 0x2b, 0xe9, 0x65, 0x51, 0x93, 0x6b, 0xe5, 0xdc, 0x81, 0xbc, + 0x78, 0x57, 0xd0, 0x3a, 0x49, 0xbf, 0x3a, 0x28, 0xac, 0xf9, 0x39, 0xdc, 0xdc, 0xf7, 0x02, 0x77, + 0xc7, 0xf7, 0xa5, 0xf7, 0x1d, 0x04, 0xaf, 0x11, 0x7a, 0xe6, 0xdf, 0x32, 0xf0, 0xee, 0x54, 0x76, + 0x75, 0xfb, 0xc3, 0x54, 0x38, 0x3d, 0x4a, 0x84, 0xd3, 0x2b, 0x78, 0x65, 0xb8, 0xa9, 0xa1, 0x4b, + 0x4f, 0x30, 0x5f, 0xaa, 0x01, 0x66, 0xea, 0xa0, 0x75, 0x67, 0x74, 0xd0, 0x9a, 0x90, 0x9e, 0xe2, + 0xc9, 0xca, 0x6c, 0xc2, 0xf2, 0x33, 0xc2, 0x9e, 0x62, 0xe7, 0xbc, 0xd7, 0xa5, 0xd7, 0x76, 0x61, + 0x73, 0x0f, 0x50, 0x72, 0x1b, 0x75, 0xf3, 0x06, 0x2c, 0x9c, 0x4a, 0x90, 0xba, 0x7a, 0xad, 0x11, + 0xbf, 0x77, 0x49, 0xda, 0x83, 0xe0, 0x2c, 0xb4, 0x34, 0x91, 0xf9, 0x16, 0xac, 0x3f, 0x23, 0x6c, + 0x97, 0xf8, 0x3e, 0x87, 0xf3, 0x84, 0xaf, 0x45, 0x32, 0x1f, 0x80, 0x31, 0x8e, 0x52, 0xc7, 0xd4, + 0x20, 0xc7, 0xab, 0x85, 0x7e, 0xba, 0x92, 0x0b, 0x73, 0x53, 0x88, 0xa4, 0x39, 0x12, 0xcd, 0x87, + 0x78, 0xdf, 0xc8, 0x0c, 0xdf, 0x37, 0xcc, 0x7d, 0x58, 0x19, 0xa1, 0x8c, 0xcb, 0x42, 0x91, 0xa3, + 0x6d, 0x2f, 0x38, 0x0b, 0x55, 0x5d, 0x48, 0xbc, 0x44, 0xc4, 0xe4, 0x05, 0x47, 0x7d, 0xf1, 0x4c, + 0xab, 0xf6, 0xa1, 0x2a, 0xd9, 0x68, 0xe9, 0x7f, 0xc8, 0xc4, 0x37, 0x1b, 0xa2, 0xd4, 0x31, 0x07, + 0xb0, 0x30, 0x9a, 0xc6, 0xb6, 0x12, 0xf6, 0x9a, 0xc2, 0xd4, 0x50, 0x6b, 0xe9, 0x18, 0x9a, 0xbf, + 0x7e, 0x04, 0xe5, 0x24, 0x62, 0x82, 0x6b, 0xdc, 0x1d, 0x75, 0x8d, 0xda, 0xe8, 0x7d, 0xe4, 0x31, + 0x49, 0xf7, 0x58, 0x15, 0xaa, 0xd1, 0x6e, 0x19, 0xdf, 0xe7, 0x00, 0x6a, 0xa3, 0x60, 0x75, 0x97, + 0x87, 0x50, 0xd4, 0x8e, 0xa2, 0x6f, 0x33, 0xb1, 0x94, 0x0e, 0xa9, 0xcc, 0x07, 0xc2, 0x4c, 0xaf, + 0x13, 0x73, 0xfb, 0x23, 0x32, 0x5d, 0xbf, 0x3b, 0xf9, 0xf5, 0x1c, 0x2c, 0x3d, 0x23, 0x4c, 0xb6, + 0x8e, 0x6f, 0xde, 0xe1, 0xaf, 0xa9, 0x59, 0x3b, 0x7e, 0x70, 0x90, 0x2b, 0xde, 0x9c, 0x90, 0x4b, + 0xd9, 0x9c, 0x28, 0x7c, 0x56, 0xe0, 0x2b, 0x0a, 0x7a, 0x2c, 0xc9, 0x6e, 0x81, 0xee, 0x56, 0xec, + 0xbe, 0x47, 0x2e, 0xa8, 0x2a, 0x95, 0x65, 0x05, 0x3c, 0xe1, 0x30, 0xb4, 0x09, 0x4b, 0xf2, 0xa5, + 0x4f, 0xb8, 0xb8, 0x1d, 0x06, 0xfe, 0x40, 0x24, 0xeb, 0x82, 0x7a, 0x58, 0x10, 0x71, 0xf1, 0xe3, + 0xc0, 0x1f, 0x0c, 0x29, 0xa9, 0xf7, 0x9d, 0xa6, 0xcc, 0x27, 0x28, 0x5b, 0x1c, 0xcc, 0x29, 0xcd, + 0x23, 0x91, 0x01, 0xb4, 0x16, 0x94, 0x32, 0x3f, 0x83, 0xbc, 0xea, 0xb5, 0xa5, 0x02, 0x6e, 0x35, + 0xc6, 0x5f, 0xa0, 0x25, 0xcb, 0x1e, 0x39, 0xf3, 0x02, 0x4f, 0xbd, 0x67, 0x09, 0x88, 0xf9, 0x02, + 0x16, 0xf9, 0x8e, 0xff, 0x9b, 0x96, 0xcf, 0x7c, 0x2c, 0xad, 0x34, 0x52, 0x50, 0xe2, 0x06, 0x2c, + 0x33, 0xb3, 0x01, 0x33, 0x9f, 0x8b, 0x88, 0x6c, 0x45, 0xfd, 0xb4, 0x07, 0xbf, 0x2a, 0xc5, 0xf1, + 0x98, 0xd6, 0x86, 0x94, 0x0b, 0xf3, 0x1f, 0x32, 0x86, 0x47, 0x37, 0x53, 0xf2, 0xfc, 0x0c, 0x2a, + 0x34, 0xea, 0xdb, 0x69, 0xdf, 0xff, 0x78, 0x34, 0x92, 0x27, 0xb1, 0x36, 0x92, 0x40, 0xfd, 0xb8, + 0x96, 0x00, 0xd5, 0x4f, 0x60, 0x79, 0x8c, 0x64, 0x42, 0x60, 0xdf, 0x1b, 0x0d, 0xec, 0x84, 0xc3, + 0x26, 0xb8, 0x93, 0x91, 0x7d, 0x57, 0x84, 0x70, 0x2b, 0xea, 0x9f, 0x8c, 0x06, 0xc0, 0xa4, 0x04, + 0x79, 0x08, 0xab, 0x29, 0xda, 0x78, 0xe0, 0xe4, 0xc2, 0x0e, 0x07, 0xb3, 0x38, 0xee, 0xd4, 0xaf, + 0x10, 0x09, 0x16, 0xa0, 0xf1, 0xb7, 0xf9, 0x42, 0x98, 0x54, 0x4d, 0x95, 0x6f, 0x1a, 0x78, 0xe6, + 0x17, 0xc2, 0x81, 0xf5, 0x6e, 0x4a, 0xb2, 0xcd, 0xf8, 0xe5, 0x6b, 0xda, 0x0c, 0xac, 0xf0, 0xe6, + 0x9f, 0x33, 0x09, 0xfe, 0xeb, 0x97, 0xc0, 0xa1, 0xd7, 0x64, 0x13, 0x5e, 0x23, 0x9e, 0x21, 0x59, + 0xe4, 0x39, 0x7a, 0x24, 0x51, 0xab, 0x09, 0x3d, 0x6c, 0xee, 0xea, 0x3d, 0xac, 0xf9, 0x44, 0x24, + 0xcd, 0x54, 0x6f, 0x8a, 0xee, 0xc2, 0x82, 0x24, 0x1b, 0x36, 0xee, 0xe9, 0x4b, 0x6b, 0x02, 0x73, + 0x4b, 0x5c, 0x3a, 0x65, 0xfb, 0x59, 0x59, 0xf7, 0xa9, 0x38, 0x32, 0xed, 0x00, 0x1f, 0x42, 0x21, + 0x65, 0xfc, 0xe5, 0xd8, 0xf8, 0xb1, 0xd7, 0x2d, 0xf4, 0x95, 0xdd, 0x2d, 0x91, 0xb9, 0xf5, 0x3b, + 0xd6, 0x95, 0x74, 0xfd, 0x2e, 0x94, 0xb0, 0xc3, 0xbc, 0x3e, 0x91, 0x29, 0x4c, 0xf6, 0xea, 0x20, + 0x41, 0x22, 0x7d, 0xc9, 0x52, 0x94, 0xd8, 0x73, 0x58, 0x8a, 0xf4, 0x4f, 0x33, 0x93, 0x4a, 0x91, + 0x66, 0xb0, 0x86, 0x54, 0xe6, 0xaf, 0xe0, 0x2d, 0x8b, 0x74, 0xc2, 0x7e, 0x3c, 0x29, 0xf1, 0x9a, + 0x78, 0x15, 0x21, 0x75, 0xcc, 0xcc, 0x25, 0x7e, 0x34, 0x99, 0x3c, 0xa9, 0x8e, 0x0c, 0x4c, 0xf3, + 0xe9, 0x51, 0xed, 0x1d, 0xa8, 0x4f, 0x12, 0x40, 0x8d, 0x1e, 0xdf, 0x67, 0x60, 0x4d, 0xa2, 0x45, + 0x8e, 0xbb, 0xaa, 0x70, 0xaf, 0x98, 0xa8, 0xb5, 0xec, 0xd9, 0x49, 0xb2, 0xcf, 0x4f, 0x95, 0x3d, + 0x97, 0x96, 0xfd, 0x2d, 0x58, 0x1f, 0x13, 0x4e, 0x09, 0xbe, 0x0f, 0xab, 0x7a, 0x2e, 0x18, 0x8d, + 0xf9, 0xfb, 0xa9, 0x20, 0x9d, 0xfd, 0x3c, 0x6d, 0xfe, 0x92, 0xdf, 0x7f, 0x74, 0x9f, 0x6b, 0x0f, + 0x18, 0x5b, 0xb0, 0x70, 0xa5, 0xb9, 0x42, 0x53, 0x99, 0xc7, 0xb0, 0xa1, 0x6a, 0x50, 0xfc, 0x3b, + 0x84, 0x7e, 0xb7, 0x7e, 0x83, 0xbe, 0xf9, 0x4f, 0x59, 0x78, 0x6f, 0xc6, 0xb6, 0xea, 0x7a, 0x97, + 0x50, 0x4b, 0xfe, 0xb2, 0x43, 0x19, 0x66, 0xbd, 0x61, 0xbf, 0xd8, 0x1c, 0xab, 0x7e, 0x33, 0xf6, + 0x4a, 0xfe, 0x8e, 0xd4, 0x52, 0xfb, 0xc8, 0xb2, 0xb3, 0x12, 0x8d, 0x63, 0xd0, 0x37, 0x00, 0x2a, + 0x4d, 0x75, 0x70, 0x57, 0xfd, 0xc4, 0xf1, 0xd9, 0x6b, 0x9d, 0x27, 0x95, 0xf9, 0x15, 0xee, 0xca, + 0x53, 0x8a, 0x4c, 0xaf, 0xeb, 0x36, 0x18, 0xd3, 0x84, 0x99, 0x50, 0xe0, 0xee, 0x8f, 0x16, 0xb8, + 0xf5, 0x46, 0xfa, 0x97, 0x72, 0xb9, 0x41, 0xf2, 0x57, 0xa3, 0x43, 0xa8, 0x8e, 0x9e, 0x7e, 0x95, + 0x59, 0x29, 0x9d, 0x31, 0x13, 0x25, 0xd3, 0x82, 0xf7, 0x24, 0xb0, 0xa9, 0x7e, 0xd2, 0xf4, 0xe3, + 0x79, 0x97, 0xb8, 0xd7, 0xf4, 0xe9, 0xbf, 0x67, 0xc0, 0x9c, 0xb5, 0xe9, 0xb5, 0x1d, 0xfc, 0xba, + 0x8f, 0x0a, 0x8f, 0xa0, 0x14, 0xfa, 0xc3, 0xa1, 0x7b, 0x7e, 0x26, 0x5f, 0xe8, 0xeb, 0x79, 0xfb, + 0xe9, 0xe6, 0x37, 0x77, 0xfa, 0x1e, 0x23, 0x94, 0x36, 0xbc, 0x70, 0x4b, 0x7e, 0x6d, 0xb5, 0xc3, + 0xad, 0x3e, 0xdb, 0x12, 0xff, 0x7c, 0xb0, 0x15, 0xfb, 0xcc, 0x69, 0x5e, 0x00, 0x3e, 0xfa, 0x6f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x6a, 0x1a, 0xcc, 0x39, 0x21, 0x00, 0x00, } diff --git a/go/vt/vtctl/workflow/server.go b/go/vt/vtctl/workflow/server.go index 788ca934e4c..16468234bcd 100644 --- a/go/vt/vtctl/workflow/server.go +++ b/go/vt/vtctl/workflow/server.go @@ -20,7 +20,9 @@ import ( "context" "errors" "fmt" + "sort" "strings" + "sync" "time" "github.com/golang/protobuf/proto" @@ -28,6 +30,7 @@ import ( "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/trace" + "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/vtctl/workflow/vexec" "vitess.io/vitess/go/vt/vtgate/evalengine" @@ -283,6 +286,147 @@ func (s *Server) GetWorkflows(ctx context.Context, req *vtctldatapb.GetWorkflows if err := scanWorkflow(ctx, workflow, row, tablet); err != nil { return nil, err } + + // Sort shard streams by stream_id ASC, to support an optimization + // in fetchStreamLogs below. + for _, shardStreams := range workflow.ShardStreams { + sort.Slice(shardStreams.Streams, func(i, j int) bool { + return shardStreams.Streams[i].Id < shardStreams.Streams[j].Id + }) + } + } + } + + var ( + wg sync.WaitGroup + vrepLogQuery = strings.TrimSpace(` +SELECT + id, + vrepl_id, + type, + state, + message, + created_at, + updated_at, + count +FROM + _vt.vreplication_log +ORDER BY + vrepl_id ASC, + id ASC +`) + ) + + fetchStreamLogs := func(ctx context.Context, workflow *vtctldatapb.Workflow) { + defer wg.Done() + + results, err := vx.WithWorkflow(workflow.Name).QueryContext(ctx, vrepLogQuery) + if err != nil { + // Note that we do not return here. If there are any query results + // in the map (i.e. some tablets returned successfully), we will + // still try to read log rows from them on a best-effort basis. But, + // we will also pre-emptively record the top-level fetch error on + // every stream in every shard in the workflow. Further processing + // below may override the error message for certain streams. + for _, streams := range workflow.ShardStreams { + for _, stream := range streams.Streams { + stream.LogFetchError = err.Error() + } + } + } + + for target, p3qr := range results { + qr := sqltypes.Proto3ToResult(p3qr) + shardStreamKey := fmt.Sprintf("%s/%s", target.Shard, target.AliasString()) + + ss, ok := workflow.ShardStreams[shardStreamKey] + if !ok || ss == nil { + continue + } + + streams := ss.Streams + streamIdx := 0 + markErrors := func(err error) { + if streamIdx >= len(streams) { + return + } + + streams[streamIdx].LogFetchError = err.Error() + } + + for _, row := range qr.Rows { + id, err := evalengine.ToInt64(row[0]) + if err != nil { + markErrors(err) + continue + } + + streamID, err := evalengine.ToInt64(row[1]) + if err != nil { + markErrors(err) + continue + } + + typ := row[2].ToString() + state := row[3].ToString() + message := row[4].ToString() + + createdAt, err := time.Parse("2006-01-02 15:04:05", row[5].ToString()) + if err != nil { + markErrors(err) + continue + } + + updatedAt, err := time.Parse("2006-01-02 15:04:05", row[6].ToString()) + if err != nil { + markErrors(err) + continue + } + + count, err := evalengine.ToInt64(row[7]) + if err != nil { + markErrors(err) + continue + } + + streamLog := &vtctldatapb.Workflow_Stream_Log{ + Id: id, + StreamId: streamID, + Type: typ, + State: state, + CreatedAt: &vttime.Time{ + Seconds: createdAt.Unix(), + }, + UpdatedAt: &vttime.Time{ + Seconds: updatedAt.Unix(), + }, + Message: message, + Count: count, + } + + // Earlier, in the main loop where we called scanWorkflow for + // each _vt.vreplication row, we also sorted each ShardStreams + // slice by ascending id, and our _vt.vreplication_log query + // ordered by (stream_id ASC, id ASC), so we can walk the + // streams in index order in O(n) amortized over all the rows + // for this tablet. + for streamIdx < len(streams) { + stream := streams[streamIdx] + if stream.Id < streamLog.StreamId { + streamIdx++ + continue + } + + if stream.Id > streamLog.StreamId { + log.Warningf("Found stream log for nonexistent stream: %+v", streamLog) + break + } + + // stream.Id == streamLog.StreamId + stream.Logs = append(stream.Logs, streamLog) + break + } + } } } @@ -326,9 +470,16 @@ func (s *Server) GetWorkflows(ctx context.Context, req *vtctldatapb.GetWorkflows workflow.MaxVReplicationLag = int64(maxVReplicationLag) + // Fetch logs for all streams associated with this workflow in the background. + wg.Add(1) + go fetchStreamLogs(ctx, workflow) + workflows = append(workflows, workflow) } + // Wait for all the log fetchers to finish. + wg.Wait() + return &vtctldatapb.GetWorkflowsResponse{ Workflows: workflows, }, nil diff --git a/go/vt/vtctl/workflow/vexec/query_plan.go b/go/vt/vtctl/workflow/vexec/query_plan.go index f71e124b786..8d2c5eac021 100644 --- a/go/vt/vtctl/workflow/vexec/query_plan.go +++ b/go/vt/vtctl/workflow/vexec/query_plan.go @@ -31,17 +31,28 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" ) -// QueryPlan wraps a planned query produced by a QueryPlanner. It is safe to -// execute a QueryPlan repeatedly and in multiple goroutines. -type QueryPlan struct { +// QueryPlan defines the interface to executing a preprared vexec query on one +// or more tablets. Implementations should ensure that it is safe to call the +// various Execute* methods repeatedly and in multiple goroutines. +type QueryPlan interface { + // Execute executes the planned query on a single target. + Execute(ctx context.Context, target *topo.TabletInfo) (*querypb.QueryResult, error) + // ExecuteScatter executes the planned query on the specified targets concurrently, + // returning a mapping of the target tablet to a querypb.QueryResult. + ExecuteScatter(ctx context.Context, targets ...*topo.TabletInfo) (map[*topo.TabletInfo]*querypb.QueryResult, error) +} + +// FixedQueryPlan wraps a planned query produced by a QueryPlanner. It executes +// the same query with the same bind vals, regardless of the target. +type FixedQueryPlan struct { ParsedQuery *sqlparser.ParsedQuery workflow string tmc tmclient.TabletManagerClient } -// Execute executes a QueryPlan on a single target. -func (qp *QueryPlan) Execute(ctx context.Context, target *topo.TabletInfo) (qr *querypb.QueryResult, err error) { +// Execute is part of the QueryPlan interface. +func (qp *FixedQueryPlan) Execute(ctx context.Context, target *topo.TabletInfo) (qr *querypb.QueryResult, err error) { if qp.ParsedQuery == nil { return nil, fmt.Errorf("%w: call PlanQuery on a query planner first", ErrUnpreparedQuery) } @@ -71,10 +82,10 @@ func (qp *QueryPlan) Execute(ctx context.Context, target *topo.TabletInfo) (qr * return qr, nil } -// ExecuteScatter executes a QueryPlan on multiple targets concurrently, -// returning a mapping of target tablet to querypb.QueryResult. Errors from -// individual targets are aggregated into a singular error. -func (qp *QueryPlan) ExecuteScatter(ctx context.Context, targets ...*topo.TabletInfo) (map[*topo.TabletInfo]*querypb.QueryResult, error) { +// ExecuteScatter is part of the QueryPlan interface. For a FixedQueryPlan, the +// exact same query is executed on each target, and errors from individual +// targets are aggregated into a singular error. +func (qp *FixedQueryPlan) ExecuteScatter(ctx context.Context, targets ...*topo.TabletInfo) (map[*topo.TabletInfo]*querypb.QueryResult, error) { if qp.ParsedQuery == nil { // This check is an "optimization" on error handling. We check here, // even though we will check this during the individual Execute calls, @@ -114,3 +125,88 @@ func (qp *QueryPlan) ExecuteScatter(ctx context.Context, targets ...*topo.Tablet return results, rec.AggrError(vterrors.Aggregate) } + +// PerTargetQueryPlan implements the QueryPlan interface. Unlike FixedQueryPlan, +// this implementation implements different queries, keyed by tablet alias, on +// different targets. +// +// It is the callers responsibility to ensure that the shape of the QueryResult +// (i.e. fields returned) is consistent for each target's planned query, but +// this is not enforced. +type PerTargetQueryPlan struct { + ParsedQueries map[string]*sqlparser.ParsedQuery + + tmc tmclient.TabletManagerClient +} + +// Execute is part of the QueryPlan interface. +// +// It returns ErrUnpreparedQuery if there is no ParsedQuery for the target's +// tablet alias. +func (qp *PerTargetQueryPlan) Execute(ctx context.Context, target *topo.TabletInfo) (qr *querypb.QueryResult, err error) { + if qp.ParsedQueries == nil { + return nil, fmt.Errorf("%w: call PlanQuery on a query planner first", ErrUnpreparedQuery) + } + + targetAliasStr := target.AliasString() + query, ok := qp.ParsedQueries[targetAliasStr] + if !ok { + return nil, fmt.Errorf("%w: no prepared query for target %s", ErrUnpreparedQuery, targetAliasStr) + } + + defer func() { + if err != nil { + log.Warningf("Result on %v: %v", targetAliasStr, err) + return + } + }() + + qr, err = qp.tmc.VReplicationExec(ctx, target.Tablet, query.Query) + if err != nil { + return nil, err + } + + return qr, nil +} + +// ExecuteScatter is part of the QueryPlan interface. +func (qp *PerTargetQueryPlan) ExecuteScatter(ctx context.Context, targets ...*topo.TabletInfo) (map[*topo.TabletInfo]*querypb.QueryResult, error) { + if qp.ParsedQueries == nil { + // This check is an "optimization" on error handling. We check here, + // even though we will check this during the individual Execute calls, + // so that we return one error, rather than the same error aggregated + // len(targets) times. + return nil, fmt.Errorf("%w: call PlanQuery on a query planner first", ErrUnpreparedQuery) + } + + var ( + m sync.Mutex + wg sync.WaitGroup + rec concurrency.AllErrorRecorder + results = make(map[*topo.TabletInfo]*querypb.QueryResult, len(targets)) + ) + + for _, target := range targets { + wg.Add(1) + + go func(ctx context.Context, target *topo.TabletInfo) { + defer wg.Done() + + qr, err := qp.Execute(ctx, target) + if err != nil { + rec.RecordError(err) + + return + } + + m.Lock() + defer m.Unlock() + + results[target] = qr + }(ctx, target) + } + + wg.Wait() + + return results, rec.AggrError(vterrors.Aggregate) +} diff --git a/go/vt/vtctl/workflow/vexec/query_plan_test.go b/go/vt/vtctl/workflow/vexec/query_plan_test.go index ec4f6fab95d..6fffe24aef6 100644 --- a/go/vt/vtctl/workflow/vexec/query_plan_test.go +++ b/go/vt/vtctl/workflow/vexec/query_plan_test.go @@ -36,7 +36,7 @@ func TestQueryPlanExecute(t *testing.T) { tests := []struct { name string - plan QueryPlan + plan FixedQueryPlan target *topo.TabletInfo expected *querypb.QueryResult shouldErr bool @@ -44,7 +44,7 @@ func TestQueryPlanExecute(t *testing.T) { }{ { name: "success", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: &sqlparser.ParsedQuery{ Query: "SELECT id FROM _vt.vreplication", }, @@ -78,7 +78,7 @@ func TestQueryPlanExecute(t *testing.T) { }, { name: "no rows affected", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: &sqlparser.ParsedQuery{ Query: "SELECT id FROM _vt.vreplication", }, @@ -112,7 +112,7 @@ func TestQueryPlanExecute(t *testing.T) { }, { name: "error", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: &sqlparser.ParsedQuery{ Query: "SELECT id FROM _vt.vreplication", }, @@ -142,7 +142,7 @@ func TestQueryPlanExecute(t *testing.T) { }, { name: "unprepared query", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: nil, }, shouldErr: true, @@ -180,7 +180,7 @@ func TestQueryPlanExecuteScatter(t *testing.T) { tests := []struct { name string - plan QueryPlan + plan FixedQueryPlan targets []*topo.TabletInfo // This is different from our actual return type because guaranteeing // exact pointers in this table-driven style is a bit tough. @@ -190,7 +190,7 @@ func TestQueryPlanExecuteScatter(t *testing.T) { }{ { name: "success", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: &sqlparser.ParsedQuery{ Query: "SELECT id FROM _vt.vreplication", }, @@ -246,7 +246,7 @@ func TestQueryPlanExecuteScatter(t *testing.T) { }, { name: "some targets fail", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: &sqlparser.ParsedQuery{ Query: "SELECT id FROM _vt.vreplication", }, @@ -292,7 +292,7 @@ func TestQueryPlanExecuteScatter(t *testing.T) { }, { name: "unprepared query", - plan: QueryPlan{ + plan: FixedQueryPlan{ ParsedQuery: nil, }, shouldErr: true, diff --git a/go/vt/vtctl/workflow/vexec/query_planner.go b/go/vt/vtctl/workflow/vexec/query_planner.go index a850cc9816a..b271e065b3e 100644 --- a/go/vt/vtctl/workflow/vexec/query_planner.go +++ b/go/vt/vtctl/workflow/vexec/query_planner.go @@ -62,7 +62,7 @@ type QueryPlanner interface { // PlanQuery constructs and returns a QueryPlan for a given statement. The // resulting QueryPlan is suitable for repeated, concurrent use. - PlanQuery(stmt sqlparser.Statement) (*QueryPlan, error) + PlanQuery(stmt sqlparser.Statement) (QueryPlan, error) // QueryParams returns a struct of column parameters the QueryPlanner uses. // It is used primarily to abstract the adding of default WHERE clauses to // queries by a private function of this package, and may be removed from @@ -116,7 +116,7 @@ func NewVReplicationQueryPlanner(tmc tmclient.TabletManagerClient, workflow stri // // For DELETE queries, USING, PARTITION, ORDER BY, and LIMIT clauses are not // supported. -func (planner *VReplicationQueryPlanner) PlanQuery(stmt sqlparser.Statement) (plan *QueryPlan, err error) { +func (planner *VReplicationQueryPlanner) PlanQuery(stmt sqlparser.Statement) (plan QueryPlan, err error) { switch stmt := stmt.(type) { case *sqlparser.Select: plan, err = planner.planSelect(stmt) @@ -152,7 +152,7 @@ func (planner *VReplicationQueryPlanner) QueryParams() QueryParams { } } -func (planner *VReplicationQueryPlanner) planDelete(del *sqlparser.Delete) (*QueryPlan, error) { +func (planner *VReplicationQueryPlanner) planDelete(del *sqlparser.Delete) (*FixedQueryPlan, error) { if del.Targets != nil { return nil, fmt.Errorf( "%w: DELETE must not have USING clause (have: %v): %v", @@ -186,27 +186,27 @@ func (planner *VReplicationQueryPlanner) planDelete(del *sqlparser.Delete) (*Que buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("%v", del) - return &QueryPlan{ + return &FixedQueryPlan{ ParsedQuery: buf.ParsedQuery(), workflow: planner.workflow, tmc: planner.tmc, }, nil } -func (planner *VReplicationQueryPlanner) planSelect(sel *sqlparser.Select) (*QueryPlan, error) { +func (planner *VReplicationQueryPlanner) planSelect(sel *sqlparser.Select) (*FixedQueryPlan, error) { sel.Where = addDefaultWheres(planner, sel.Where) buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("%v", sel) - return &QueryPlan{ + return &FixedQueryPlan{ ParsedQuery: buf.ParsedQuery(), workflow: planner.workflow, tmc: planner.tmc, }, nil } -func (planner *VReplicationQueryPlanner) planUpdate(upd *sqlparser.Update) (*QueryPlan, error) { +func (planner *VReplicationQueryPlanner) planUpdate(upd *sqlparser.Update) (*FixedQueryPlan, error) { if upd.OrderBy != nil || upd.Limit != nil { return nil, fmt.Errorf( "%w: UPDATE must not have explicit ordering (have: %v) or limit clauses (have: %v): %v", @@ -235,13 +235,145 @@ func (planner *VReplicationQueryPlanner) planUpdate(upd *sqlparser.Update) (*Que buf := sqlparser.NewTrackedBuffer(nil) buf.Myprintf("%v", upd) - return &QueryPlan{ + return &FixedQueryPlan{ ParsedQuery: buf.ParsedQuery(), workflow: planner.workflow, tmc: planner.tmc, }, nil } +// VReplicationLogQueryPlanner implements the QueryPlanner interface for queries +// on the _vt.vreplication_log table. +type VReplicationLogQueryPlanner struct { + tmc tmclient.TabletManagerClient + tabletStreamIDs map[string][]int64 +} + +// NewVReplicationLogQueryPlanner returns a new VReplicationLogQueryPlanner. The +// tabletStreamIDs map determines what stream_ids are expected to have vrep_log +// rows, keyed by tablet alias string. +func NewVReplicationLogQueryPlanner(tmc tmclient.TabletManagerClient, tabletStreamIDs map[string][]int64) *VReplicationLogQueryPlanner { + return &VReplicationLogQueryPlanner{ + tmc: tmc, + tabletStreamIDs: tabletStreamIDs, + } +} + +// PlanQuery is part of the QueryPlanner interface. +// +// For vreplication_log query planners, only SELECT queries are supported. +func (planner *VReplicationLogQueryPlanner) PlanQuery(stmt sqlparser.Statement) (plan QueryPlan, err error) { + switch stmt := stmt.(type) { + case *sqlparser.Select: + plan, err = planner.planSelect(stmt) + case *sqlparser.Insert: + err = ErrUnsupportedQuery + case *sqlparser.Update: + err = ErrUnsupportedQuery + case *sqlparser.Delete: + err = ErrUnsupportedQuery + default: + err = ErrUnsupportedQuery + } + + if err != nil { + return nil, fmt.Errorf("%w: %s", err, sqlparser.String(stmt)) + } + + return plan, nil +} + +// QueryParams is part of the QueryPlanner interface. +func (planner *VReplicationLogQueryPlanner) QueryParams() QueryParams { + return QueryParams{} +} + +func (planner *VReplicationLogQueryPlanner) planSelect(sel *sqlparser.Select) (QueryPlan, error) { + where := sel.Where + cols := extractWhereComparisonColumns(where) + hasVReplIDCol := false + + for _, col := range cols { + if col == "vrepl_id" { + hasVReplIDCol = true + } + } + + if hasVReplIDCol { // we're not injecting per-target parameters, return a Fixed plan + buf := sqlparser.NewTrackedBuffer(nil) + buf.Myprintf("%v", sel) + + return &FixedQueryPlan{ + ParsedQuery: buf.ParsedQuery(), + tmc: planner.tmc, + }, nil + } + + // Construct a where clause to filter by vrepl_id, parameterized by target + // streamIDs. + queriesByTarget := make(map[string]*sqlparser.ParsedQuery, len(planner.tabletStreamIDs)) + for target, streamIDs := range planner.tabletStreamIDs { + targetWhere := &sqlparser.Where{ + Type: sqlparser.WhereClause, + } + + var expr sqlparser.Expr + switch len(streamIDs) { + case 0: // WHERE vreplication_log.vrepl_id IN () => WHERE 1 != 1 + one := sqlparser.NewIntLiteral("1") + expr = &sqlparser.ComparisonExpr{ + Operator: sqlparser.NotEqualOp, + Left: one, + Right: one, + } + case 1: // WHERE vreplication_log.vrepl_id = ? + expr = &sqlparser.ComparisonExpr{ + Operator: sqlparser.EqualOp, + Left: &sqlparser.ColName{ + Name: sqlparser.NewColIdent("vrepl_id"), + }, + Right: sqlparser.NewIntLiteral(fmt.Sprintf("%d", streamIDs[0])), + } + default: // WHERE vreplication_log.vrepl_id IN (?) + vals := []sqlparser.Expr{} + for _, streamID := range streamIDs { + vals = append(vals, sqlparser.NewIntLiteral(fmt.Sprintf("%d", streamID))) + } + + var tuple sqlparser.ValTuple = vals + expr = &sqlparser.ComparisonExpr{ + Operator: sqlparser.InOp, + Left: &sqlparser.ColName{ + Name: sqlparser.NewColIdent("vrepl_id"), + }, + Right: tuple, + } + } + + switch where { + case nil: + targetWhere.Expr = expr + default: + targetWhere.Expr = &sqlparser.AndExpr{ + Left: expr, + Right: where.Expr, + } + } + + sel.Where = targetWhere + + buf := sqlparser.NewTrackedBuffer(nil) + buf.Myprintf("%v", sel) + + queriesByTarget[target] = buf.ParsedQuery() + } + + return &PerTargetQueryPlan{ + ParsedQueries: queriesByTarget, + tmc: planner.tmc, + }, nil +} + func addDefaultWheres(planner QueryPlanner, where *sqlparser.Where) *sqlparser.Where { cols := extractWhereComparisonColumns(where) diff --git a/go/vt/vtctl/workflow/vexec/query_planner_test.go b/go/vt/vtctl/workflow/vexec/query_planner_test.go index a63fbb96a65..99d44f470ea 100644 --- a/go/vt/vtctl/workflow/vexec/query_planner_test.go +++ b/go/vt/vtctl/workflow/vexec/query_planner_test.go @@ -21,7 +21,9 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vtctl/workflow/vexec/testutil" ) @@ -122,7 +124,9 @@ func TestVReplicationQueryPlanner_planSelect(t *testing.T) { qp, err := planner.PlanQuery(stmt) assert.NoError(t, err) - assert.Equal(t, testutil.ParsedQueryFromString(t, tt.expectedPlannedQuery), qp.ParsedQuery) + fixedqp, ok := qp.(*FixedQueryPlan) + require.True(t, ok, "VReplicationQueryPlanner should always return a FixedQueryPlan from PlanQuery, got %T", qp) + assert.Equal(t, testutil.ParsedQueryFromString(t, tt.expectedPlannedQuery), fixedqp.ParsedQuery) }) } } @@ -179,7 +183,9 @@ func TestVReplicationQueryPlanner_planUpdate(t *testing.T) { return } - assert.Equal(t, testutil.ParsedQueryFromString(t, tt.expectedPlannedQuery), qp.ParsedQuery) + fixedqp, ok := qp.(*FixedQueryPlan) + require.True(t, ok, "VReplicationQueryPlanner should always return a FixedQueryPlan from PlanQuery, got %T", qp) + assert.Equal(t, testutil.ParsedQueryFromString(t, tt.expectedPlannedQuery), fixedqp.ParsedQuery) }) } } @@ -238,7 +244,140 @@ func TestVReplicationQueryPlanner_planDelete(t *testing.T) { return } - assert.Equal(t, testutil.ParsedQueryFromString(t, tt.expectedPlannedQuery), qp.ParsedQuery) + fixedqp, ok := qp.(*FixedQueryPlan) + require.True(t, ok, "VReplicationQueryPlanner should always return a FixedQueryPlan from PlanQuery, got %T", qp) + assert.Equal(t, testutil.ParsedQueryFromString(t, tt.expectedPlannedQuery), fixedqp.ParsedQuery) }) } } + +func TestVReplicationLogQueryPlanner(t *testing.T) { + t.Parallel() + + t.Run("planSelect", func(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + targetStreamIDs map[string][]int64 + query string + assertion func(t *testing.T, plan QueryPlan) + shouldErr bool + }{ + { + targetStreamIDs: map[string][]int64{ + "a": {1, 2}, + }, + query: "select * from _vt.vreplication_log", + assertion: func(t *testing.T, plan QueryPlan) { + t.Helper() + qp, ok := plan.(*PerTargetQueryPlan) + if !ok { + require.FailNow(t, "failed type check", "expected plan to be PerTargetQueryPlan, got %T: %v", plan, plan) + } + + expected := map[string]string{ + "a": "select * from _vt.vreplication_log where vrepl_id in (1, 2)", + } + assertQueryMapsMatch(t, expected, qp.ParsedQueries) + }, + }, + { + targetStreamIDs: map[string][]int64{ + "a": nil, + }, + query: "select * from _vt.vreplication_log", + assertion: func(t *testing.T, plan QueryPlan) { + t.Helper() + qp, ok := plan.(*PerTargetQueryPlan) + if !ok { + require.FailNow(t, "failed type check", "expected plan to be PerTargetQueryPlan, got %T: %v", plan, plan) + } + + expected := map[string]string{ + "a": "select * from _vt.vreplication_log where 1 != 1", + } + assertQueryMapsMatch(t, expected, qp.ParsedQueries) + }, + }, + { + targetStreamIDs: map[string][]int64{ + "a": {1}, + }, + query: "select * from _vt.vreplication_log", + assertion: func(t *testing.T, plan QueryPlan) { + t.Helper() + qp, ok := plan.(*PerTargetQueryPlan) + if !ok { + require.FailNow(t, "failed type check", "expected plan to be PerTargetQueryPlan, got %T: %v", plan, plan) + } + + expected := map[string]string{ + "a": "select * from _vt.vreplication_log where vrepl_id = 1", + } + assertQueryMapsMatch(t, expected, qp.ParsedQueries) + }, + }, + { + query: "select * from _vt.vreplication_log where vrepl_id = 1", + assertion: func(t *testing.T, plan QueryPlan) { + t.Helper() + qp, ok := plan.(*FixedQueryPlan) + if !ok { + require.FailNow(t, "failed type check", "expected plan to be FixedQueryPlan, got %T: %v", plan, plan) + } + + assert.Equal(t, "select * from _vt.vreplication_log where vrepl_id = 1", qp.ParsedQuery.Query) + }, + }, + { + targetStreamIDs: map[string][]int64{ + "a": {1, 2}, + }, + query: "select * from _vt.vreplication_log where foo = 'bar'", + assertion: func(t *testing.T, plan QueryPlan) { + t.Helper() + qp, ok := plan.(*PerTargetQueryPlan) + if !ok { + require.FailNow(t, "failed type check", "expected plan to be PerTargetQueryPlan, got %T: %v", plan, plan) + } + + expected := map[string]string{ + "a": "select * from _vt.vreplication_log where vrepl_id in (1, 2) and foo = 'bar'", + } + assertQueryMapsMatch(t, expected, qp.ParsedQueries) + }, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + planner := NewVReplicationLogQueryPlanner(nil, tt.targetStreamIDs) + stmt, err := sqlparser.Parse(tt.query) + require.NoError(t, err, "could not parse query %q", tt.query) + qp, err := planner.planSelect(stmt.(*sqlparser.Select)) + if tt.shouldErr { + assert.Error(t, err) + return + } + + tt.assertion(t, qp) + }) + } + }) +} + +func assertQueryMapsMatch(t *testing.T, expected map[string]string, actual map[string]*sqlparser.ParsedQuery, msgAndArgs ...interface{}) { + t.Helper() + + actualQueryMap := make(map[string]string, len(actual)) + for k, v := range actual { + actualQueryMap[k] = v.Query + } + + assert.Equal(t, expected, actualQueryMap, msgAndArgs...) +} diff --git a/go/vt/vtctl/workflow/vexec/vexec.go b/go/vt/vtctl/workflow/vexec/vexec.go index d61bd16ab31..93c5359d068 100644 --- a/go/vt/vtctl/workflow/vexec/vexec.go +++ b/go/vt/vtctl/workflow/vexec/vexec.go @@ -21,9 +21,11 @@ import ( "errors" "fmt" + "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/vtgate/evalengine" "vitess.io/vitess/go/vt/vttablet/tmclient" querypb "vitess.io/vitess/go/vt/proto/query" @@ -37,6 +39,9 @@ const ( // SchemaMigrationsTableName is the unqualified name of the schema // migrations table supported by vexec. SchemaMigrationsTableName = "schema_migrations" + // VReplicationLogTableName is the unqualified name of the vreplication_log + // table supported by vexec. + VReplicationLogTableName = "vreplication_log" // VReplicationTableName is the unqualified name of the vreplication table // supported by vexec. VReplicationTableName = "vreplication" @@ -208,6 +213,30 @@ func (vx *VExec) GetPlanner(ctx context.Context, table string) (QueryPlanner, er switch table { case qualifiedTableName(VReplicationTableName): return NewVReplicationQueryPlanner(vx.tmc, vx.workflow, vx.primaries[0].DbName()), nil + case qualifiedTableName(VReplicationLogTableName): + results, err := vx.QueryContext(ctx, "select id from _vt.vreplication") + if err != nil { + return nil, err + } + + tabletStreamIDMap := make(map[string][]int64, len(results)) + + for tablet, p3qr := range results { + qr := sqltypes.Proto3ToResult(p3qr) + aliasStr := tablet.AliasString() + tabletStreamIDMap[aliasStr] = make([]int64, len(qr.Rows)) + + for i, row := range qr.Rows { + id, err := evalengine.ToInt64(row[0]) + if err != nil { + return nil, err + } + + tabletStreamIDMap[aliasStr][i] = id + } + } + + return NewVReplicationLogQueryPlanner(vx.tmc, tabletStreamIDMap), nil case qualifiedTableName(SchemaMigrationsTableName): return nil, errors.New("Schema Migrations not yet supported in new workflow package") default: @@ -215,6 +244,18 @@ func (vx *VExec) GetPlanner(ctx context.Context, table string) (QueryPlanner, er } } +// WithWorkflow returns a copy of VExec with the Workflow field updated. Used so +// callers to reuse a VExec's primaries list without needing to initialize a new +// VExec instance. +func (vx *VExec) WithWorkflow(workflow string) *VExec { + return &VExec{ + ts: vx.ts, + tmc: vx.tmc, + primaries: vx.primaries, + workflow: workflow, + } +} + func extractTableName(stmt sqlparser.Statement) (string, error) { switch stmt := stmt.(type) { case *sqlparser.Update: diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 11dad194c0b..8a308cff6e7 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -117,11 +117,32 @@ message Workflow { vttime.Time time_updated = 10; string message = 11; repeated CopyState copy_states = 12; + repeated Log logs = 13; + // LogFetchError is set if we fail to fetch some logs for this stream. We + // will never fail to fetch workflows because we cannot fetch the logs, but + // we will still forward log-fetch errors to the caller, should that be + // relevant to the context in which they are fetching workflows. + // + // Note that this field being set does not necessarily mean that Logs is nil; + // if there are N logs that exist for the stream, and we fail to fetch the + // ith log, we will still return logs in [0, i) + (i, N]. + string log_fetch_error = 14; message CopyState { string table = 1; string last_pk = 2; } + + message Log { + int64 id = 1; + int64 stream_id = 2; + string type = 3; + string state = 4; + vttime.Time created_at = 5; + vttime.Time updated_at = 6; + string message = 7; + int64 count = 8; + } } } diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index c7934445dc0..a83424c05ba 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -1,8 +1,10 @@ -import * as $protobuf from 'protobufjs'; +import * as $protobuf from "protobufjs"; /** Namespace vtadmin. */ export namespace vtadmin { + /** Represents a VTAdmin */ class VTAdmin extends $protobuf.rpc.Service { + /** * Constructs a new VTAdmin service. * @param rpcImpl RPC implementation @@ -18,11 +20,7 @@ export namespace vtadmin { * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static create( - rpcImpl: $protobuf.RPCImpl, - requestDelimited?: boolean, - responseDelimited?: boolean - ): VTAdmin; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): VTAdmin; /** * Calls GetGates. @@ -68,39 +66,42 @@ export namespace vtadmin { } namespace VTAdmin { + /** * Callback as used by {@link vtadmin.VTAdmin#getGates}. * @param error Error, if any * @param [response] GetGatesResponse */ - type GetGatesCallback = (error: Error | null, response?: vtadmin.GetGatesResponse) => void; + type GetGatesCallback = (error: (Error|null), response?: vtadmin.GetGatesResponse) => void; /** * Callback as used by {@link vtadmin.VTAdmin#getTablet}. * @param error Error, if any * @param [response] Tablet */ - type GetTabletCallback = (error: Error | null, response?: vtadmin.Tablet) => void; + type GetTabletCallback = (error: (Error|null), response?: vtadmin.Tablet) => void; /** * Callback as used by {@link vtadmin.VTAdmin#getTablets}. * @param error Error, if any * @param [response] GetTabletsResponse */ - type GetTabletsCallback = (error: Error | null, response?: vtadmin.GetTabletsResponse) => void; + type GetTabletsCallback = (error: (Error|null), response?: vtadmin.GetTabletsResponse) => void; } /** Properties of a Cluster. */ interface ICluster { + /** Cluster id */ - id?: string | null; + id?: (string|null); /** Cluster name */ - name?: string | null; + name?: (string|null); } /** Represents a Cluster. */ class Cluster implements ICluster { + /** * Constructs a new Cluster. * @param [properties] Properties to set @@ -144,7 +145,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.Cluster; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.Cluster; /** * Decodes a Cluster message from the specified reader or buffer, length delimited. @@ -153,14 +154,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.Cluster; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.Cluster; /** * Verifies a Cluster message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Cluster message from a plain object. Also converts values to their respective internal types. @@ -186,18 +187,20 @@ export namespace vtadmin { /** Properties of a Tablet. */ interface ITablet { + /** Tablet cluster */ - cluster?: vtadmin.ICluster | null; + cluster?: (vtadmin.ICluster|null); /** Tablet tablet */ - tablet?: topodata.ITablet | null; + tablet?: (topodata.ITablet|null); /** Tablet state */ - state?: vtadmin.Tablet.ServingState | null; + state?: (vtadmin.Tablet.ServingState|null); } /** Represents a Tablet. */ class Tablet implements ITablet { + /** * Constructs a new Tablet. * @param [properties] Properties to set @@ -205,10 +208,10 @@ export namespace vtadmin { constructor(properties?: vtadmin.ITablet); /** Tablet cluster. */ - public cluster?: vtadmin.ICluster | null; + public cluster?: (vtadmin.ICluster|null); /** Tablet tablet. */ - public tablet?: topodata.ITablet | null; + public tablet?: (topodata.ITablet|null); /** Tablet state. */ public state: vtadmin.Tablet.ServingState; @@ -244,7 +247,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.Tablet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.Tablet; /** * Decodes a Tablet message from the specified reader or buffer, length delimited. @@ -253,14 +256,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.Tablet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.Tablet; /** * Verifies a Tablet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Tablet message from a plain object. Also converts values to their respective internal types. @@ -285,34 +288,37 @@ export namespace vtadmin { } namespace Tablet { + /** ServingState enum. */ enum ServingState { UNKNOWN = 0, SERVING = 1, - NOT_SERVING = 2, + NOT_SERVING = 2 } } /** Properties of a VTGate. */ interface IVTGate { + /** VTGate hostname */ - hostname?: string | null; + hostname?: (string|null); /** VTGate pool */ - pool?: string | null; + pool?: (string|null); /** VTGate cell */ - cell?: string | null; + cell?: (string|null); /** VTGate cluster */ - cluster?: string | null; + cluster?: (vtadmin.ICluster|null); /** VTGate keyspaces */ - keyspaces?: string[] | null; + keyspaces?: (string[]|null); } /** Represents a VTGate. */ class VTGate implements IVTGate { + /** * Constructs a new VTGate. * @param [properties] Properties to set @@ -329,7 +335,7 @@ export namespace vtadmin { public cell: string; /** VTGate cluster. */ - public cluster: string; + public cluster?: (vtadmin.ICluster|null); /** VTGate keyspaces. */ public keyspaces: string[]; @@ -365,7 +371,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.VTGate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.VTGate; /** * Decodes a VTGate message from the specified reader or buffer, length delimited. @@ -374,14 +380,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.VTGate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.VTGate; /** * Verifies a VTGate message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a VTGate message from a plain object. Also converts values to their respective internal types. @@ -407,12 +413,14 @@ export namespace vtadmin { /** Properties of a GetGatesRequest. */ interface IGetGatesRequest { + /** GetGatesRequest cluster_ids */ - cluster_ids?: string[] | null; + cluster_ids?: (string[]|null); } /** Represents a GetGatesRequest. */ class GetGatesRequest implements IGetGatesRequest { + /** * Constructs a new GetGatesRequest. * @param [properties] Properties to set @@ -453,7 +461,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.GetGatesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetGatesRequest; /** * Decodes a GetGatesRequest message from the specified reader or buffer, length delimited. @@ -462,14 +470,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.GetGatesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetGatesRequest; /** * Verifies a GetGatesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a GetGatesRequest message from a plain object. Also converts values to their respective internal types. @@ -484,10 +492,7 @@ export namespace vtadmin { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: vtadmin.GetGatesRequest, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetGatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetGatesRequest to JSON. @@ -498,12 +503,14 @@ export namespace vtadmin { /** Properties of a GetGatesResponse. */ interface IGetGatesResponse { + /** GetGatesResponse gates */ - gates?: vtadmin.IVTGate[] | null; + gates?: (vtadmin.IVTGate[]|null); } /** Represents a GetGatesResponse. */ class GetGatesResponse implements IGetGatesResponse { + /** * Constructs a new GetGatesResponse. * @param [properties] Properties to set @@ -544,7 +551,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.GetGatesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetGatesResponse; /** * Decodes a GetGatesResponse message from the specified reader or buffer, length delimited. @@ -553,14 +560,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.GetGatesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetGatesResponse; /** * Verifies a GetGatesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a GetGatesResponse message from a plain object. Also converts values to their respective internal types. @@ -575,10 +582,7 @@ export namespace vtadmin { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: vtadmin.GetGatesResponse, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetGatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetGatesResponse to JSON. @@ -589,15 +593,17 @@ export namespace vtadmin { /** Properties of a GetTabletRequest. */ interface IGetTabletRequest { + /** GetTabletRequest hostname */ - hostname?: string | null; + hostname?: (string|null); /** GetTabletRequest cluster_ids */ - cluster_ids?: string[] | null; + cluster_ids?: (string[]|null); } /** Represents a GetTabletRequest. */ class GetTabletRequest implements IGetTabletRequest { + /** * Constructs a new GetTabletRequest. * @param [properties] Properties to set @@ -641,7 +647,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.GetTabletRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletRequest; /** * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. @@ -650,14 +656,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.GetTabletRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletRequest; /** * Verifies a GetTabletRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. @@ -672,10 +678,7 @@ export namespace vtadmin { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: vtadmin.GetTabletRequest, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetTabletRequest to JSON. @@ -686,12 +689,14 @@ export namespace vtadmin { /** Properties of a GetTabletsRequest. */ interface IGetTabletsRequest { + /** GetTabletsRequest cluster_ids */ - cluster_ids?: string[] | null; + cluster_ids?: (string[]|null); } /** Represents a GetTabletsRequest. */ class GetTabletsRequest implements IGetTabletsRequest { + /** * Constructs a new GetTabletsRequest. * @param [properties] Properties to set @@ -732,7 +737,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.GetTabletsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletsRequest; /** * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. @@ -741,14 +746,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.GetTabletsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletsRequest; /** * Verifies a GetTabletsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. @@ -763,10 +768,7 @@ export namespace vtadmin { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: vtadmin.GetTabletsRequest, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetTabletsRequest to JSON. @@ -777,12 +779,14 @@ export namespace vtadmin { /** Properties of a GetTabletsResponse. */ interface IGetTabletsResponse { + /** GetTabletsResponse tablets */ - tablets?: vtadmin.ITablet[] | null; + tablets?: (vtadmin.ITablet[]|null); } /** Represents a GetTabletsResponse. */ class GetTabletsResponse implements IGetTabletsResponse { + /** * Constructs a new GetTabletsResponse. * @param [properties] Properties to set @@ -813,10 +817,7 @@ export namespace vtadmin { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: vtadmin.IGetTabletsResponse, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a GetTabletsResponse message from the specified reader or buffer. @@ -826,7 +827,7 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vtadmin.GetTabletsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletsResponse; /** * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. @@ -835,14 +836,14 @@ export namespace vtadmin { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vtadmin.GetTabletsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletsResponse; /** * Verifies a GetTabletsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. @@ -857,10 +858,7 @@ export namespace vtadmin { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: vtadmin.GetTabletsResponse, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetTabletsResponse to JSON. @@ -872,17 +870,20 @@ export namespace vtadmin { /** Namespace topodata. */ export namespace topodata { + /** Properties of a KeyRange. */ interface IKeyRange { + /** KeyRange start */ - start?: Uint8Array | null; + start?: (Uint8Array|null); /** KeyRange end */ - end?: Uint8Array | null; + end?: (Uint8Array|null); } /** Represents a KeyRange. */ class KeyRange implements IKeyRange { + /** * Constructs a new KeyRange. * @param [properties] Properties to set @@ -926,7 +927,7 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.KeyRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.KeyRange; /** * Decodes a KeyRange message from the specified reader or buffer, length delimited. @@ -935,14 +936,14 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.KeyRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.KeyRange; /** * Verifies a KeyRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. @@ -957,10 +958,7 @@ export namespace topodata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.KeyRange, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.KeyRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this KeyRange to JSON. @@ -972,27 +970,29 @@ export namespace topodata { /** KeyspaceType enum. */ enum KeyspaceType { NORMAL = 0, - SNAPSHOT = 1, + SNAPSHOT = 1 } /** KeyspaceIdType enum. */ enum KeyspaceIdType { UNSET = 0, UINT64 = 1, - BYTES = 2, + BYTES = 2 } /** Properties of a TabletAlias. */ interface ITabletAlias { + /** TabletAlias cell */ - cell?: string | null; + cell?: (string|null); /** TabletAlias uid */ - uid?: number | null; + uid?: (number|null); } /** Represents a TabletAlias. */ class TabletAlias implements ITabletAlias { + /** * Constructs a new TabletAlias. * @param [properties] Properties to set @@ -1036,7 +1036,7 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.TabletAlias; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.TabletAlias; /** * Decodes a TabletAlias message from the specified reader or buffer, length delimited. @@ -1045,14 +1045,14 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.TabletAlias; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.TabletAlias; /** * Verifies a TabletAlias message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a TabletAlias message from a plain object. Also converts values to their respective internal types. @@ -1067,10 +1067,7 @@ export namespace topodata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.TabletAlias, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.TabletAlias, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this TabletAlias to JSON. @@ -1090,50 +1087,52 @@ export namespace topodata { EXPERIMENTAL = 5, BACKUP = 6, RESTORE = 7, - DRAINED = 8, + DRAINED = 8 } /** Properties of a Tablet. */ interface ITablet { + /** Tablet alias */ - alias?: topodata.ITabletAlias | null; + alias?: (topodata.ITabletAlias|null); /** Tablet hostname */ - hostname?: string | null; + hostname?: (string|null); /** Tablet port_map */ - port_map?: { [k: string]: number } | null; + port_map?: ({ [k: string]: number }|null); /** Tablet keyspace */ - keyspace?: string | null; + keyspace?: (string|null); /** Tablet shard */ - shard?: string | null; + shard?: (string|null); /** Tablet key_range */ - key_range?: topodata.IKeyRange | null; + key_range?: (topodata.IKeyRange|null); /** Tablet type */ - type?: topodata.TabletType | null; + type?: (topodata.TabletType|null); /** Tablet db_name_override */ - db_name_override?: string | null; + db_name_override?: (string|null); /** Tablet tags */ - tags?: { [k: string]: string } | null; + tags?: ({ [k: string]: string }|null); /** Tablet mysql_hostname */ - mysql_hostname?: string | null; + mysql_hostname?: (string|null); /** Tablet mysql_port */ - mysql_port?: number | null; + mysql_port?: (number|null); /** Tablet master_term_start_time */ - master_term_start_time?: vttime.ITime | null; + master_term_start_time?: (vttime.ITime|null); } /** Represents a Tablet. */ class Tablet implements ITablet { + /** * Constructs a new Tablet. * @param [properties] Properties to set @@ -1141,7 +1140,7 @@ export namespace topodata { constructor(properties?: topodata.ITablet); /** Tablet alias. */ - public alias?: topodata.ITabletAlias | null; + public alias?: (topodata.ITabletAlias|null); /** Tablet hostname. */ public hostname: string; @@ -1156,7 +1155,7 @@ export namespace topodata { public shard: string; /** Tablet key_range. */ - public key_range?: topodata.IKeyRange | null; + public key_range?: (topodata.IKeyRange|null); /** Tablet type. */ public type: topodata.TabletType; @@ -1174,7 +1173,7 @@ export namespace topodata { public mysql_port: number; /** Tablet master_term_start_time. */ - public master_term_start_time?: vttime.ITime | null; + public master_term_start_time?: (vttime.ITime|null); /** * Creates a new Tablet instance using the specified properties. @@ -1207,7 +1206,7 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Tablet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Tablet; /** * Decodes a Tablet message from the specified reader or buffer, length delimited. @@ -1216,14 +1215,14 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Tablet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Tablet; /** * Verifies a Tablet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Tablet message from a plain object. Also converts values to their respective internal types. @@ -1249,30 +1248,32 @@ export namespace topodata { /** Properties of a Shard. */ interface IShard { + /** Shard master_alias */ - master_alias?: topodata.ITabletAlias | null; + master_alias?: (topodata.ITabletAlias|null); /** Shard master_term_start_time */ - master_term_start_time?: vttime.ITime | null; + master_term_start_time?: (vttime.ITime|null); /** Shard key_range */ - key_range?: topodata.IKeyRange | null; + key_range?: (topodata.IKeyRange|null); /** Shard served_types */ - served_types?: topodata.Shard.IServedType[] | null; + served_types?: (topodata.Shard.IServedType[]|null); /** Shard source_shards */ - source_shards?: topodata.Shard.ISourceShard[] | null; + source_shards?: (topodata.Shard.ISourceShard[]|null); /** Shard tablet_controls */ - tablet_controls?: topodata.Shard.ITabletControl[] | null; + tablet_controls?: (topodata.Shard.ITabletControl[]|null); /** Shard is_master_serving */ - is_master_serving?: boolean | null; + is_master_serving?: (boolean|null); } /** Represents a Shard. */ class Shard implements IShard { + /** * Constructs a new Shard. * @param [properties] Properties to set @@ -1280,13 +1281,13 @@ export namespace topodata { constructor(properties?: topodata.IShard); /** Shard master_alias. */ - public master_alias?: topodata.ITabletAlias | null; + public master_alias?: (topodata.ITabletAlias|null); /** Shard master_term_start_time. */ - public master_term_start_time?: vttime.ITime | null; + public master_term_start_time?: (vttime.ITime|null); /** Shard key_range. */ - public key_range?: topodata.IKeyRange | null; + public key_range?: (topodata.IKeyRange|null); /** Shard served_types. */ public served_types: topodata.Shard.IServedType[]; @@ -1331,7 +1332,7 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Shard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard; /** * Decodes a Shard message from the specified reader or buffer, length delimited. @@ -1340,14 +1341,14 @@ export namespace topodata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Shard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard; /** * Verifies a Shard message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Shard message from a plain object. Also converts values to their respective internal types. @@ -1372,29773 +1373,25 @@ export namespace topodata { } namespace Shard { + /** Properties of a ServedType. */ interface IServedType { + /** ServedType tablet_type */ - tablet_type?: topodata.TabletType | null; + tablet_type?: (topodata.TabletType|null); /** ServedType cells */ - cells?: string[] | null; + cells?: (string[]|null); } - /** - * Constructs a new GetKeyspacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetKeyspacesRequest); - - /** GetKeyspacesRequest cluster_ids. */ - public cluster_ids: string[]; - - /** - * Creates a new GetKeyspacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyspacesRequest instance - */ - public static create(properties?: vtadmin.IGetKeyspacesRequest): vtadmin.GetKeyspacesRequest; - - /** - * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtadmin.GetKeyspacesRequest.verify|verify} messages. - * @param message GetKeyspacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtadmin.GetKeyspacesRequest.verify|verify} messages. - * @param message GetKeyspacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetKeyspacesRequest; - - /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetKeyspacesRequest; - - /** - * Verifies a GetKeyspacesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyspacesRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetKeyspacesRequest; - - /** - * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. - * @param message GetKeyspacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyspacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetKeyspacesResponse. */ - interface IGetKeyspacesResponse { - - /** GetKeyspacesResponse keyspaces */ - keyspaces?: (vtadmin.IKeyspace[]|null); - } - - /** Represents a GetKeyspacesResponse. */ - class GetKeyspacesResponse implements IGetKeyspacesResponse { - - /** - * Constructs a new GetKeyspacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetKeyspacesResponse); - - /** GetKeyspacesResponse keyspaces. */ - public keyspaces: vtadmin.IKeyspace[]; - - /** - * Creates a new GetKeyspacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyspacesResponse instance - */ - public static create(properties?: vtadmin.IGetKeyspacesResponse): vtadmin.GetKeyspacesResponse; - - /** - * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtadmin.GetKeyspacesResponse.verify|verify} messages. - * @param message GetKeyspacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtadmin.GetKeyspacesResponse.verify|verify} messages. - * @param message GetKeyspacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetKeyspacesResponse; - - /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetKeyspacesResponse; - - /** - * Verifies a GetKeyspacesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyspacesResponse - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetKeyspacesResponse; - - /** - * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. - * @param message GetKeyspacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyspacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemaRequest. */ - interface IGetSchemaRequest { - - /** GetSchemaRequest cluster_id */ - cluster_id?: (string|null); - - /** GetSchemaRequest keyspace */ - keyspace?: (string|null); - - /** GetSchemaRequest table */ - table?: (string|null); - } - - /** Represents a GetSchemaRequest. */ - class GetSchemaRequest implements IGetSchemaRequest { - - /** - * Constructs a new GetSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetSchemaRequest); - - /** GetSchemaRequest cluster_id. */ - public cluster_id: string; - - /** GetSchemaRequest keyspace. */ - public keyspace: string; - - /** GetSchemaRequest table. */ - public table: string; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemaRequest instance - */ - public static create(properties?: vtadmin.IGetSchemaRequest): vtadmin.GetSchemaRequest; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtadmin.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtadmin.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetSchemaRequest; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetSchemaRequest; - - /** - * Verifies a GetSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetSchemaRequest; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @param message GetSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemasRequest. */ - interface IGetSchemasRequest { - - /** GetSchemasRequest cluster_ids */ - cluster_ids?: (string[]|null); - } - - /** Represents a GetSchemasRequest. */ - class GetSchemasRequest implements IGetSchemasRequest { - - /** - * Constructs a new GetSchemasRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetSchemasRequest); - - /** GetSchemasRequest cluster_ids. */ - public cluster_ids: string[]; - - /** - * Creates a new GetSchemasRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemasRequest instance - */ - public static create(properties?: vtadmin.IGetSchemasRequest): vtadmin.GetSchemasRequest; - - /** - * Encodes the specified GetSchemasRequest message. Does not implicitly {@link vtadmin.GetSchemasRequest.verify|verify} messages. - * @param message GetSchemasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemasRequest message, length delimited. Does not implicitly {@link vtadmin.GetSchemasRequest.verify|verify} messages. - * @param message GetSchemasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemasRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetSchemasRequest; - - /** - * Decodes a GetSchemasRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetSchemasRequest; - - /** - * Verifies a GetSchemasRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemasRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemasRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetSchemasRequest; - - /** - * Creates a plain object from a GetSchemasRequest message. Also converts values to other types if specified. - * @param message GetSchemasRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemasRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemasResponse. */ - interface IGetSchemasResponse { - - /** GetSchemasResponse schemas */ - schemas?: (vtadmin.ISchema[]|null); - } - - /** Represents a GetSchemasResponse. */ - class GetSchemasResponse implements IGetSchemasResponse { - - /** - * Constructs a new GetSchemasResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetSchemasResponse); - - /** GetSchemasResponse schemas. */ - public schemas: vtadmin.ISchema[]; - - /** - * Creates a new GetSchemasResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemasResponse instance - */ - public static create(properties?: vtadmin.IGetSchemasResponse): vtadmin.GetSchemasResponse; - - /** - * Encodes the specified GetSchemasResponse message. Does not implicitly {@link vtadmin.GetSchemasResponse.verify|verify} messages. - * @param message GetSchemasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemasResponse message, length delimited. Does not implicitly {@link vtadmin.GetSchemasResponse.verify|verify} messages. - * @param message GetSchemasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemasResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetSchemasResponse; - - /** - * Decodes a GetSchemasResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetSchemasResponse; - - /** - * Verifies a GetSchemasResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemasResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemasResponse - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetSchemasResponse; - - /** - * Creates a plain object from a GetSchemasResponse message. Also converts values to other types if specified. - * @param message GetSchemasResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemasResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletRequest. */ - interface IGetTabletRequest { - - /** GetTabletRequest hostname */ - hostname?: (string|null); - - /** GetTabletRequest cluster_ids */ - cluster_ids?: (string[]|null); - } - - /** Represents a GetTabletRequest. */ - class GetTabletRequest implements IGetTabletRequest { - - /** - * Constructs a new GetTabletRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetTabletRequest); - - /** GetTabletRequest hostname. */ - public hostname: string; - - /** GetTabletRequest cluster_ids. */ - public cluster_ids: string[]; - - /** - * Creates a new GetTabletRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletRequest instance - */ - public static create(properties?: vtadmin.IGetTabletRequest): vtadmin.GetTabletRequest; - - /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletRequest; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletRequest; - - /** - * Verifies a GetTabletRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletRequest; - - /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. - * @param message GetTabletRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletsRequest. */ - interface IGetTabletsRequest { - - /** GetTabletsRequest cluster_ids */ - cluster_ids?: (string[]|null); - } - - /** Represents a GetTabletsRequest. */ - class GetTabletsRequest implements IGetTabletsRequest { - - /** - * Constructs a new GetTabletsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetTabletsRequest); - - /** GetTabletsRequest cluster_ids. */ - public cluster_ids: string[]; - - /** - * Creates a new GetTabletsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletsRequest instance - */ - public static create(properties?: vtadmin.IGetTabletsRequest): vtadmin.GetTabletsRequest; - - /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletsRequest; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletsRequest; - - /** - * Verifies a GetTabletsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletsRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletsRequest; - - /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @param message GetTabletsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletsResponse. */ - interface IGetTabletsResponse { - - /** GetTabletsResponse tablets */ - tablets?: (vtadmin.ITablet[]|null); - } - - /** Represents a GetTabletsResponse. */ - class GetTabletsResponse implements IGetTabletsResponse { - - /** - * Constructs a new GetTabletsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetTabletsResponse); - - /** GetTabletsResponse tablets. */ - public tablets: vtadmin.ITablet[]; - - /** - * Creates a new GetTabletsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletsResponse instance - */ - public static create(properties?: vtadmin.IGetTabletsResponse): vtadmin.GetTabletsResponse; - - /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtadmin.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtadmin.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletsResponse; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletsResponse; - - /** - * Verifies a GetTabletsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletsResponse - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletsResponse; - - /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. - * @param message GetTabletsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetVSchemaRequest. */ - interface IGetVSchemaRequest { - - /** GetVSchemaRequest cluster_id */ - cluster_id?: (string|null); - - /** GetVSchemaRequest keyspace */ - keyspace?: (string|null); - } - - /** Represents a GetVSchemaRequest. */ - class GetVSchemaRequest implements IGetVSchemaRequest { - - /** - * Constructs a new GetVSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetVSchemaRequest); - - /** GetVSchemaRequest cluster_id. */ - public cluster_id: string; - - /** GetVSchemaRequest keyspace. */ - public keyspace: string; - - /** - * Creates a new GetVSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVSchemaRequest instance - */ - public static create(properties?: vtadmin.IGetVSchemaRequest): vtadmin.GetVSchemaRequest; - - /** - * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtadmin.GetVSchemaRequest.verify|verify} messages. - * @param message GetVSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtadmin.GetVSchemaRequest.verify|verify} messages. - * @param message GetVSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetVSchemaRequest; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetVSchemaRequest; - - /** - * Verifies a GetVSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetVSchemaRequest; - - /** - * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. - * @param message GetVSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetVSchemasRequest. */ - interface IGetVSchemasRequest { - - /** GetVSchemasRequest cluster_ids */ - cluster_ids?: (string[]|null); - } - - /** Represents a GetVSchemasRequest. */ - class GetVSchemasRequest implements IGetVSchemasRequest { - - /** - * Constructs a new GetVSchemasRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetVSchemasRequest); - - /** GetVSchemasRequest cluster_ids. */ - public cluster_ids: string[]; - - /** - * Creates a new GetVSchemasRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVSchemasRequest instance - */ - public static create(properties?: vtadmin.IGetVSchemasRequest): vtadmin.GetVSchemasRequest; - - /** - * Encodes the specified GetVSchemasRequest message. Does not implicitly {@link vtadmin.GetVSchemasRequest.verify|verify} messages. - * @param message GetVSchemasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetVSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVSchemasRequest message, length delimited. Does not implicitly {@link vtadmin.GetVSchemasRequest.verify|verify} messages. - * @param message GetVSchemasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetVSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVSchemasRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetVSchemasRequest; - - /** - * Decodes a GetVSchemasRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetVSchemasRequest; - - /** - * Verifies a GetVSchemasRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVSchemasRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVSchemasRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetVSchemasRequest; - - /** - * Creates a plain object from a GetVSchemasRequest message. Also converts values to other types if specified. - * @param message GetVSchemasRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetVSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVSchemasRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetVSchemasResponse. */ - interface IGetVSchemasResponse { - - /** GetVSchemasResponse v_schemas */ - v_schemas?: (vtadmin.IVSchema[]|null); - } - - /** Represents a GetVSchemasResponse. */ - class GetVSchemasResponse implements IGetVSchemasResponse { - - /** - * Constructs a new GetVSchemasResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IGetVSchemasResponse); - - /** GetVSchemasResponse v_schemas. */ - public v_schemas: vtadmin.IVSchema[]; - - /** - * Creates a new GetVSchemasResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVSchemasResponse instance - */ - public static create(properties?: vtadmin.IGetVSchemasResponse): vtadmin.GetVSchemasResponse; - - /** - * Encodes the specified GetVSchemasResponse message. Does not implicitly {@link vtadmin.GetVSchemasResponse.verify|verify} messages. - * @param message GetVSchemasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IGetVSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVSchemasResponse message, length delimited. Does not implicitly {@link vtadmin.GetVSchemasResponse.verify|verify} messages. - * @param message GetVSchemasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IGetVSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVSchemasResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetVSchemasResponse; - - /** - * Decodes a GetVSchemasResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetVSchemasResponse; - - /** - * Verifies a GetVSchemasResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVSchemasResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVSchemasResponse - */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetVSchemasResponse; - - /** - * Creates a plain object from a GetVSchemasResponse message. Also converts values to other types if specified. - * @param message GetVSchemasResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.GetVSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVSchemasResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VTExplainRequest. */ - interface IVTExplainRequest { - - /** VTExplainRequest cluster */ - cluster?: (string|null); - - /** VTExplainRequest keyspace */ - keyspace?: (string|null); - - /** VTExplainRequest sql */ - sql?: (string|null); - } - - /** Represents a VTExplainRequest. */ - class VTExplainRequest implements IVTExplainRequest { - - /** - * Constructs a new VTExplainRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IVTExplainRequest); - - /** VTExplainRequest cluster. */ - public cluster: string; - - /** VTExplainRequest keyspace. */ - public keyspace: string; - - /** VTExplainRequest sql. */ - public sql: string; - - /** - * Creates a new VTExplainRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VTExplainRequest instance - */ - public static create(properties?: vtadmin.IVTExplainRequest): vtadmin.VTExplainRequest; - - /** - * Encodes the specified VTExplainRequest message. Does not implicitly {@link vtadmin.VTExplainRequest.verify|verify} messages. - * @param message VTExplainRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IVTExplainRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VTExplainRequest message, length delimited. Does not implicitly {@link vtadmin.VTExplainRequest.verify|verify} messages. - * @param message VTExplainRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IVTExplainRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VTExplainRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VTExplainRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.VTExplainRequest; - - /** - * Decodes a VTExplainRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VTExplainRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.VTExplainRequest; - - /** - * Verifies a VTExplainRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VTExplainRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VTExplainRequest - */ - public static fromObject(object: { [k: string]: any }): vtadmin.VTExplainRequest; - - /** - * Creates a plain object from a VTExplainRequest message. Also converts values to other types if specified. - * @param message VTExplainRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.VTExplainRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VTExplainRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VTExplainResponse. */ - interface IVTExplainResponse { - - /** VTExplainResponse response */ - response?: (string|null); - } - - /** Represents a VTExplainResponse. */ - class VTExplainResponse implements IVTExplainResponse { - - /** - * Constructs a new VTExplainResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtadmin.IVTExplainResponse); - - /** VTExplainResponse response. */ - public response: string; - - /** - * Creates a new VTExplainResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VTExplainResponse instance - */ - public static create(properties?: vtadmin.IVTExplainResponse): vtadmin.VTExplainResponse; - - /** - * Encodes the specified VTExplainResponse message. Does not implicitly {@link vtadmin.VTExplainResponse.verify|verify} messages. - * @param message VTExplainResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtadmin.IVTExplainResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VTExplainResponse message, length delimited. Does not implicitly {@link vtadmin.VTExplainResponse.verify|verify} messages. - * @param message VTExplainResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtadmin.IVTExplainResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VTExplainResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VTExplainResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.VTExplainResponse; - - /** - * Decodes a VTExplainResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VTExplainResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.VTExplainResponse; - - /** - * Verifies a VTExplainResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VTExplainResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VTExplainResponse - */ - public static fromObject(object: { [k: string]: any }): vtadmin.VTExplainResponse; - - /** - * Creates a plain object from a VTExplainResponse message. Also converts values to other types if specified. - * @param message VTExplainResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtadmin.VTExplainResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VTExplainResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace tabletmanagerdata. */ -export namespace tabletmanagerdata { - - /** Properties of a TableDefinition. */ - interface ITableDefinition { - - /** TableDefinition name */ - name?: (string|null); - - /** TableDefinition schema */ - schema?: (string|null); - - /** TableDefinition columns */ - columns?: (string[]|null); - - /** TableDefinition primary_key_columns */ - primary_key_columns?: (string[]|null); - - /** TableDefinition type */ - type?: (string|null); - - /** TableDefinition data_length */ - data_length?: (number|Long|null); - - /** TableDefinition row_count */ - row_count?: (number|Long|null); - - /** TableDefinition fields */ - fields?: (query.IField[]|null); - } - - /** Represents a TableDefinition. */ - class TableDefinition implements ITableDefinition { - - /** - * Constructs a new TableDefinition. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ITableDefinition); - - /** TableDefinition name. */ - public name: string; - - /** TableDefinition schema. */ - public schema: string; - - /** TableDefinition columns. */ - public columns: string[]; - - /** TableDefinition primary_key_columns. */ - public primary_key_columns: string[]; - - /** TableDefinition type. */ - public type: string; - - /** TableDefinition data_length. */ - public data_length: (number|Long); - - /** TableDefinition row_count. */ - public row_count: (number|Long); - - /** TableDefinition fields. */ - public fields: query.IField[]; - - /** - * Creates a new TableDefinition instance using the specified properties. - * @param [properties] Properties to set - * @returns TableDefinition instance - */ - public static create(properties?: tabletmanagerdata.ITableDefinition): tabletmanagerdata.TableDefinition; - - /** - * Encodes the specified TableDefinition message. Does not implicitly {@link tabletmanagerdata.TableDefinition.verify|verify} messages. - * @param message TableDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ITableDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableDefinition message, length delimited. Does not implicitly {@link tabletmanagerdata.TableDefinition.verify|verify} messages. - * @param message TableDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ITableDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TableDefinition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.TableDefinition; - - /** - * Decodes a TableDefinition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.TableDefinition; - - /** - * Verifies a TableDefinition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TableDefinition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableDefinition - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.TableDefinition; - - /** - * Creates a plain object from a TableDefinition message. Also converts values to other types if specified. - * @param message TableDefinition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.TableDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableDefinition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SchemaDefinition. */ - interface ISchemaDefinition { - - /** SchemaDefinition database_schema */ - database_schema?: (string|null); - - /** SchemaDefinition table_definitions */ - table_definitions?: (tabletmanagerdata.ITableDefinition[]|null); - - /** SchemaDefinition version */ - version?: (string|null); - } - - /** Represents a SchemaDefinition. */ - class SchemaDefinition implements ISchemaDefinition { - - /** - * Constructs a new SchemaDefinition. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISchemaDefinition); - - /** SchemaDefinition database_schema. */ - public database_schema: string; - - /** SchemaDefinition table_definitions. */ - public table_definitions: tabletmanagerdata.ITableDefinition[]; - - /** SchemaDefinition version. */ - public version: string; - - /** - * Creates a new SchemaDefinition instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaDefinition instance - */ - public static create(properties?: tabletmanagerdata.ISchemaDefinition): tabletmanagerdata.SchemaDefinition; - - /** - * Encodes the specified SchemaDefinition message. Does not implicitly {@link tabletmanagerdata.SchemaDefinition.verify|verify} messages. - * @param message SchemaDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISchemaDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaDefinition message, length delimited. Does not implicitly {@link tabletmanagerdata.SchemaDefinition.verify|verify} messages. - * @param message SchemaDefinition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISchemaDefinition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaDefinition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SchemaDefinition; - - /** - * Decodes a SchemaDefinition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SchemaDefinition; - - /** - * Verifies a SchemaDefinition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaDefinition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaDefinition - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SchemaDefinition; - - /** - * Creates a plain object from a SchemaDefinition message. Also converts values to other types if specified. - * @param message SchemaDefinition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SchemaDefinition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaDefinition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SchemaChangeResult. */ - interface ISchemaChangeResult { - - /** SchemaChangeResult before_schema */ - before_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** SchemaChangeResult after_schema */ - after_schema?: (tabletmanagerdata.ISchemaDefinition|null); - } - - /** Represents a SchemaChangeResult. */ - class SchemaChangeResult implements ISchemaChangeResult { - - /** - * Constructs a new SchemaChangeResult. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISchemaChangeResult); - - /** SchemaChangeResult before_schema. */ - public before_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** SchemaChangeResult after_schema. */ - public after_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** - * Creates a new SchemaChangeResult instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaChangeResult instance - */ - public static create(properties?: tabletmanagerdata.ISchemaChangeResult): tabletmanagerdata.SchemaChangeResult; - - /** - * Encodes the specified SchemaChangeResult message. Does not implicitly {@link tabletmanagerdata.SchemaChangeResult.verify|verify} messages. - * @param message SchemaChangeResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISchemaChangeResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaChangeResult message, length delimited. Does not implicitly {@link tabletmanagerdata.SchemaChangeResult.verify|verify} messages. - * @param message SchemaChangeResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISchemaChangeResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaChangeResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaChangeResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SchemaChangeResult; - - /** - * Decodes a SchemaChangeResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaChangeResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SchemaChangeResult; - - /** - * Verifies a SchemaChangeResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaChangeResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaChangeResult - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SchemaChangeResult; - - /** - * Creates a plain object from a SchemaChangeResult message. Also converts values to other types if specified. - * @param message SchemaChangeResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SchemaChangeResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaChangeResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a UserPermission. */ - interface IUserPermission { - - /** UserPermission host */ - host?: (string|null); - - /** UserPermission user */ - user?: (string|null); - - /** UserPermission password_checksum */ - password_checksum?: (number|Long|null); - - /** UserPermission privileges */ - privileges?: ({ [k: string]: string }|null); - } - - /** Represents a UserPermission. */ - class UserPermission implements IUserPermission { - - /** - * Constructs a new UserPermission. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IUserPermission); - - /** UserPermission host. */ - public host: string; - - /** UserPermission user. */ - public user: string; - - /** UserPermission password_checksum. */ - public password_checksum: (number|Long); - - /** UserPermission privileges. */ - public privileges: { [k: string]: string }; - - /** - * Creates a new UserPermission instance using the specified properties. - * @param [properties] Properties to set - * @returns UserPermission instance - */ - public static create(properties?: tabletmanagerdata.IUserPermission): tabletmanagerdata.UserPermission; - - /** - * Encodes the specified UserPermission message. Does not implicitly {@link tabletmanagerdata.UserPermission.verify|verify} messages. - * @param message UserPermission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IUserPermission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserPermission message, length delimited. Does not implicitly {@link tabletmanagerdata.UserPermission.verify|verify} messages. - * @param message UserPermission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IUserPermission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserPermission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UserPermission; - - /** - * Decodes a UserPermission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UserPermission; - - /** - * Verifies a UserPermission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserPermission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserPermission - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UserPermission; - - /** - * Creates a plain object from a UserPermission message. Also converts values to other types if specified. - * @param message UserPermission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.UserPermission, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserPermission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DbPermission. */ - interface IDbPermission { - - /** DbPermission host */ - host?: (string|null); - - /** DbPermission db */ - db?: (string|null); - - /** DbPermission user */ - user?: (string|null); - - /** DbPermission privileges */ - privileges?: ({ [k: string]: string }|null); - } - - /** Represents a DbPermission. */ - class DbPermission implements IDbPermission { - - /** - * Constructs a new DbPermission. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IDbPermission); - - /** DbPermission host. */ - public host: string; - - /** DbPermission db. */ - public db: string; - - /** DbPermission user. */ - public user: string; - - /** DbPermission privileges. */ - public privileges: { [k: string]: string }; - - /** - * Creates a new DbPermission instance using the specified properties. - * @param [properties] Properties to set - * @returns DbPermission instance - */ - public static create(properties?: tabletmanagerdata.IDbPermission): tabletmanagerdata.DbPermission; - - /** - * Encodes the specified DbPermission message. Does not implicitly {@link tabletmanagerdata.DbPermission.verify|verify} messages. - * @param message DbPermission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IDbPermission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DbPermission message, length delimited. Does not implicitly {@link tabletmanagerdata.DbPermission.verify|verify} messages. - * @param message DbPermission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IDbPermission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DbPermission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DbPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.DbPermission; - - /** - * Decodes a DbPermission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DbPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.DbPermission; - - /** - * Verifies a DbPermission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DbPermission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DbPermission - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.DbPermission; - - /** - * Creates a plain object from a DbPermission message. Also converts values to other types if specified. - * @param message DbPermission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.DbPermission, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DbPermission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Permissions. */ - interface IPermissions { - - /** Permissions user_permissions */ - user_permissions?: (tabletmanagerdata.IUserPermission[]|null); - - /** Permissions db_permissions */ - db_permissions?: (tabletmanagerdata.IDbPermission[]|null); - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPermissions); - - /** Permissions user_permissions. */ - public user_permissions: tabletmanagerdata.IUserPermission[]; - - /** Permissions db_permissions. */ - public db_permissions: tabletmanagerdata.IDbPermission[]; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create(properties?: tabletmanagerdata.IPermissions): tabletmanagerdata.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link tabletmanagerdata.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link tabletmanagerdata.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.Permissions; - - /** - * Verifies a Permissions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PingRequest. */ - interface IPingRequest { - - /** PingRequest payload */ - payload?: (string|null); - } - - /** Represents a PingRequest. */ - class PingRequest implements IPingRequest { - - /** - * Constructs a new PingRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPingRequest); - - /** PingRequest payload. */ - public payload: string; - - /** - * Creates a new PingRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PingRequest instance - */ - public static create(properties?: tabletmanagerdata.IPingRequest): tabletmanagerdata.PingRequest; - - /** - * Encodes the specified PingRequest message. Does not implicitly {@link tabletmanagerdata.PingRequest.verify|verify} messages. - * @param message PingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PingRequest.verify|verify} messages. - * @param message PingRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPingRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PingRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PingRequest; - - /** - * Decodes a PingRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PingRequest; - - /** - * Verifies a PingRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PingRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PingRequest; - - /** - * Creates a plain object from a PingRequest message. Also converts values to other types if specified. - * @param message PingRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PingRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PingResponse. */ - interface IPingResponse { - - /** PingResponse payload */ - payload?: (string|null); - } - - /** Represents a PingResponse. */ - class PingResponse implements IPingResponse { - - /** - * Constructs a new PingResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPingResponse); - - /** PingResponse payload. */ - public payload: string; - - /** - * Creates a new PingResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PingResponse instance - */ - public static create(properties?: tabletmanagerdata.IPingResponse): tabletmanagerdata.PingResponse; - - /** - * Encodes the specified PingResponse message. Does not implicitly {@link tabletmanagerdata.PingResponse.verify|verify} messages. - * @param message PingResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PingResponse.verify|verify} messages. - * @param message PingResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPingResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PingResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PingResponse; - - /** - * Decodes a PingResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PingResponse; - - /** - * Verifies a PingResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PingResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PingResponse; - - /** - * Creates a plain object from a PingResponse message. Also converts values to other types if specified. - * @param message PingResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PingResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SleepRequest. */ - interface ISleepRequest { - - /** SleepRequest duration */ - duration?: (number|Long|null); - } - - /** Represents a SleepRequest. */ - class SleepRequest implements ISleepRequest { - - /** - * Constructs a new SleepRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISleepRequest); - - /** SleepRequest duration. */ - public duration: (number|Long); - - /** - * Creates a new SleepRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SleepRequest instance - */ - public static create(properties?: tabletmanagerdata.ISleepRequest): tabletmanagerdata.SleepRequest; - - /** - * Encodes the specified SleepRequest message. Does not implicitly {@link tabletmanagerdata.SleepRequest.verify|verify} messages. - * @param message SleepRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISleepRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SleepRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SleepRequest.verify|verify} messages. - * @param message SleepRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISleepRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SleepRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SleepRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SleepRequest; - - /** - * Decodes a SleepRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SleepRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SleepRequest; - - /** - * Verifies a SleepRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SleepRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SleepRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SleepRequest; - - /** - * Creates a plain object from a SleepRequest message. Also converts values to other types if specified. - * @param message SleepRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SleepRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SleepRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SleepResponse. */ - interface ISleepResponse { - } - - /** Represents a SleepResponse. */ - class SleepResponse implements ISleepResponse { - - /** - * Constructs a new SleepResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISleepResponse); - - /** - * Creates a new SleepResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SleepResponse instance - */ - public static create(properties?: tabletmanagerdata.ISleepResponse): tabletmanagerdata.SleepResponse; - - /** - * Encodes the specified SleepResponse message. Does not implicitly {@link tabletmanagerdata.SleepResponse.verify|verify} messages. - * @param message SleepResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISleepResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SleepResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SleepResponse.verify|verify} messages. - * @param message SleepResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISleepResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SleepResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SleepResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SleepResponse; - - /** - * Decodes a SleepResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SleepResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SleepResponse; - - /** - * Verifies a SleepResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SleepResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SleepResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SleepResponse; - - /** - * Creates a plain object from a SleepResponse message. Also converts values to other types if specified. - * @param message SleepResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SleepResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SleepResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteHookRequest. */ - interface IExecuteHookRequest { - - /** ExecuteHookRequest name */ - name?: (string|null); - - /** ExecuteHookRequest parameters */ - parameters?: (string[]|null); - - /** ExecuteHookRequest extra_env */ - extra_env?: ({ [k: string]: string }|null); - } - - /** Represents an ExecuteHookRequest. */ - class ExecuteHookRequest implements IExecuteHookRequest { - - /** - * Constructs a new ExecuteHookRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteHookRequest); - - /** ExecuteHookRequest name. */ - public name: string; - - /** ExecuteHookRequest parameters. */ - public parameters: string[]; - - /** ExecuteHookRequest extra_env. */ - public extra_env: { [k: string]: string }; - - /** - * Creates a new ExecuteHookRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteHookRequest instance - */ - public static create(properties?: tabletmanagerdata.IExecuteHookRequest): tabletmanagerdata.ExecuteHookRequest; - - /** - * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteHookRequest.verify|verify} messages. - * @param message ExecuteHookRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteHookRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteHookRequest.verify|verify} messages. - * @param message ExecuteHookRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteHookRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteHookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteHookRequest; - - /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteHookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteHookRequest; - - /** - * Verifies an ExecuteHookRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteHookRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteHookRequest; - - /** - * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. - * @param message ExecuteHookRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteHookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteHookRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteHookResponse. */ - interface IExecuteHookResponse { - - /** ExecuteHookResponse exit_status */ - exit_status?: (number|Long|null); - - /** ExecuteHookResponse stdout */ - stdout?: (string|null); - - /** ExecuteHookResponse stderr */ - stderr?: (string|null); - } - - /** Represents an ExecuteHookResponse. */ - class ExecuteHookResponse implements IExecuteHookResponse { - - /** - * Constructs a new ExecuteHookResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteHookResponse); - - /** ExecuteHookResponse exit_status. */ - public exit_status: (number|Long); - - /** ExecuteHookResponse stdout. */ - public stdout: string; - - /** ExecuteHookResponse stderr. */ - public stderr: string; - - /** - * Creates a new ExecuteHookResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteHookResponse instance - */ - public static create(properties?: tabletmanagerdata.IExecuteHookResponse): tabletmanagerdata.ExecuteHookResponse; - - /** - * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteHookResponse.verify|verify} messages. - * @param message ExecuteHookResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteHookResponse.verify|verify} messages. - * @param message ExecuteHookResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteHookResponse; - - /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteHookResponse; - - /** - * Verifies an ExecuteHookResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteHookResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteHookResponse; - - /** - * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. - * @param message ExecuteHookResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteHookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteHookResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemaRequest. */ - interface IGetSchemaRequest { - - /** GetSchemaRequest tables */ - tables?: (string[]|null); - - /** GetSchemaRequest include_views */ - include_views?: (boolean|null); - - /** GetSchemaRequest exclude_tables */ - exclude_tables?: (string[]|null); - } - - /** Represents a GetSchemaRequest. */ - class GetSchemaRequest implements IGetSchemaRequest { - - /** - * Constructs a new GetSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IGetSchemaRequest); - - /** GetSchemaRequest tables. */ - public tables: string[]; - - /** GetSchemaRequest include_views. */ - public include_views: boolean; - - /** GetSchemaRequest exclude_tables. */ - public exclude_tables: string[]; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemaRequest instance - */ - public static create(properties?: tabletmanagerdata.IGetSchemaRequest): tabletmanagerdata.GetSchemaRequest; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link tabletmanagerdata.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.GetSchemaRequest; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.GetSchemaRequest; - - /** - * Verifies a GetSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.GetSchemaRequest; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @param message GetSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemaResponse. */ - interface IGetSchemaResponse { - - /** GetSchemaResponse schema_definition */ - schema_definition?: (tabletmanagerdata.ISchemaDefinition|null); - } - - /** Represents a GetSchemaResponse. */ - class GetSchemaResponse implements IGetSchemaResponse { - - /** - * Constructs a new GetSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IGetSchemaResponse); - - /** GetSchemaResponse schema_definition. */ - public schema_definition?: (tabletmanagerdata.ISchemaDefinition|null); - - /** - * Creates a new GetSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemaResponse instance - */ - public static create(properties?: tabletmanagerdata.IGetSchemaResponse): tabletmanagerdata.GetSchemaResponse; - - /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link tabletmanagerdata.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.GetSchemaResponse; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.GetSchemaResponse; - - /** - * Verifies a GetSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.GetSchemaResponse; - - /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. - * @param message GetSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.GetSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetPermissionsRequest. */ - interface IGetPermissionsRequest { - } - - /** Represents a GetPermissionsRequest. */ - class GetPermissionsRequest implements IGetPermissionsRequest { - - /** - * Constructs a new GetPermissionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IGetPermissionsRequest); - - /** - * Creates a new GetPermissionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPermissionsRequest instance - */ - public static create(properties?: tabletmanagerdata.IGetPermissionsRequest): tabletmanagerdata.GetPermissionsRequest; - - /** - * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link tabletmanagerdata.GetPermissionsRequest.verify|verify} messages. - * @param message GetPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IGetPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.GetPermissionsRequest.verify|verify} messages. - * @param message GetPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IGetPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.GetPermissionsRequest; - - /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.GetPermissionsRequest; - - /** - * Verifies a GetPermissionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPermissionsRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.GetPermissionsRequest; - - /** - * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. - * @param message GetPermissionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.GetPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPermissionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetPermissionsResponse. */ - interface IGetPermissionsResponse { - - /** GetPermissionsResponse permissions */ - permissions?: (tabletmanagerdata.IPermissions|null); - } - - /** Represents a GetPermissionsResponse. */ - class GetPermissionsResponse implements IGetPermissionsResponse { - - /** - * Constructs a new GetPermissionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IGetPermissionsResponse); - - /** GetPermissionsResponse permissions. */ - public permissions?: (tabletmanagerdata.IPermissions|null); - - /** - * Creates a new GetPermissionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPermissionsResponse instance - */ - public static create(properties?: tabletmanagerdata.IGetPermissionsResponse): tabletmanagerdata.GetPermissionsResponse; - - /** - * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link tabletmanagerdata.GetPermissionsResponse.verify|verify} messages. - * @param message GetPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IGetPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.GetPermissionsResponse.verify|verify} messages. - * @param message GetPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IGetPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.GetPermissionsResponse; - - /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.GetPermissionsResponse; - - /** - * Verifies a GetPermissionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPermissionsResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.GetPermissionsResponse; - - /** - * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. - * @param message GetPermissionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.GetPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPermissionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetReadOnlyRequest. */ - interface ISetReadOnlyRequest { - } - - /** Represents a SetReadOnlyRequest. */ - class SetReadOnlyRequest implements ISetReadOnlyRequest { - - /** - * Constructs a new SetReadOnlyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISetReadOnlyRequest); - - /** - * Creates a new SetReadOnlyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetReadOnlyRequest instance - */ - public static create(properties?: tabletmanagerdata.ISetReadOnlyRequest): tabletmanagerdata.SetReadOnlyRequest; - - /** - * Encodes the specified SetReadOnlyRequest message. Does not implicitly {@link tabletmanagerdata.SetReadOnlyRequest.verify|verify} messages. - * @param message SetReadOnlyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISetReadOnlyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetReadOnlyRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadOnlyRequest.verify|verify} messages. - * @param message SetReadOnlyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISetReadOnlyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetReadOnlyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetReadOnlyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SetReadOnlyRequest; - - /** - * Decodes a SetReadOnlyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetReadOnlyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SetReadOnlyRequest; - - /** - * Verifies a SetReadOnlyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetReadOnlyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetReadOnlyRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SetReadOnlyRequest; - - /** - * Creates a plain object from a SetReadOnlyRequest message. Also converts values to other types if specified. - * @param message SetReadOnlyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SetReadOnlyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetReadOnlyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetReadOnlyResponse. */ - interface ISetReadOnlyResponse { - } - - /** Represents a SetReadOnlyResponse. */ - class SetReadOnlyResponse implements ISetReadOnlyResponse { - - /** - * Constructs a new SetReadOnlyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISetReadOnlyResponse); - - /** - * Creates a new SetReadOnlyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetReadOnlyResponse instance - */ - public static create(properties?: tabletmanagerdata.ISetReadOnlyResponse): tabletmanagerdata.SetReadOnlyResponse; - - /** - * Encodes the specified SetReadOnlyResponse message. Does not implicitly {@link tabletmanagerdata.SetReadOnlyResponse.verify|verify} messages. - * @param message SetReadOnlyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISetReadOnlyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetReadOnlyResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadOnlyResponse.verify|verify} messages. - * @param message SetReadOnlyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISetReadOnlyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetReadOnlyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetReadOnlyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SetReadOnlyResponse; - - /** - * Decodes a SetReadOnlyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetReadOnlyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SetReadOnlyResponse; - - /** - * Verifies a SetReadOnlyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetReadOnlyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetReadOnlyResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SetReadOnlyResponse; - - /** - * Creates a plain object from a SetReadOnlyResponse message. Also converts values to other types if specified. - * @param message SetReadOnlyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SetReadOnlyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetReadOnlyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetReadWriteRequest. */ - interface ISetReadWriteRequest { - } - - /** Represents a SetReadWriteRequest. */ - class SetReadWriteRequest implements ISetReadWriteRequest { - - /** - * Constructs a new SetReadWriteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISetReadWriteRequest); - - /** - * Creates a new SetReadWriteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetReadWriteRequest instance - */ - public static create(properties?: tabletmanagerdata.ISetReadWriteRequest): tabletmanagerdata.SetReadWriteRequest; - - /** - * Encodes the specified SetReadWriteRequest message. Does not implicitly {@link tabletmanagerdata.SetReadWriteRequest.verify|verify} messages. - * @param message SetReadWriteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISetReadWriteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetReadWriteRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadWriteRequest.verify|verify} messages. - * @param message SetReadWriteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISetReadWriteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetReadWriteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetReadWriteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SetReadWriteRequest; - - /** - * Decodes a SetReadWriteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetReadWriteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SetReadWriteRequest; - - /** - * Verifies a SetReadWriteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetReadWriteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetReadWriteRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SetReadWriteRequest; - - /** - * Creates a plain object from a SetReadWriteRequest message. Also converts values to other types if specified. - * @param message SetReadWriteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SetReadWriteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetReadWriteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetReadWriteResponse. */ - interface ISetReadWriteResponse { - } - - /** Represents a SetReadWriteResponse. */ - class SetReadWriteResponse implements ISetReadWriteResponse { - - /** - * Constructs a new SetReadWriteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISetReadWriteResponse); - - /** - * Creates a new SetReadWriteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetReadWriteResponse instance - */ - public static create(properties?: tabletmanagerdata.ISetReadWriteResponse): tabletmanagerdata.SetReadWriteResponse; - - /** - * Encodes the specified SetReadWriteResponse message. Does not implicitly {@link tabletmanagerdata.SetReadWriteResponse.verify|verify} messages. - * @param message SetReadWriteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISetReadWriteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetReadWriteResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadWriteResponse.verify|verify} messages. - * @param message SetReadWriteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISetReadWriteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetReadWriteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetReadWriteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SetReadWriteResponse; - - /** - * Decodes a SetReadWriteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetReadWriteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SetReadWriteResponse; - - /** - * Verifies a SetReadWriteResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetReadWriteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetReadWriteResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SetReadWriteResponse; - - /** - * Creates a plain object from a SetReadWriteResponse message. Also converts values to other types if specified. - * @param message SetReadWriteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SetReadWriteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetReadWriteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ChangeTypeRequest. */ - interface IChangeTypeRequest { - - /** ChangeTypeRequest tablet_type */ - tablet_type?: (topodata.TabletType|null); - } - - /** Represents a ChangeTypeRequest. */ - class ChangeTypeRequest implements IChangeTypeRequest { - - /** - * Constructs a new ChangeTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IChangeTypeRequest); - - /** ChangeTypeRequest tablet_type. */ - public tablet_type: topodata.TabletType; - - /** - * Creates a new ChangeTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ChangeTypeRequest instance - */ - public static create(properties?: tabletmanagerdata.IChangeTypeRequest): tabletmanagerdata.ChangeTypeRequest; - - /** - * Encodes the specified ChangeTypeRequest message. Does not implicitly {@link tabletmanagerdata.ChangeTypeRequest.verify|verify} messages. - * @param message ChangeTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IChangeTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChangeTypeRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ChangeTypeRequest.verify|verify} messages. - * @param message ChangeTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IChangeTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChangeTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChangeTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ChangeTypeRequest; - - /** - * Decodes a ChangeTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChangeTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ChangeTypeRequest; - - /** - * Verifies a ChangeTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ChangeTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChangeTypeRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ChangeTypeRequest; - - /** - * Creates a plain object from a ChangeTypeRequest message. Also converts values to other types if specified. - * @param message ChangeTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ChangeTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChangeTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ChangeTypeResponse. */ - interface IChangeTypeResponse { - } - - /** Represents a ChangeTypeResponse. */ - class ChangeTypeResponse implements IChangeTypeResponse { - - /** - * Constructs a new ChangeTypeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IChangeTypeResponse); - - /** - * Creates a new ChangeTypeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ChangeTypeResponse instance - */ - public static create(properties?: tabletmanagerdata.IChangeTypeResponse): tabletmanagerdata.ChangeTypeResponse; - - /** - * Encodes the specified ChangeTypeResponse message. Does not implicitly {@link tabletmanagerdata.ChangeTypeResponse.verify|verify} messages. - * @param message ChangeTypeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IChangeTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChangeTypeResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ChangeTypeResponse.verify|verify} messages. - * @param message ChangeTypeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IChangeTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChangeTypeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChangeTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ChangeTypeResponse; - - /** - * Decodes a ChangeTypeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChangeTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ChangeTypeResponse; - - /** - * Verifies a ChangeTypeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ChangeTypeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChangeTypeResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ChangeTypeResponse; - - /** - * Creates a plain object from a ChangeTypeResponse message. Also converts values to other types if specified. - * @param message ChangeTypeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ChangeTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChangeTypeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RefreshStateRequest. */ - interface IRefreshStateRequest { - } - - /** Represents a RefreshStateRequest. */ - class RefreshStateRequest implements IRefreshStateRequest { - - /** - * Constructs a new RefreshStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IRefreshStateRequest); - - /** - * Creates a new RefreshStateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RefreshStateRequest instance - */ - public static create(properties?: tabletmanagerdata.IRefreshStateRequest): tabletmanagerdata.RefreshStateRequest; - - /** - * Encodes the specified RefreshStateRequest message. Does not implicitly {@link tabletmanagerdata.RefreshStateRequest.verify|verify} messages. - * @param message RefreshStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IRefreshStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RefreshStateRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.RefreshStateRequest.verify|verify} messages. - * @param message RefreshStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IRefreshStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RefreshStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RefreshStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.RefreshStateRequest; - - /** - * Decodes a RefreshStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RefreshStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.RefreshStateRequest; - - /** - * Verifies a RefreshStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RefreshStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RefreshStateRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.RefreshStateRequest; - - /** - * Creates a plain object from a RefreshStateRequest message. Also converts values to other types if specified. - * @param message RefreshStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.RefreshStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RefreshStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RefreshStateResponse. */ - interface IRefreshStateResponse { - } - - /** Represents a RefreshStateResponse. */ - class RefreshStateResponse implements IRefreshStateResponse { - - /** - * Constructs a new RefreshStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IRefreshStateResponse); - - /** - * Creates a new RefreshStateResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RefreshStateResponse instance - */ - public static create(properties?: tabletmanagerdata.IRefreshStateResponse): tabletmanagerdata.RefreshStateResponse; - - /** - * Encodes the specified RefreshStateResponse message. Does not implicitly {@link tabletmanagerdata.RefreshStateResponse.verify|verify} messages. - * @param message RefreshStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IRefreshStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RefreshStateResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.RefreshStateResponse.verify|verify} messages. - * @param message RefreshStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IRefreshStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RefreshStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RefreshStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.RefreshStateResponse; - - /** - * Decodes a RefreshStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RefreshStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.RefreshStateResponse; - - /** - * Verifies a RefreshStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RefreshStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RefreshStateResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.RefreshStateResponse; - - /** - * Creates a plain object from a RefreshStateResponse message. Also converts values to other types if specified. - * @param message RefreshStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.RefreshStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RefreshStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RunHealthCheckRequest. */ - interface IRunHealthCheckRequest { - } - - /** Represents a RunHealthCheckRequest. */ - class RunHealthCheckRequest implements IRunHealthCheckRequest { - - /** - * Constructs a new RunHealthCheckRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IRunHealthCheckRequest); - - /** - * Creates a new RunHealthCheckRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RunHealthCheckRequest instance - */ - public static create(properties?: tabletmanagerdata.IRunHealthCheckRequest): tabletmanagerdata.RunHealthCheckRequest; - - /** - * Encodes the specified RunHealthCheckRequest message. Does not implicitly {@link tabletmanagerdata.RunHealthCheckRequest.verify|verify} messages. - * @param message RunHealthCheckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IRunHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunHealthCheckRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.RunHealthCheckRequest.verify|verify} messages. - * @param message RunHealthCheckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IRunHealthCheckRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunHealthCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.RunHealthCheckRequest; - - /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunHealthCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.RunHealthCheckRequest; - - /** - * Verifies a RunHealthCheckRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunHealthCheckRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunHealthCheckRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.RunHealthCheckRequest; - - /** - * Creates a plain object from a RunHealthCheckRequest message. Also converts values to other types if specified. - * @param message RunHealthCheckRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.RunHealthCheckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunHealthCheckRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RunHealthCheckResponse. */ - interface IRunHealthCheckResponse { - } - - /** Represents a RunHealthCheckResponse. */ - class RunHealthCheckResponse implements IRunHealthCheckResponse { - - /** - * Constructs a new RunHealthCheckResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IRunHealthCheckResponse); - - /** - * Creates a new RunHealthCheckResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RunHealthCheckResponse instance - */ - public static create(properties?: tabletmanagerdata.IRunHealthCheckResponse): tabletmanagerdata.RunHealthCheckResponse; - - /** - * Encodes the specified RunHealthCheckResponse message. Does not implicitly {@link tabletmanagerdata.RunHealthCheckResponse.verify|verify} messages. - * @param message RunHealthCheckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IRunHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RunHealthCheckResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.RunHealthCheckResponse.verify|verify} messages. - * @param message RunHealthCheckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IRunHealthCheckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RunHealthCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.RunHealthCheckResponse; - - /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RunHealthCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.RunHealthCheckResponse; - - /** - * Verifies a RunHealthCheckResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RunHealthCheckResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RunHealthCheckResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.RunHealthCheckResponse; - - /** - * Creates a plain object from a RunHealthCheckResponse message. Also converts values to other types if specified. - * @param message RunHealthCheckResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.RunHealthCheckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RunHealthCheckResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IgnoreHealthErrorRequest. */ - interface IIgnoreHealthErrorRequest { - - /** IgnoreHealthErrorRequest pattern */ - pattern?: (string|null); - } - - /** Represents an IgnoreHealthErrorRequest. */ - class IgnoreHealthErrorRequest implements IIgnoreHealthErrorRequest { - - /** - * Constructs a new IgnoreHealthErrorRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IIgnoreHealthErrorRequest); - - /** IgnoreHealthErrorRequest pattern. */ - public pattern: string; - - /** - * Creates a new IgnoreHealthErrorRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns IgnoreHealthErrorRequest instance - */ - public static create(properties?: tabletmanagerdata.IIgnoreHealthErrorRequest): tabletmanagerdata.IgnoreHealthErrorRequest; - - /** - * Encodes the specified IgnoreHealthErrorRequest message. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorRequest.verify|verify} messages. - * @param message IgnoreHealthErrorRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IIgnoreHealthErrorRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IgnoreHealthErrorRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorRequest.verify|verify} messages. - * @param message IgnoreHealthErrorRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IIgnoreHealthErrorRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IgnoreHealthErrorRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IgnoreHealthErrorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.IgnoreHealthErrorRequest; - - /** - * Decodes an IgnoreHealthErrorRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IgnoreHealthErrorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.IgnoreHealthErrorRequest; - - /** - * Verifies an IgnoreHealthErrorRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IgnoreHealthErrorRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IgnoreHealthErrorRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.IgnoreHealthErrorRequest; - - /** - * Creates a plain object from an IgnoreHealthErrorRequest message. Also converts values to other types if specified. - * @param message IgnoreHealthErrorRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.IgnoreHealthErrorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IgnoreHealthErrorRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IgnoreHealthErrorResponse. */ - interface IIgnoreHealthErrorResponse { - } - - /** Represents an IgnoreHealthErrorResponse. */ - class IgnoreHealthErrorResponse implements IIgnoreHealthErrorResponse { - - /** - * Constructs a new IgnoreHealthErrorResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IIgnoreHealthErrorResponse); - - /** - * Creates a new IgnoreHealthErrorResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns IgnoreHealthErrorResponse instance - */ - public static create(properties?: tabletmanagerdata.IIgnoreHealthErrorResponse): tabletmanagerdata.IgnoreHealthErrorResponse; - - /** - * Encodes the specified IgnoreHealthErrorResponse message. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorResponse.verify|verify} messages. - * @param message IgnoreHealthErrorResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IIgnoreHealthErrorResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IgnoreHealthErrorResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorResponse.verify|verify} messages. - * @param message IgnoreHealthErrorResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IIgnoreHealthErrorResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IgnoreHealthErrorResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IgnoreHealthErrorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.IgnoreHealthErrorResponse; - - /** - * Decodes an IgnoreHealthErrorResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IgnoreHealthErrorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.IgnoreHealthErrorResponse; - - /** - * Verifies an IgnoreHealthErrorResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IgnoreHealthErrorResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IgnoreHealthErrorResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.IgnoreHealthErrorResponse; - - /** - * Creates a plain object from an IgnoreHealthErrorResponse message. Also converts values to other types if specified. - * @param message IgnoreHealthErrorResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.IgnoreHealthErrorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IgnoreHealthErrorResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReloadSchemaRequest. */ - interface IReloadSchemaRequest { - - /** ReloadSchemaRequest wait_position */ - wait_position?: (string|null); - } - - /** Represents a ReloadSchemaRequest. */ - class ReloadSchemaRequest implements IReloadSchemaRequest { - - /** - * Constructs a new ReloadSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReloadSchemaRequest); - - /** ReloadSchemaRequest wait_position. */ - public wait_position: string; - - /** - * Creates a new ReloadSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReloadSchemaRequest instance - */ - public static create(properties?: tabletmanagerdata.IReloadSchemaRequest): tabletmanagerdata.ReloadSchemaRequest; - - /** - * Encodes the specified ReloadSchemaRequest message. Does not implicitly {@link tabletmanagerdata.ReloadSchemaRequest.verify|verify} messages. - * @param message ReloadSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReloadSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReloadSchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReloadSchemaRequest.verify|verify} messages. - * @param message ReloadSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReloadSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReloadSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReloadSchemaRequest; - - /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReloadSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReloadSchemaRequest; - - /** - * Verifies a ReloadSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReloadSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReloadSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReloadSchemaRequest; - - /** - * Creates a plain object from a ReloadSchemaRequest message. Also converts values to other types if specified. - * @param message ReloadSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReloadSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReloadSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReloadSchemaResponse. */ - interface IReloadSchemaResponse { - } - - /** Represents a ReloadSchemaResponse. */ - class ReloadSchemaResponse implements IReloadSchemaResponse { - - /** - * Constructs a new ReloadSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReloadSchemaResponse); - - /** - * Creates a new ReloadSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReloadSchemaResponse instance - */ - public static create(properties?: tabletmanagerdata.IReloadSchemaResponse): tabletmanagerdata.ReloadSchemaResponse; - - /** - * Encodes the specified ReloadSchemaResponse message. Does not implicitly {@link tabletmanagerdata.ReloadSchemaResponse.verify|verify} messages. - * @param message ReloadSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReloadSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReloadSchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReloadSchemaResponse.verify|verify} messages. - * @param message ReloadSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReloadSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReloadSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReloadSchemaResponse; - - /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReloadSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReloadSchemaResponse; - - /** - * Verifies a ReloadSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReloadSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReloadSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReloadSchemaResponse; - - /** - * Creates a plain object from a ReloadSchemaResponse message. Also converts values to other types if specified. - * @param message ReloadSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReloadSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReloadSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PreflightSchemaRequest. */ - interface IPreflightSchemaRequest { - - /** PreflightSchemaRequest changes */ - changes?: (string[]|null); - } - - /** Represents a PreflightSchemaRequest. */ - class PreflightSchemaRequest implements IPreflightSchemaRequest { - - /** - * Constructs a new PreflightSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPreflightSchemaRequest); - - /** PreflightSchemaRequest changes. */ - public changes: string[]; - - /** - * Creates a new PreflightSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PreflightSchemaRequest instance - */ - public static create(properties?: tabletmanagerdata.IPreflightSchemaRequest): tabletmanagerdata.PreflightSchemaRequest; - - /** - * Encodes the specified PreflightSchemaRequest message. Does not implicitly {@link tabletmanagerdata.PreflightSchemaRequest.verify|verify} messages. - * @param message PreflightSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPreflightSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreflightSchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PreflightSchemaRequest.verify|verify} messages. - * @param message PreflightSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPreflightSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreflightSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreflightSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PreflightSchemaRequest; - - /** - * Decodes a PreflightSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreflightSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PreflightSchemaRequest; - - /** - * Verifies a PreflightSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PreflightSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreflightSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PreflightSchemaRequest; - - /** - * Creates a plain object from a PreflightSchemaRequest message. Also converts values to other types if specified. - * @param message PreflightSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PreflightSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreflightSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PreflightSchemaResponse. */ - interface IPreflightSchemaResponse { - - /** PreflightSchemaResponse change_results */ - change_results?: (tabletmanagerdata.ISchemaChangeResult[]|null); - } - - /** Represents a PreflightSchemaResponse. */ - class PreflightSchemaResponse implements IPreflightSchemaResponse { - - /** - * Constructs a new PreflightSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPreflightSchemaResponse); - - /** PreflightSchemaResponse change_results. */ - public change_results: tabletmanagerdata.ISchemaChangeResult[]; - - /** - * Creates a new PreflightSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PreflightSchemaResponse instance - */ - public static create(properties?: tabletmanagerdata.IPreflightSchemaResponse): tabletmanagerdata.PreflightSchemaResponse; - - /** - * Encodes the specified PreflightSchemaResponse message. Does not implicitly {@link tabletmanagerdata.PreflightSchemaResponse.verify|verify} messages. - * @param message PreflightSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPreflightSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreflightSchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PreflightSchemaResponse.verify|verify} messages. - * @param message PreflightSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPreflightSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreflightSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreflightSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PreflightSchemaResponse; - - /** - * Decodes a PreflightSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreflightSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PreflightSchemaResponse; - - /** - * Verifies a PreflightSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PreflightSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreflightSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PreflightSchemaResponse; - - /** - * Creates a plain object from a PreflightSchemaResponse message. Also converts values to other types if specified. - * @param message PreflightSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PreflightSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreflightSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ApplySchemaRequest. */ - interface IApplySchemaRequest { - - /** ApplySchemaRequest sql */ - sql?: (string|null); - - /** ApplySchemaRequest force */ - force?: (boolean|null); - - /** ApplySchemaRequest allow_replication */ - allow_replication?: (boolean|null); - - /** ApplySchemaRequest before_schema */ - before_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** ApplySchemaRequest after_schema */ - after_schema?: (tabletmanagerdata.ISchemaDefinition|null); - } - - /** Represents an ApplySchemaRequest. */ - class ApplySchemaRequest implements IApplySchemaRequest { - - /** - * Constructs a new ApplySchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IApplySchemaRequest); - - /** ApplySchemaRequest sql. */ - public sql: string; - - /** ApplySchemaRequest force. */ - public force: boolean; - - /** ApplySchemaRequest allow_replication. */ - public allow_replication: boolean; - - /** ApplySchemaRequest before_schema. */ - public before_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** ApplySchemaRequest after_schema. */ - public after_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** - * Creates a new ApplySchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ApplySchemaRequest instance - */ - public static create(properties?: tabletmanagerdata.IApplySchemaRequest): tabletmanagerdata.ApplySchemaRequest; - - /** - * Encodes the specified ApplySchemaRequest message. Does not implicitly {@link tabletmanagerdata.ApplySchemaRequest.verify|verify} messages. - * @param message ApplySchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IApplySchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApplySchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ApplySchemaRequest.verify|verify} messages. - * @param message ApplySchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IApplySchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApplySchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ApplySchemaRequest; - - /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApplySchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ApplySchemaRequest; - - /** - * Verifies an ApplySchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ApplySchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApplySchemaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ApplySchemaRequest; - - /** - * Creates a plain object from an ApplySchemaRequest message. Also converts values to other types if specified. - * @param message ApplySchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ApplySchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApplySchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ApplySchemaResponse. */ - interface IApplySchemaResponse { - - /** ApplySchemaResponse before_schema */ - before_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** ApplySchemaResponse after_schema */ - after_schema?: (tabletmanagerdata.ISchemaDefinition|null); - } - - /** Represents an ApplySchemaResponse. */ - class ApplySchemaResponse implements IApplySchemaResponse { - - /** - * Constructs a new ApplySchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IApplySchemaResponse); - - /** ApplySchemaResponse before_schema. */ - public before_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** ApplySchemaResponse after_schema. */ - public after_schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** - * Creates a new ApplySchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ApplySchemaResponse instance - */ - public static create(properties?: tabletmanagerdata.IApplySchemaResponse): tabletmanagerdata.ApplySchemaResponse; - - /** - * Encodes the specified ApplySchemaResponse message. Does not implicitly {@link tabletmanagerdata.ApplySchemaResponse.verify|verify} messages. - * @param message ApplySchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IApplySchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApplySchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ApplySchemaResponse.verify|verify} messages. - * @param message ApplySchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IApplySchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApplySchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ApplySchemaResponse; - - /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApplySchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ApplySchemaResponse; - - /** - * Verifies an ApplySchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ApplySchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApplySchemaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ApplySchemaResponse; - - /** - * Creates a plain object from an ApplySchemaResponse message. Also converts values to other types if specified. - * @param message ApplySchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ApplySchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApplySchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LockTablesRequest. */ - interface ILockTablesRequest { - } - - /** Represents a LockTablesRequest. */ - class LockTablesRequest implements ILockTablesRequest { - - /** - * Constructs a new LockTablesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ILockTablesRequest); - - /** - * Creates a new LockTablesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LockTablesRequest instance - */ - public static create(properties?: tabletmanagerdata.ILockTablesRequest): tabletmanagerdata.LockTablesRequest; - - /** - * Encodes the specified LockTablesRequest message. Does not implicitly {@link tabletmanagerdata.LockTablesRequest.verify|verify} messages. - * @param message LockTablesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ILockTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LockTablesRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.LockTablesRequest.verify|verify} messages. - * @param message LockTablesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ILockTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LockTablesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.LockTablesRequest; - - /** - * Decodes a LockTablesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.LockTablesRequest; - - /** - * Verifies a LockTablesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LockTablesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LockTablesRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.LockTablesRequest; - - /** - * Creates a plain object from a LockTablesRequest message. Also converts values to other types if specified. - * @param message LockTablesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.LockTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LockTablesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LockTablesResponse. */ - interface ILockTablesResponse { - } - - /** Represents a LockTablesResponse. */ - class LockTablesResponse implements ILockTablesResponse { - - /** - * Constructs a new LockTablesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ILockTablesResponse); - - /** - * Creates a new LockTablesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns LockTablesResponse instance - */ - public static create(properties?: tabletmanagerdata.ILockTablesResponse): tabletmanagerdata.LockTablesResponse; - - /** - * Encodes the specified LockTablesResponse message. Does not implicitly {@link tabletmanagerdata.LockTablesResponse.verify|verify} messages. - * @param message LockTablesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ILockTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LockTablesResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.LockTablesResponse.verify|verify} messages. - * @param message LockTablesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ILockTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LockTablesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.LockTablesResponse; - - /** - * Decodes a LockTablesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.LockTablesResponse; - - /** - * Verifies a LockTablesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LockTablesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LockTablesResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.LockTablesResponse; - - /** - * Creates a plain object from a LockTablesResponse message. Also converts values to other types if specified. - * @param message LockTablesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.LockTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LockTablesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UnlockTablesRequest. */ - interface IUnlockTablesRequest { - } - - /** Represents an UnlockTablesRequest. */ - class UnlockTablesRequest implements IUnlockTablesRequest { - - /** - * Constructs a new UnlockTablesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IUnlockTablesRequest); - - /** - * Creates a new UnlockTablesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UnlockTablesRequest instance - */ - public static create(properties?: tabletmanagerdata.IUnlockTablesRequest): tabletmanagerdata.UnlockTablesRequest; - - /** - * Encodes the specified UnlockTablesRequest message. Does not implicitly {@link tabletmanagerdata.UnlockTablesRequest.verify|verify} messages. - * @param message UnlockTablesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IUnlockTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnlockTablesRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.UnlockTablesRequest.verify|verify} messages. - * @param message UnlockTablesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IUnlockTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnlockTablesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnlockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UnlockTablesRequest; - - /** - * Decodes an UnlockTablesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnlockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UnlockTablesRequest; - - /** - * Verifies an UnlockTablesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UnlockTablesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnlockTablesRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UnlockTablesRequest; - - /** - * Creates a plain object from an UnlockTablesRequest message. Also converts values to other types if specified. - * @param message UnlockTablesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.UnlockTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnlockTablesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UnlockTablesResponse. */ - interface IUnlockTablesResponse { - } - - /** Represents an UnlockTablesResponse. */ - class UnlockTablesResponse implements IUnlockTablesResponse { - - /** - * Constructs a new UnlockTablesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IUnlockTablesResponse); - - /** - * Creates a new UnlockTablesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UnlockTablesResponse instance - */ - public static create(properties?: tabletmanagerdata.IUnlockTablesResponse): tabletmanagerdata.UnlockTablesResponse; - - /** - * Encodes the specified UnlockTablesResponse message. Does not implicitly {@link tabletmanagerdata.UnlockTablesResponse.verify|verify} messages. - * @param message UnlockTablesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IUnlockTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnlockTablesResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.UnlockTablesResponse.verify|verify} messages. - * @param message UnlockTablesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IUnlockTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnlockTablesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnlockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UnlockTablesResponse; - - /** - * Decodes an UnlockTablesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnlockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UnlockTablesResponse; - - /** - * Verifies an UnlockTablesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UnlockTablesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnlockTablesResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UnlockTablesResponse; - - /** - * Creates a plain object from an UnlockTablesResponse message. Also converts values to other types if specified. - * @param message UnlockTablesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.UnlockTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnlockTablesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteFetchAsDbaRequest. */ - interface IExecuteFetchAsDbaRequest { - - /** ExecuteFetchAsDbaRequest query */ - query?: (Uint8Array|null); - - /** ExecuteFetchAsDbaRequest db_name */ - db_name?: (string|null); - - /** ExecuteFetchAsDbaRequest max_rows */ - max_rows?: (number|Long|null); - - /** ExecuteFetchAsDbaRequest disable_binlogs */ - disable_binlogs?: (boolean|null); - - /** ExecuteFetchAsDbaRequest reload_schema */ - reload_schema?: (boolean|null); - } - - /** Represents an ExecuteFetchAsDbaRequest. */ - class ExecuteFetchAsDbaRequest implements IExecuteFetchAsDbaRequest { - - /** - * Constructs a new ExecuteFetchAsDbaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteFetchAsDbaRequest); - - /** ExecuteFetchAsDbaRequest query. */ - public query: Uint8Array; - - /** ExecuteFetchAsDbaRequest db_name. */ - public db_name: string; - - /** ExecuteFetchAsDbaRequest max_rows. */ - public max_rows: (number|Long); - - /** ExecuteFetchAsDbaRequest disable_binlogs. */ - public disable_binlogs: boolean; - - /** ExecuteFetchAsDbaRequest reload_schema. */ - public reload_schema: boolean; - - /** - * Creates a new ExecuteFetchAsDbaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteFetchAsDbaRequest instance - */ - public static create(properties?: tabletmanagerdata.IExecuteFetchAsDbaRequest): tabletmanagerdata.ExecuteFetchAsDbaRequest; - - /** - * Encodes the specified ExecuteFetchAsDbaRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaRequest.verify|verify} messages. - * @param message ExecuteFetchAsDbaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteFetchAsDbaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteFetchAsDbaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaRequest.verify|verify} messages. - * @param message ExecuteFetchAsDbaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteFetchAsDbaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteFetchAsDbaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsDbaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteFetchAsDbaRequest; - - /** - * Decodes an ExecuteFetchAsDbaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsDbaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteFetchAsDbaRequest; - - /** - * Verifies an ExecuteFetchAsDbaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteFetchAsDbaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteFetchAsDbaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteFetchAsDbaRequest; - - /** - * Creates a plain object from an ExecuteFetchAsDbaRequest message. Also converts values to other types if specified. - * @param message ExecuteFetchAsDbaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteFetchAsDbaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteFetchAsDbaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteFetchAsDbaResponse. */ - interface IExecuteFetchAsDbaResponse { - - /** ExecuteFetchAsDbaResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents an ExecuteFetchAsDbaResponse. */ - class ExecuteFetchAsDbaResponse implements IExecuteFetchAsDbaResponse { - - /** - * Constructs a new ExecuteFetchAsDbaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteFetchAsDbaResponse); - - /** ExecuteFetchAsDbaResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new ExecuteFetchAsDbaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteFetchAsDbaResponse instance - */ - public static create(properties?: tabletmanagerdata.IExecuteFetchAsDbaResponse): tabletmanagerdata.ExecuteFetchAsDbaResponse; - - /** - * Encodes the specified ExecuteFetchAsDbaResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaResponse.verify|verify} messages. - * @param message ExecuteFetchAsDbaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteFetchAsDbaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteFetchAsDbaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaResponse.verify|verify} messages. - * @param message ExecuteFetchAsDbaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteFetchAsDbaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteFetchAsDbaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsDbaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteFetchAsDbaResponse; - - /** - * Decodes an ExecuteFetchAsDbaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsDbaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteFetchAsDbaResponse; - - /** - * Verifies an ExecuteFetchAsDbaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteFetchAsDbaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteFetchAsDbaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteFetchAsDbaResponse; - - /** - * Creates a plain object from an ExecuteFetchAsDbaResponse message. Also converts values to other types if specified. - * @param message ExecuteFetchAsDbaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteFetchAsDbaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteFetchAsDbaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteFetchAsAllPrivsRequest. */ - interface IExecuteFetchAsAllPrivsRequest { - - /** ExecuteFetchAsAllPrivsRequest query */ - query?: (Uint8Array|null); - - /** ExecuteFetchAsAllPrivsRequest db_name */ - db_name?: (string|null); - - /** ExecuteFetchAsAllPrivsRequest max_rows */ - max_rows?: (number|Long|null); - - /** ExecuteFetchAsAllPrivsRequest reload_schema */ - reload_schema?: (boolean|null); - } - - /** Represents an ExecuteFetchAsAllPrivsRequest. */ - class ExecuteFetchAsAllPrivsRequest implements IExecuteFetchAsAllPrivsRequest { - - /** - * Constructs a new ExecuteFetchAsAllPrivsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteFetchAsAllPrivsRequest); - - /** ExecuteFetchAsAllPrivsRequest query. */ - public query: Uint8Array; - - /** ExecuteFetchAsAllPrivsRequest db_name. */ - public db_name: string; - - /** ExecuteFetchAsAllPrivsRequest max_rows. */ - public max_rows: (number|Long); - - /** ExecuteFetchAsAllPrivsRequest reload_schema. */ - public reload_schema: boolean; - - /** - * Creates a new ExecuteFetchAsAllPrivsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteFetchAsAllPrivsRequest instance - */ - public static create(properties?: tabletmanagerdata.IExecuteFetchAsAllPrivsRequest): tabletmanagerdata.ExecuteFetchAsAllPrivsRequest; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsRequest.verify|verify} messages. - * @param message ExecuteFetchAsAllPrivsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteFetchAsAllPrivsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsRequest.verify|verify} messages. - * @param message ExecuteFetchAsAllPrivsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteFetchAsAllPrivsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteFetchAsAllPrivsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsAllPrivsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteFetchAsAllPrivsRequest; - - /** - * Decodes an ExecuteFetchAsAllPrivsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsAllPrivsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteFetchAsAllPrivsRequest; - - /** - * Verifies an ExecuteFetchAsAllPrivsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteFetchAsAllPrivsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteFetchAsAllPrivsRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteFetchAsAllPrivsRequest; - - /** - * Creates a plain object from an ExecuteFetchAsAllPrivsRequest message. Also converts values to other types if specified. - * @param message ExecuteFetchAsAllPrivsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteFetchAsAllPrivsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteFetchAsAllPrivsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteFetchAsAllPrivsResponse. */ - interface IExecuteFetchAsAllPrivsResponse { - - /** ExecuteFetchAsAllPrivsResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents an ExecuteFetchAsAllPrivsResponse. */ - class ExecuteFetchAsAllPrivsResponse implements IExecuteFetchAsAllPrivsResponse { - - /** - * Constructs a new ExecuteFetchAsAllPrivsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteFetchAsAllPrivsResponse); - - /** ExecuteFetchAsAllPrivsResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new ExecuteFetchAsAllPrivsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteFetchAsAllPrivsResponse instance - */ - public static create(properties?: tabletmanagerdata.IExecuteFetchAsAllPrivsResponse): tabletmanagerdata.ExecuteFetchAsAllPrivsResponse; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsResponse.verify|verify} messages. - * @param message ExecuteFetchAsAllPrivsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteFetchAsAllPrivsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsResponse.verify|verify} messages. - * @param message ExecuteFetchAsAllPrivsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteFetchAsAllPrivsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteFetchAsAllPrivsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsAllPrivsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteFetchAsAllPrivsResponse; - - /** - * Decodes an ExecuteFetchAsAllPrivsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsAllPrivsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteFetchAsAllPrivsResponse; - - /** - * Verifies an ExecuteFetchAsAllPrivsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteFetchAsAllPrivsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteFetchAsAllPrivsResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteFetchAsAllPrivsResponse; - - /** - * Creates a plain object from an ExecuteFetchAsAllPrivsResponse message. Also converts values to other types if specified. - * @param message ExecuteFetchAsAllPrivsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteFetchAsAllPrivsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteFetchAsAllPrivsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteFetchAsAppRequest. */ - interface IExecuteFetchAsAppRequest { - - /** ExecuteFetchAsAppRequest query */ - query?: (Uint8Array|null); - - /** ExecuteFetchAsAppRequest max_rows */ - max_rows?: (number|Long|null); - } - - /** Represents an ExecuteFetchAsAppRequest. */ - class ExecuteFetchAsAppRequest implements IExecuteFetchAsAppRequest { - - /** - * Constructs a new ExecuteFetchAsAppRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteFetchAsAppRequest); - - /** ExecuteFetchAsAppRequest query. */ - public query: Uint8Array; - - /** ExecuteFetchAsAppRequest max_rows. */ - public max_rows: (number|Long); - - /** - * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteFetchAsAppRequest instance - */ - public static create(properties?: tabletmanagerdata.IExecuteFetchAsAppRequest): tabletmanagerdata.ExecuteFetchAsAppRequest; - - /** - * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppRequest.verify|verify} messages. - * @param message ExecuteFetchAsAppRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteFetchAsAppRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppRequest.verify|verify} messages. - * @param message ExecuteFetchAsAppRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteFetchAsAppRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsAppRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteFetchAsAppRequest; - - /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsAppRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteFetchAsAppRequest; - - /** - * Verifies an ExecuteFetchAsAppRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteFetchAsAppRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteFetchAsAppRequest; - - /** - * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. - * @param message ExecuteFetchAsAppRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteFetchAsAppRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteFetchAsAppRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteFetchAsAppResponse. */ - interface IExecuteFetchAsAppResponse { - - /** ExecuteFetchAsAppResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents an ExecuteFetchAsAppResponse. */ - class ExecuteFetchAsAppResponse implements IExecuteFetchAsAppResponse { - - /** - * Constructs a new ExecuteFetchAsAppResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IExecuteFetchAsAppResponse); - - /** ExecuteFetchAsAppResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteFetchAsAppResponse instance - */ - public static create(properties?: tabletmanagerdata.IExecuteFetchAsAppResponse): tabletmanagerdata.ExecuteFetchAsAppResponse; - - /** - * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppResponse.verify|verify} messages. - * @param message ExecuteFetchAsAppResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IExecuteFetchAsAppResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppResponse.verify|verify} messages. - * @param message ExecuteFetchAsAppResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IExecuteFetchAsAppResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteFetchAsAppResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ExecuteFetchAsAppResponse; - - /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteFetchAsAppResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ExecuteFetchAsAppResponse; - - /** - * Verifies an ExecuteFetchAsAppResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteFetchAsAppResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ExecuteFetchAsAppResponse; - - /** - * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. - * @param message ExecuteFetchAsAppResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ExecuteFetchAsAppResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteFetchAsAppResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReplicationStatusRequest. */ - interface IReplicationStatusRequest { - } - - /** Represents a ReplicationStatusRequest. */ - class ReplicationStatusRequest implements IReplicationStatusRequest { - - /** - * Constructs a new ReplicationStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReplicationStatusRequest); - - /** - * Creates a new ReplicationStatusRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicationStatusRequest instance - */ - public static create(properties?: tabletmanagerdata.IReplicationStatusRequest): tabletmanagerdata.ReplicationStatusRequest; - - /** - * Encodes the specified ReplicationStatusRequest message. Does not implicitly {@link tabletmanagerdata.ReplicationStatusRequest.verify|verify} messages. - * @param message ReplicationStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReplicationStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicationStatusRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicationStatusRequest.verify|verify} messages. - * @param message ReplicationStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReplicationStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicationStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicationStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReplicationStatusRequest; - - /** - * Decodes a ReplicationStatusRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicationStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReplicationStatusRequest; - - /** - * Verifies a ReplicationStatusRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicationStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicationStatusRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReplicationStatusRequest; - - /** - * Creates a plain object from a ReplicationStatusRequest message. Also converts values to other types if specified. - * @param message ReplicationStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReplicationStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicationStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReplicationStatusResponse. */ - interface IReplicationStatusResponse { - - /** ReplicationStatusResponse status */ - status?: (replicationdata.IStatus|null); - } - - /** Represents a ReplicationStatusResponse. */ - class ReplicationStatusResponse implements IReplicationStatusResponse { - - /** - * Constructs a new ReplicationStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReplicationStatusResponse); - - /** ReplicationStatusResponse status. */ - public status?: (replicationdata.IStatus|null); - - /** - * Creates a new ReplicationStatusResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicationStatusResponse instance - */ - public static create(properties?: tabletmanagerdata.IReplicationStatusResponse): tabletmanagerdata.ReplicationStatusResponse; - - /** - * Encodes the specified ReplicationStatusResponse message. Does not implicitly {@link tabletmanagerdata.ReplicationStatusResponse.verify|verify} messages. - * @param message ReplicationStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReplicationStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicationStatusResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicationStatusResponse.verify|verify} messages. - * @param message ReplicationStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReplicationStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicationStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicationStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReplicationStatusResponse; - - /** - * Decodes a ReplicationStatusResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicationStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReplicationStatusResponse; - - /** - * Verifies a ReplicationStatusResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicationStatusResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicationStatusResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReplicationStatusResponse; - - /** - * Creates a plain object from a ReplicationStatusResponse message. Also converts values to other types if specified. - * @param message ReplicationStatusResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReplicationStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicationStatusResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MasterStatusRequest. */ - interface IMasterStatusRequest { - } - - /** Represents a MasterStatusRequest. */ - class MasterStatusRequest implements IMasterStatusRequest { - - /** - * Constructs a new MasterStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IMasterStatusRequest); - - /** - * Creates a new MasterStatusRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterStatusRequest instance - */ - public static create(properties?: tabletmanagerdata.IMasterStatusRequest): tabletmanagerdata.MasterStatusRequest; - - /** - * Encodes the specified MasterStatusRequest message. Does not implicitly {@link tabletmanagerdata.MasterStatusRequest.verify|verify} messages. - * @param message MasterStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IMasterStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterStatusRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterStatusRequest.verify|verify} messages. - * @param message MasterStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IMasterStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.MasterStatusRequest; - - /** - * Decodes a MasterStatusRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.MasterStatusRequest; - - /** - * Verifies a MasterStatusRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterStatusRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.MasterStatusRequest; - - /** - * Creates a plain object from a MasterStatusRequest message. Also converts values to other types if specified. - * @param message MasterStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.MasterStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MasterStatusResponse. */ - interface IMasterStatusResponse { - - /** MasterStatusResponse status */ - status?: (replicationdata.IMasterStatus|null); - } - - /** Represents a MasterStatusResponse. */ - class MasterStatusResponse implements IMasterStatusResponse { - - /** - * Constructs a new MasterStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IMasterStatusResponse); - - /** MasterStatusResponse status. */ - public status?: (replicationdata.IMasterStatus|null); - - /** - * Creates a new MasterStatusResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterStatusResponse instance - */ - public static create(properties?: tabletmanagerdata.IMasterStatusResponse): tabletmanagerdata.MasterStatusResponse; - - /** - * Encodes the specified MasterStatusResponse message. Does not implicitly {@link tabletmanagerdata.MasterStatusResponse.verify|verify} messages. - * @param message MasterStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IMasterStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterStatusResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterStatusResponse.verify|verify} messages. - * @param message MasterStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IMasterStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.MasterStatusResponse; - - /** - * Decodes a MasterStatusResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.MasterStatusResponse; - - /** - * Verifies a MasterStatusResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterStatusResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterStatusResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.MasterStatusResponse; - - /** - * Creates a plain object from a MasterStatusResponse message. Also converts values to other types if specified. - * @param message MasterStatusResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.MasterStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterStatusResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MasterPositionRequest. */ - interface IMasterPositionRequest { - } - - /** Represents a MasterPositionRequest. */ - class MasterPositionRequest implements IMasterPositionRequest { - - /** - * Constructs a new MasterPositionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IMasterPositionRequest); - - /** - * Creates a new MasterPositionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterPositionRequest instance - */ - public static create(properties?: tabletmanagerdata.IMasterPositionRequest): tabletmanagerdata.MasterPositionRequest; - - /** - * Encodes the specified MasterPositionRequest message. Does not implicitly {@link tabletmanagerdata.MasterPositionRequest.verify|verify} messages. - * @param message MasterPositionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IMasterPositionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterPositionRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterPositionRequest.verify|verify} messages. - * @param message MasterPositionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IMasterPositionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterPositionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.MasterPositionRequest; - - /** - * Decodes a MasterPositionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.MasterPositionRequest; - - /** - * Verifies a MasterPositionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterPositionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterPositionRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.MasterPositionRequest; - - /** - * Creates a plain object from a MasterPositionRequest message. Also converts values to other types if specified. - * @param message MasterPositionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.MasterPositionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterPositionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MasterPositionResponse. */ - interface IMasterPositionResponse { - - /** MasterPositionResponse position */ - position?: (string|null); - } - - /** Represents a MasterPositionResponse. */ - class MasterPositionResponse implements IMasterPositionResponse { - - /** - * Constructs a new MasterPositionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IMasterPositionResponse); - - /** MasterPositionResponse position. */ - public position: string; - - /** - * Creates a new MasterPositionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterPositionResponse instance - */ - public static create(properties?: tabletmanagerdata.IMasterPositionResponse): tabletmanagerdata.MasterPositionResponse; - - /** - * Encodes the specified MasterPositionResponse message. Does not implicitly {@link tabletmanagerdata.MasterPositionResponse.verify|verify} messages. - * @param message MasterPositionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IMasterPositionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterPositionResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterPositionResponse.verify|verify} messages. - * @param message MasterPositionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IMasterPositionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterPositionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.MasterPositionResponse; - - /** - * Decodes a MasterPositionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.MasterPositionResponse; - - /** - * Verifies a MasterPositionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterPositionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterPositionResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.MasterPositionResponse; - - /** - * Creates a plain object from a MasterPositionResponse message. Also converts values to other types if specified. - * @param message MasterPositionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.MasterPositionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterPositionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WaitForPositionRequest. */ - interface IWaitForPositionRequest { - - /** WaitForPositionRequest position */ - position?: (string|null); - } - - /** Represents a WaitForPositionRequest. */ - class WaitForPositionRequest implements IWaitForPositionRequest { - - /** - * Constructs a new WaitForPositionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IWaitForPositionRequest); - - /** WaitForPositionRequest position. */ - public position: string; - - /** - * Creates a new WaitForPositionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitForPositionRequest instance - */ - public static create(properties?: tabletmanagerdata.IWaitForPositionRequest): tabletmanagerdata.WaitForPositionRequest; - - /** - * Encodes the specified WaitForPositionRequest message. Does not implicitly {@link tabletmanagerdata.WaitForPositionRequest.verify|verify} messages. - * @param message WaitForPositionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IWaitForPositionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitForPositionRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.WaitForPositionRequest.verify|verify} messages. - * @param message WaitForPositionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IWaitForPositionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitForPositionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitForPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.WaitForPositionRequest; - - /** - * Decodes a WaitForPositionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitForPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.WaitForPositionRequest; - - /** - * Verifies a WaitForPositionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitForPositionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitForPositionRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.WaitForPositionRequest; - - /** - * Creates a plain object from a WaitForPositionRequest message. Also converts values to other types if specified. - * @param message WaitForPositionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.WaitForPositionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitForPositionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WaitForPositionResponse. */ - interface IWaitForPositionResponse { - } - - /** Represents a WaitForPositionResponse. */ - class WaitForPositionResponse implements IWaitForPositionResponse { - - /** - * Constructs a new WaitForPositionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IWaitForPositionResponse); - - /** - * Creates a new WaitForPositionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitForPositionResponse instance - */ - public static create(properties?: tabletmanagerdata.IWaitForPositionResponse): tabletmanagerdata.WaitForPositionResponse; - - /** - * Encodes the specified WaitForPositionResponse message. Does not implicitly {@link tabletmanagerdata.WaitForPositionResponse.verify|verify} messages. - * @param message WaitForPositionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IWaitForPositionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitForPositionResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.WaitForPositionResponse.verify|verify} messages. - * @param message WaitForPositionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IWaitForPositionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitForPositionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitForPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.WaitForPositionResponse; - - /** - * Decodes a WaitForPositionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitForPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.WaitForPositionResponse; - - /** - * Verifies a WaitForPositionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WaitForPositionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitForPositionResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.WaitForPositionResponse; - - /** - * Creates a plain object from a WaitForPositionResponse message. Also converts values to other types if specified. - * @param message WaitForPositionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.WaitForPositionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitForPositionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationRequest. */ - interface IStopReplicationRequest { - } - - /** Represents a StopReplicationRequest. */ - class StopReplicationRequest implements IStopReplicationRequest { - - /** - * Constructs a new StopReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStopReplicationRequest); - - /** - * Creates a new StopReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationRequest instance - */ - public static create(properties?: tabletmanagerdata.IStopReplicationRequest): tabletmanagerdata.StopReplicationRequest; - - /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link tabletmanagerdata.StopReplicationRequest.verify|verify} messages. - * @param message StopReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationRequest.verify|verify} messages. - * @param message StopReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StopReplicationRequest; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StopReplicationRequest; - - /** - * Verifies a StopReplicationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StopReplicationRequest; - - /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. - * @param message StopReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StopReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationResponse. */ - interface IStopReplicationResponse { - } - - /** Represents a StopReplicationResponse. */ - class StopReplicationResponse implements IStopReplicationResponse { - - /** - * Constructs a new StopReplicationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStopReplicationResponse); - - /** - * Creates a new StopReplicationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationResponse instance - */ - public static create(properties?: tabletmanagerdata.IStopReplicationResponse): tabletmanagerdata.StopReplicationResponse; - - /** - * Encodes the specified StopReplicationResponse message. Does not implicitly {@link tabletmanagerdata.StopReplicationResponse.verify|verify} messages. - * @param message StopReplicationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStopReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationResponse.verify|verify} messages. - * @param message StopReplicationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStopReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StopReplicationResponse; - - /** - * Decodes a StopReplicationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StopReplicationResponse; - - /** - * Verifies a StopReplicationResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StopReplicationResponse; - - /** - * Creates a plain object from a StopReplicationResponse message. Also converts values to other types if specified. - * @param message StopReplicationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StopReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationMinimumRequest. */ - interface IStopReplicationMinimumRequest { - - /** StopReplicationMinimumRequest position */ - position?: (string|null); - - /** StopReplicationMinimumRequest wait_timeout */ - wait_timeout?: (number|Long|null); - } - - /** Represents a StopReplicationMinimumRequest. */ - class StopReplicationMinimumRequest implements IStopReplicationMinimumRequest { - - /** - * Constructs a new StopReplicationMinimumRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStopReplicationMinimumRequest); - - /** StopReplicationMinimumRequest position. */ - public position: string; - - /** StopReplicationMinimumRequest wait_timeout. */ - public wait_timeout: (number|Long); - - /** - * Creates a new StopReplicationMinimumRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationMinimumRequest instance - */ - public static create(properties?: tabletmanagerdata.IStopReplicationMinimumRequest): tabletmanagerdata.StopReplicationMinimumRequest; - - /** - * Encodes the specified StopReplicationMinimumRequest message. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumRequest.verify|verify} messages. - * @param message StopReplicationMinimumRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStopReplicationMinimumRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationMinimumRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumRequest.verify|verify} messages. - * @param message StopReplicationMinimumRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStopReplicationMinimumRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationMinimumRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationMinimumRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StopReplicationMinimumRequest; - - /** - * Decodes a StopReplicationMinimumRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationMinimumRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StopReplicationMinimumRequest; - - /** - * Verifies a StopReplicationMinimumRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationMinimumRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationMinimumRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StopReplicationMinimumRequest; - - /** - * Creates a plain object from a StopReplicationMinimumRequest message. Also converts values to other types if specified. - * @param message StopReplicationMinimumRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StopReplicationMinimumRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationMinimumRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationMinimumResponse. */ - interface IStopReplicationMinimumResponse { - - /** StopReplicationMinimumResponse position */ - position?: (string|null); - } - - /** Represents a StopReplicationMinimumResponse. */ - class StopReplicationMinimumResponse implements IStopReplicationMinimumResponse { - - /** - * Constructs a new StopReplicationMinimumResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStopReplicationMinimumResponse); - - /** StopReplicationMinimumResponse position. */ - public position: string; - - /** - * Creates a new StopReplicationMinimumResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationMinimumResponse instance - */ - public static create(properties?: tabletmanagerdata.IStopReplicationMinimumResponse): tabletmanagerdata.StopReplicationMinimumResponse; - - /** - * Encodes the specified StopReplicationMinimumResponse message. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumResponse.verify|verify} messages. - * @param message StopReplicationMinimumResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStopReplicationMinimumResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationMinimumResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumResponse.verify|verify} messages. - * @param message StopReplicationMinimumResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStopReplicationMinimumResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationMinimumResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationMinimumResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StopReplicationMinimumResponse; - - /** - * Decodes a StopReplicationMinimumResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationMinimumResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StopReplicationMinimumResponse; - - /** - * Verifies a StopReplicationMinimumResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationMinimumResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationMinimumResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StopReplicationMinimumResponse; - - /** - * Creates a plain object from a StopReplicationMinimumResponse message. Also converts values to other types if specified. - * @param message StopReplicationMinimumResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StopReplicationMinimumResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationMinimumResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StartReplicationRequest. */ - interface IStartReplicationRequest { - } - - /** Represents a StartReplicationRequest. */ - class StartReplicationRequest implements IStartReplicationRequest { - - /** - * Constructs a new StartReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStartReplicationRequest); - - /** - * Creates a new StartReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartReplicationRequest instance - */ - public static create(properties?: tabletmanagerdata.IStartReplicationRequest): tabletmanagerdata.StartReplicationRequest; - - /** - * Encodes the specified StartReplicationRequest message. Does not implicitly {@link tabletmanagerdata.StartReplicationRequest.verify|verify} messages. - * @param message StartReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStartReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartReplicationRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationRequest.verify|verify} messages. - * @param message StartReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStartReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StartReplicationRequest; - - /** - * Decodes a StartReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StartReplicationRequest; - - /** - * Verifies a StartReplicationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StartReplicationRequest; - - /** - * Creates a plain object from a StartReplicationRequest message. Also converts values to other types if specified. - * @param message StartReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StartReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StartReplicationResponse. */ - interface IStartReplicationResponse { - } - - /** Represents a StartReplicationResponse. */ - class StartReplicationResponse implements IStartReplicationResponse { - - /** - * Constructs a new StartReplicationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStartReplicationResponse); - - /** - * Creates a new StartReplicationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartReplicationResponse instance - */ - public static create(properties?: tabletmanagerdata.IStartReplicationResponse): tabletmanagerdata.StartReplicationResponse; - - /** - * Encodes the specified StartReplicationResponse message. Does not implicitly {@link tabletmanagerdata.StartReplicationResponse.verify|verify} messages. - * @param message StartReplicationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStartReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartReplicationResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationResponse.verify|verify} messages. - * @param message StartReplicationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStartReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartReplicationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StartReplicationResponse; - - /** - * Decodes a StartReplicationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StartReplicationResponse; - - /** - * Verifies a StartReplicationResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartReplicationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartReplicationResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StartReplicationResponse; - - /** - * Creates a plain object from a StartReplicationResponse message. Also converts values to other types if specified. - * @param message StartReplicationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StartReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartReplicationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StartReplicationUntilAfterRequest. */ - interface IStartReplicationUntilAfterRequest { - - /** StartReplicationUntilAfterRequest position */ - position?: (string|null); - - /** StartReplicationUntilAfterRequest wait_timeout */ - wait_timeout?: (number|Long|null); - } - - /** Represents a StartReplicationUntilAfterRequest. */ - class StartReplicationUntilAfterRequest implements IStartReplicationUntilAfterRequest { - - /** - * Constructs a new StartReplicationUntilAfterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStartReplicationUntilAfterRequest); - - /** StartReplicationUntilAfterRequest position. */ - public position: string; - - /** StartReplicationUntilAfterRequest wait_timeout. */ - public wait_timeout: (number|Long); - - /** - * Creates a new StartReplicationUntilAfterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartReplicationUntilAfterRequest instance - */ - public static create(properties?: tabletmanagerdata.IStartReplicationUntilAfterRequest): tabletmanagerdata.StartReplicationUntilAfterRequest; - - /** - * Encodes the specified StartReplicationUntilAfterRequest message. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterRequest.verify|verify} messages. - * @param message StartReplicationUntilAfterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStartReplicationUntilAfterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartReplicationUntilAfterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterRequest.verify|verify} messages. - * @param message StartReplicationUntilAfterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStartReplicationUntilAfterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartReplicationUntilAfterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartReplicationUntilAfterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StartReplicationUntilAfterRequest; - - /** - * Decodes a StartReplicationUntilAfterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartReplicationUntilAfterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StartReplicationUntilAfterRequest; - - /** - * Verifies a StartReplicationUntilAfterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartReplicationUntilAfterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartReplicationUntilAfterRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StartReplicationUntilAfterRequest; - - /** - * Creates a plain object from a StartReplicationUntilAfterRequest message. Also converts values to other types if specified. - * @param message StartReplicationUntilAfterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StartReplicationUntilAfterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartReplicationUntilAfterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StartReplicationUntilAfterResponse. */ - interface IStartReplicationUntilAfterResponse { - } - - /** Represents a StartReplicationUntilAfterResponse. */ - class StartReplicationUntilAfterResponse implements IStartReplicationUntilAfterResponse { - - /** - * Constructs a new StartReplicationUntilAfterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStartReplicationUntilAfterResponse); - - /** - * Creates a new StartReplicationUntilAfterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartReplicationUntilAfterResponse instance - */ - public static create(properties?: tabletmanagerdata.IStartReplicationUntilAfterResponse): tabletmanagerdata.StartReplicationUntilAfterResponse; - - /** - * Encodes the specified StartReplicationUntilAfterResponse message. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterResponse.verify|verify} messages. - * @param message StartReplicationUntilAfterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStartReplicationUntilAfterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartReplicationUntilAfterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterResponse.verify|verify} messages. - * @param message StartReplicationUntilAfterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStartReplicationUntilAfterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartReplicationUntilAfterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartReplicationUntilAfterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StartReplicationUntilAfterResponse; - - /** - * Decodes a StartReplicationUntilAfterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartReplicationUntilAfterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StartReplicationUntilAfterResponse; - - /** - * Verifies a StartReplicationUntilAfterResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartReplicationUntilAfterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartReplicationUntilAfterResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StartReplicationUntilAfterResponse; - - /** - * Creates a plain object from a StartReplicationUntilAfterResponse message. Also converts values to other types if specified. - * @param message StartReplicationUntilAfterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StartReplicationUntilAfterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartReplicationUntilAfterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetReplicasRequest. */ - interface IGetReplicasRequest { - } - - /** Represents a GetReplicasRequest. */ - class GetReplicasRequest implements IGetReplicasRequest { - - /** - * Constructs a new GetReplicasRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IGetReplicasRequest); - - /** - * Creates a new GetReplicasRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetReplicasRequest instance - */ - public static create(properties?: tabletmanagerdata.IGetReplicasRequest): tabletmanagerdata.GetReplicasRequest; - - /** - * Encodes the specified GetReplicasRequest message. Does not implicitly {@link tabletmanagerdata.GetReplicasRequest.verify|verify} messages. - * @param message GetReplicasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IGetReplicasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetReplicasRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.GetReplicasRequest.verify|verify} messages. - * @param message GetReplicasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IGetReplicasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetReplicasRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetReplicasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.GetReplicasRequest; - - /** - * Decodes a GetReplicasRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetReplicasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.GetReplicasRequest; - - /** - * Verifies a GetReplicasRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetReplicasRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetReplicasRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.GetReplicasRequest; - - /** - * Creates a plain object from a GetReplicasRequest message. Also converts values to other types if specified. - * @param message GetReplicasRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.GetReplicasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetReplicasRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetReplicasResponse. */ - interface IGetReplicasResponse { - - /** GetReplicasResponse addrs */ - addrs?: (string[]|null); - } - - /** Represents a GetReplicasResponse. */ - class GetReplicasResponse implements IGetReplicasResponse { - - /** - * Constructs a new GetReplicasResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IGetReplicasResponse); - - /** GetReplicasResponse addrs. */ - public addrs: string[]; - - /** - * Creates a new GetReplicasResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetReplicasResponse instance - */ - public static create(properties?: tabletmanagerdata.IGetReplicasResponse): tabletmanagerdata.GetReplicasResponse; - - /** - * Encodes the specified GetReplicasResponse message. Does not implicitly {@link tabletmanagerdata.GetReplicasResponse.verify|verify} messages. - * @param message GetReplicasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IGetReplicasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetReplicasResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.GetReplicasResponse.verify|verify} messages. - * @param message GetReplicasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IGetReplicasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetReplicasResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetReplicasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.GetReplicasResponse; - - /** - * Decodes a GetReplicasResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetReplicasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.GetReplicasResponse; - - /** - * Verifies a GetReplicasResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetReplicasResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetReplicasResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.GetReplicasResponse; - - /** - * Creates a plain object from a GetReplicasResponse message. Also converts values to other types if specified. - * @param message GetReplicasResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.GetReplicasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetReplicasResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ResetReplicationRequest. */ - interface IResetReplicationRequest { - } - - /** Represents a ResetReplicationRequest. */ - class ResetReplicationRequest implements IResetReplicationRequest { - - /** - * Constructs a new ResetReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IResetReplicationRequest); - - /** - * Creates a new ResetReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetReplicationRequest instance - */ - public static create(properties?: tabletmanagerdata.IResetReplicationRequest): tabletmanagerdata.ResetReplicationRequest; - - /** - * Encodes the specified ResetReplicationRequest message. Does not implicitly {@link tabletmanagerdata.ResetReplicationRequest.verify|verify} messages. - * @param message ResetReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IResetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetReplicationRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ResetReplicationRequest.verify|verify} messages. - * @param message ResetReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IResetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ResetReplicationRequest; - - /** - * Decodes a ResetReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ResetReplicationRequest; - - /** - * Verifies a ResetReplicationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResetReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ResetReplicationRequest; - - /** - * Creates a plain object from a ResetReplicationRequest message. Also converts values to other types if specified. - * @param message ResetReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ResetReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ResetReplicationResponse. */ - interface IResetReplicationResponse { - } - - /** Represents a ResetReplicationResponse. */ - class ResetReplicationResponse implements IResetReplicationResponse { - - /** - * Constructs a new ResetReplicationResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IResetReplicationResponse); - - /** - * Creates a new ResetReplicationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetReplicationResponse instance - */ - public static create(properties?: tabletmanagerdata.IResetReplicationResponse): tabletmanagerdata.ResetReplicationResponse; - - /** - * Encodes the specified ResetReplicationResponse message. Does not implicitly {@link tabletmanagerdata.ResetReplicationResponse.verify|verify} messages. - * @param message ResetReplicationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IResetReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetReplicationResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ResetReplicationResponse.verify|verify} messages. - * @param message ResetReplicationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IResetReplicationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetReplicationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ResetReplicationResponse; - - /** - * Decodes a ResetReplicationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ResetReplicationResponse; - - /** - * Verifies a ResetReplicationResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResetReplicationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetReplicationResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ResetReplicationResponse; - - /** - * Creates a plain object from a ResetReplicationResponse message. Also converts values to other types if specified. - * @param message ResetReplicationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ResetReplicationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetReplicationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VReplicationExecRequest. */ - interface IVReplicationExecRequest { - - /** VReplicationExecRequest query */ - query?: (string|null); - } - - /** Represents a VReplicationExecRequest. */ - class VReplicationExecRequest implements IVReplicationExecRequest { - - /** - * Constructs a new VReplicationExecRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVReplicationExecRequest); - - /** VReplicationExecRequest query. */ - public query: string; - - /** - * Creates a new VReplicationExecRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VReplicationExecRequest instance - */ - public static create(properties?: tabletmanagerdata.IVReplicationExecRequest): tabletmanagerdata.VReplicationExecRequest; - - /** - * Encodes the specified VReplicationExecRequest message. Does not implicitly {@link tabletmanagerdata.VReplicationExecRequest.verify|verify} messages. - * @param message VReplicationExecRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVReplicationExecRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VReplicationExecRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationExecRequest.verify|verify} messages. - * @param message VReplicationExecRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVReplicationExecRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VReplicationExecRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VReplicationExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VReplicationExecRequest; - - /** - * Decodes a VReplicationExecRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VReplicationExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VReplicationExecRequest; - - /** - * Verifies a VReplicationExecRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VReplicationExecRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VReplicationExecRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VReplicationExecRequest; - - /** - * Creates a plain object from a VReplicationExecRequest message. Also converts values to other types if specified. - * @param message VReplicationExecRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VReplicationExecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VReplicationExecRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VReplicationExecResponse. */ - interface IVReplicationExecResponse { - - /** VReplicationExecResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents a VReplicationExecResponse. */ - class VReplicationExecResponse implements IVReplicationExecResponse { - - /** - * Constructs a new VReplicationExecResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVReplicationExecResponse); - - /** VReplicationExecResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new VReplicationExecResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VReplicationExecResponse instance - */ - public static create(properties?: tabletmanagerdata.IVReplicationExecResponse): tabletmanagerdata.VReplicationExecResponse; - - /** - * Encodes the specified VReplicationExecResponse message. Does not implicitly {@link tabletmanagerdata.VReplicationExecResponse.verify|verify} messages. - * @param message VReplicationExecResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVReplicationExecResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VReplicationExecResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationExecResponse.verify|verify} messages. - * @param message VReplicationExecResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVReplicationExecResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VReplicationExecResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VReplicationExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VReplicationExecResponse; - - /** - * Decodes a VReplicationExecResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VReplicationExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VReplicationExecResponse; - - /** - * Verifies a VReplicationExecResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VReplicationExecResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VReplicationExecResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VReplicationExecResponse; - - /** - * Creates a plain object from a VReplicationExecResponse message. Also converts values to other types if specified. - * @param message VReplicationExecResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VReplicationExecResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VReplicationExecResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VReplicationWaitForPosRequest. */ - interface IVReplicationWaitForPosRequest { - - /** VReplicationWaitForPosRequest id */ - id?: (number|Long|null); - - /** VReplicationWaitForPosRequest position */ - position?: (string|null); - } - - /** Represents a VReplicationWaitForPosRequest. */ - class VReplicationWaitForPosRequest implements IVReplicationWaitForPosRequest { - - /** - * Constructs a new VReplicationWaitForPosRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVReplicationWaitForPosRequest); - - /** VReplicationWaitForPosRequest id. */ - public id: (number|Long); - - /** VReplicationWaitForPosRequest position. */ - public position: string; - - /** - * Creates a new VReplicationWaitForPosRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VReplicationWaitForPosRequest instance - */ - public static create(properties?: tabletmanagerdata.IVReplicationWaitForPosRequest): tabletmanagerdata.VReplicationWaitForPosRequest; - - /** - * Encodes the specified VReplicationWaitForPosRequest message. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosRequest.verify|verify} messages. - * @param message VReplicationWaitForPosRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVReplicationWaitForPosRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VReplicationWaitForPosRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosRequest.verify|verify} messages. - * @param message VReplicationWaitForPosRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVReplicationWaitForPosRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VReplicationWaitForPosRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VReplicationWaitForPosRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VReplicationWaitForPosRequest; - - /** - * Decodes a VReplicationWaitForPosRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VReplicationWaitForPosRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VReplicationWaitForPosRequest; - - /** - * Verifies a VReplicationWaitForPosRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VReplicationWaitForPosRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VReplicationWaitForPosRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VReplicationWaitForPosRequest; - - /** - * Creates a plain object from a VReplicationWaitForPosRequest message. Also converts values to other types if specified. - * @param message VReplicationWaitForPosRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VReplicationWaitForPosRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VReplicationWaitForPosRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VReplicationWaitForPosResponse. */ - interface IVReplicationWaitForPosResponse { - } - - /** Represents a VReplicationWaitForPosResponse. */ - class VReplicationWaitForPosResponse implements IVReplicationWaitForPosResponse { - - /** - * Constructs a new VReplicationWaitForPosResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVReplicationWaitForPosResponse); - - /** - * Creates a new VReplicationWaitForPosResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VReplicationWaitForPosResponse instance - */ - public static create(properties?: tabletmanagerdata.IVReplicationWaitForPosResponse): tabletmanagerdata.VReplicationWaitForPosResponse; - - /** - * Encodes the specified VReplicationWaitForPosResponse message. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosResponse.verify|verify} messages. - * @param message VReplicationWaitForPosResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVReplicationWaitForPosResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VReplicationWaitForPosResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosResponse.verify|verify} messages. - * @param message VReplicationWaitForPosResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVReplicationWaitForPosResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VReplicationWaitForPosResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VReplicationWaitForPosResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VReplicationWaitForPosResponse; - - /** - * Decodes a VReplicationWaitForPosResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VReplicationWaitForPosResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VReplicationWaitForPosResponse; - - /** - * Verifies a VReplicationWaitForPosResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VReplicationWaitForPosResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VReplicationWaitForPosResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VReplicationWaitForPosResponse; - - /** - * Creates a plain object from a VReplicationWaitForPosResponse message. Also converts values to other types if specified. - * @param message VReplicationWaitForPosResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VReplicationWaitForPosResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VReplicationWaitForPosResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitMasterRequest. */ - interface IInitMasterRequest { - } - - /** Represents an InitMasterRequest. */ - class InitMasterRequest implements IInitMasterRequest { - - /** - * Constructs a new InitMasterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IInitMasterRequest); - - /** - * Creates a new InitMasterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns InitMasterRequest instance - */ - public static create(properties?: tabletmanagerdata.IInitMasterRequest): tabletmanagerdata.InitMasterRequest; - - /** - * Encodes the specified InitMasterRequest message. Does not implicitly {@link tabletmanagerdata.InitMasterRequest.verify|verify} messages. - * @param message InitMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IInitMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.InitMasterRequest.verify|verify} messages. - * @param message InitMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IInitMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitMasterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.InitMasterRequest; - - /** - * Decodes an InitMasterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.InitMasterRequest; - - /** - * Verifies an InitMasterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitMasterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitMasterRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.InitMasterRequest; - - /** - * Creates a plain object from an InitMasterRequest message. Also converts values to other types if specified. - * @param message InitMasterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.InitMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitMasterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitMasterResponse. */ - interface IInitMasterResponse { - - /** InitMasterResponse position */ - position?: (string|null); - } - - /** Represents an InitMasterResponse. */ - class InitMasterResponse implements IInitMasterResponse { - - /** - * Constructs a new InitMasterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IInitMasterResponse); - - /** InitMasterResponse position. */ - public position: string; - - /** - * Creates a new InitMasterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns InitMasterResponse instance - */ - public static create(properties?: tabletmanagerdata.IInitMasterResponse): tabletmanagerdata.InitMasterResponse; - - /** - * Encodes the specified InitMasterResponse message. Does not implicitly {@link tabletmanagerdata.InitMasterResponse.verify|verify} messages. - * @param message InitMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IInitMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.InitMasterResponse.verify|verify} messages. - * @param message InitMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IInitMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitMasterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.InitMasterResponse; - - /** - * Decodes an InitMasterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.InitMasterResponse; - - /** - * Verifies an InitMasterResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitMasterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitMasterResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.InitMasterResponse; - - /** - * Creates a plain object from an InitMasterResponse message. Also converts values to other types if specified. - * @param message InitMasterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.InitMasterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitMasterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PopulateReparentJournalRequest. */ - interface IPopulateReparentJournalRequest { - - /** PopulateReparentJournalRequest time_created_ns */ - time_created_ns?: (number|Long|null); - - /** PopulateReparentJournalRequest action_name */ - action_name?: (string|null); - - /** PopulateReparentJournalRequest master_alias */ - master_alias?: (topodata.ITabletAlias|null); - - /** PopulateReparentJournalRequest replication_position */ - replication_position?: (string|null); - } - - /** Represents a PopulateReparentJournalRequest. */ - class PopulateReparentJournalRequest implements IPopulateReparentJournalRequest { - - /** - * Constructs a new PopulateReparentJournalRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPopulateReparentJournalRequest); - - /** PopulateReparentJournalRequest time_created_ns. */ - public time_created_ns: (number|Long); - - /** PopulateReparentJournalRequest action_name. */ - public action_name: string; - - /** PopulateReparentJournalRequest master_alias. */ - public master_alias?: (topodata.ITabletAlias|null); - - /** PopulateReparentJournalRequest replication_position. */ - public replication_position: string; - - /** - * Creates a new PopulateReparentJournalRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PopulateReparentJournalRequest instance - */ - public static create(properties?: tabletmanagerdata.IPopulateReparentJournalRequest): tabletmanagerdata.PopulateReparentJournalRequest; - - /** - * Encodes the specified PopulateReparentJournalRequest message. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalRequest.verify|verify} messages. - * @param message PopulateReparentJournalRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPopulateReparentJournalRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PopulateReparentJournalRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalRequest.verify|verify} messages. - * @param message PopulateReparentJournalRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPopulateReparentJournalRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PopulateReparentJournalRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PopulateReparentJournalRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PopulateReparentJournalRequest; - - /** - * Decodes a PopulateReparentJournalRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PopulateReparentJournalRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PopulateReparentJournalRequest; - - /** - * Verifies a PopulateReparentJournalRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PopulateReparentJournalRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PopulateReparentJournalRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PopulateReparentJournalRequest; - - /** - * Creates a plain object from a PopulateReparentJournalRequest message. Also converts values to other types if specified. - * @param message PopulateReparentJournalRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PopulateReparentJournalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PopulateReparentJournalRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PopulateReparentJournalResponse. */ - interface IPopulateReparentJournalResponse { - } - - /** Represents a PopulateReparentJournalResponse. */ - class PopulateReparentJournalResponse implements IPopulateReparentJournalResponse { - - /** - * Constructs a new PopulateReparentJournalResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPopulateReparentJournalResponse); - - /** - * Creates a new PopulateReparentJournalResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PopulateReparentJournalResponse instance - */ - public static create(properties?: tabletmanagerdata.IPopulateReparentJournalResponse): tabletmanagerdata.PopulateReparentJournalResponse; - - /** - * Encodes the specified PopulateReparentJournalResponse message. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalResponse.verify|verify} messages. - * @param message PopulateReparentJournalResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPopulateReparentJournalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PopulateReparentJournalResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalResponse.verify|verify} messages. - * @param message PopulateReparentJournalResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPopulateReparentJournalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PopulateReparentJournalResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PopulateReparentJournalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PopulateReparentJournalResponse; - - /** - * Decodes a PopulateReparentJournalResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PopulateReparentJournalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PopulateReparentJournalResponse; - - /** - * Verifies a PopulateReparentJournalResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PopulateReparentJournalResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PopulateReparentJournalResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PopulateReparentJournalResponse; - - /** - * Creates a plain object from a PopulateReparentJournalResponse message. Also converts values to other types if specified. - * @param message PopulateReparentJournalResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PopulateReparentJournalResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PopulateReparentJournalResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitReplicaRequest. */ - interface IInitReplicaRequest { - - /** InitReplicaRequest parent */ - parent?: (topodata.ITabletAlias|null); - - /** InitReplicaRequest replication_position */ - replication_position?: (string|null); - - /** InitReplicaRequest time_created_ns */ - time_created_ns?: (number|Long|null); - } - - /** Represents an InitReplicaRequest. */ - class InitReplicaRequest implements IInitReplicaRequest { - - /** - * Constructs a new InitReplicaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IInitReplicaRequest); - - /** InitReplicaRequest parent. */ - public parent?: (topodata.ITabletAlias|null); - - /** InitReplicaRequest replication_position. */ - public replication_position: string; - - /** InitReplicaRequest time_created_ns. */ - public time_created_ns: (number|Long); - - /** - * Creates a new InitReplicaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns InitReplicaRequest instance - */ - public static create(properties?: tabletmanagerdata.IInitReplicaRequest): tabletmanagerdata.InitReplicaRequest; - - /** - * Encodes the specified InitReplicaRequest message. Does not implicitly {@link tabletmanagerdata.InitReplicaRequest.verify|verify} messages. - * @param message InitReplicaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IInitReplicaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitReplicaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.InitReplicaRequest.verify|verify} messages. - * @param message InitReplicaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IInitReplicaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitReplicaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.InitReplicaRequest; - - /** - * Decodes an InitReplicaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.InitReplicaRequest; - - /** - * Verifies an InitReplicaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitReplicaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitReplicaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.InitReplicaRequest; - - /** - * Creates a plain object from an InitReplicaRequest message. Also converts values to other types if specified. - * @param message InitReplicaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.InitReplicaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitReplicaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitReplicaResponse. */ - interface IInitReplicaResponse { - } - - /** Represents an InitReplicaResponse. */ - class InitReplicaResponse implements IInitReplicaResponse { - - /** - * Constructs a new InitReplicaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IInitReplicaResponse); - - /** - * Creates a new InitReplicaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns InitReplicaResponse instance - */ - public static create(properties?: tabletmanagerdata.IInitReplicaResponse): tabletmanagerdata.InitReplicaResponse; - - /** - * Encodes the specified InitReplicaResponse message. Does not implicitly {@link tabletmanagerdata.InitReplicaResponse.verify|verify} messages. - * @param message InitReplicaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IInitReplicaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitReplicaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.InitReplicaResponse.verify|verify} messages. - * @param message InitReplicaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IInitReplicaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitReplicaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.InitReplicaResponse; - - /** - * Decodes an InitReplicaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.InitReplicaResponse; - - /** - * Verifies an InitReplicaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitReplicaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitReplicaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.InitReplicaResponse; - - /** - * Creates a plain object from an InitReplicaResponse message. Also converts values to other types if specified. - * @param message InitReplicaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.InitReplicaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitReplicaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DemoteMasterRequest. */ - interface IDemoteMasterRequest { - } - - /** Represents a DemoteMasterRequest. */ - class DemoteMasterRequest implements IDemoteMasterRequest { - - /** - * Constructs a new DemoteMasterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IDemoteMasterRequest); - - /** - * Creates a new DemoteMasterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DemoteMasterRequest instance - */ - public static create(properties?: tabletmanagerdata.IDemoteMasterRequest): tabletmanagerdata.DemoteMasterRequest; - - /** - * Encodes the specified DemoteMasterRequest message. Does not implicitly {@link tabletmanagerdata.DemoteMasterRequest.verify|verify} messages. - * @param message DemoteMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IDemoteMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DemoteMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.DemoteMasterRequest.verify|verify} messages. - * @param message DemoteMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IDemoteMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DemoteMasterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.DemoteMasterRequest; - - /** - * Decodes a DemoteMasterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.DemoteMasterRequest; - - /** - * Verifies a DemoteMasterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DemoteMasterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DemoteMasterRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.DemoteMasterRequest; - - /** - * Creates a plain object from a DemoteMasterRequest message. Also converts values to other types if specified. - * @param message DemoteMasterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.DemoteMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DemoteMasterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DemoteMasterResponse. */ - interface IDemoteMasterResponse { - - /** DemoteMasterResponse deprecated_position */ - deprecated_position?: (string|null); - - /** DemoteMasterResponse master_status */ - master_status?: (replicationdata.IMasterStatus|null); - } - - /** Represents a DemoteMasterResponse. */ - class DemoteMasterResponse implements IDemoteMasterResponse { - - /** - * Constructs a new DemoteMasterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IDemoteMasterResponse); - - /** DemoteMasterResponse deprecated_position. */ - public deprecated_position: string; - - /** DemoteMasterResponse master_status. */ - public master_status?: (replicationdata.IMasterStatus|null); - - /** - * Creates a new DemoteMasterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DemoteMasterResponse instance - */ - public static create(properties?: tabletmanagerdata.IDemoteMasterResponse): tabletmanagerdata.DemoteMasterResponse; - - /** - * Encodes the specified DemoteMasterResponse message. Does not implicitly {@link tabletmanagerdata.DemoteMasterResponse.verify|verify} messages. - * @param message DemoteMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IDemoteMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DemoteMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.DemoteMasterResponse.verify|verify} messages. - * @param message DemoteMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IDemoteMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DemoteMasterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.DemoteMasterResponse; - - /** - * Decodes a DemoteMasterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.DemoteMasterResponse; - - /** - * Verifies a DemoteMasterResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DemoteMasterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DemoteMasterResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.DemoteMasterResponse; - - /** - * Creates a plain object from a DemoteMasterResponse message. Also converts values to other types if specified. - * @param message DemoteMasterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.DemoteMasterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DemoteMasterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UndoDemoteMasterRequest. */ - interface IUndoDemoteMasterRequest { - } - - /** Represents an UndoDemoteMasterRequest. */ - class UndoDemoteMasterRequest implements IUndoDemoteMasterRequest { - - /** - * Constructs a new UndoDemoteMasterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IUndoDemoteMasterRequest); - - /** - * Creates a new UndoDemoteMasterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UndoDemoteMasterRequest instance - */ - public static create(properties?: tabletmanagerdata.IUndoDemoteMasterRequest): tabletmanagerdata.UndoDemoteMasterRequest; - - /** - * Encodes the specified UndoDemoteMasterRequest message. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterRequest.verify|verify} messages. - * @param message UndoDemoteMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IUndoDemoteMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UndoDemoteMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterRequest.verify|verify} messages. - * @param message UndoDemoteMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IUndoDemoteMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UndoDemoteMasterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UndoDemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UndoDemoteMasterRequest; - - /** - * Decodes an UndoDemoteMasterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UndoDemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UndoDemoteMasterRequest; - - /** - * Verifies an UndoDemoteMasterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UndoDemoteMasterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UndoDemoteMasterRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UndoDemoteMasterRequest; - - /** - * Creates a plain object from an UndoDemoteMasterRequest message. Also converts values to other types if specified. - * @param message UndoDemoteMasterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.UndoDemoteMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UndoDemoteMasterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UndoDemoteMasterResponse. */ - interface IUndoDemoteMasterResponse { - } - - /** Represents an UndoDemoteMasterResponse. */ - class UndoDemoteMasterResponse implements IUndoDemoteMasterResponse { - - /** - * Constructs a new UndoDemoteMasterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IUndoDemoteMasterResponse); - - /** - * Creates a new UndoDemoteMasterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UndoDemoteMasterResponse instance - */ - public static create(properties?: tabletmanagerdata.IUndoDemoteMasterResponse): tabletmanagerdata.UndoDemoteMasterResponse; - - /** - * Encodes the specified UndoDemoteMasterResponse message. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterResponse.verify|verify} messages. - * @param message UndoDemoteMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IUndoDemoteMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UndoDemoteMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterResponse.verify|verify} messages. - * @param message UndoDemoteMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IUndoDemoteMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UndoDemoteMasterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UndoDemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.UndoDemoteMasterResponse; - - /** - * Decodes an UndoDemoteMasterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UndoDemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.UndoDemoteMasterResponse; - - /** - * Verifies an UndoDemoteMasterResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UndoDemoteMasterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UndoDemoteMasterResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.UndoDemoteMasterResponse; - - /** - * Creates a plain object from an UndoDemoteMasterResponse message. Also converts values to other types if specified. - * @param message UndoDemoteMasterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.UndoDemoteMasterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UndoDemoteMasterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReplicaWasPromotedRequest. */ - interface IReplicaWasPromotedRequest { - } - - /** Represents a ReplicaWasPromotedRequest. */ - class ReplicaWasPromotedRequest implements IReplicaWasPromotedRequest { - - /** - * Constructs a new ReplicaWasPromotedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReplicaWasPromotedRequest); - - /** - * Creates a new ReplicaWasPromotedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicaWasPromotedRequest instance - */ - public static create(properties?: tabletmanagerdata.IReplicaWasPromotedRequest): tabletmanagerdata.ReplicaWasPromotedRequest; - - /** - * Encodes the specified ReplicaWasPromotedRequest message. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedRequest.verify|verify} messages. - * @param message ReplicaWasPromotedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReplicaWasPromotedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicaWasPromotedRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedRequest.verify|verify} messages. - * @param message ReplicaWasPromotedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReplicaWasPromotedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicaWasPromotedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicaWasPromotedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReplicaWasPromotedRequest; - - /** - * Decodes a ReplicaWasPromotedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicaWasPromotedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReplicaWasPromotedRequest; - - /** - * Verifies a ReplicaWasPromotedRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicaWasPromotedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicaWasPromotedRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReplicaWasPromotedRequest; - - /** - * Creates a plain object from a ReplicaWasPromotedRequest message. Also converts values to other types if specified. - * @param message ReplicaWasPromotedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReplicaWasPromotedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicaWasPromotedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReplicaWasPromotedResponse. */ - interface IReplicaWasPromotedResponse { - } - - /** Represents a ReplicaWasPromotedResponse. */ - class ReplicaWasPromotedResponse implements IReplicaWasPromotedResponse { - - /** - * Constructs a new ReplicaWasPromotedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReplicaWasPromotedResponse); - - /** - * Creates a new ReplicaWasPromotedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicaWasPromotedResponse instance - */ - public static create(properties?: tabletmanagerdata.IReplicaWasPromotedResponse): tabletmanagerdata.ReplicaWasPromotedResponse; - - /** - * Encodes the specified ReplicaWasPromotedResponse message. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedResponse.verify|verify} messages. - * @param message ReplicaWasPromotedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReplicaWasPromotedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicaWasPromotedResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedResponse.verify|verify} messages. - * @param message ReplicaWasPromotedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReplicaWasPromotedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicaWasPromotedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicaWasPromotedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReplicaWasPromotedResponse; - - /** - * Decodes a ReplicaWasPromotedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicaWasPromotedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReplicaWasPromotedResponse; - - /** - * Verifies a ReplicaWasPromotedResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicaWasPromotedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicaWasPromotedResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReplicaWasPromotedResponse; - - /** - * Creates a plain object from a ReplicaWasPromotedResponse message. Also converts values to other types if specified. - * @param message ReplicaWasPromotedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReplicaWasPromotedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicaWasPromotedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetMasterRequest. */ - interface ISetMasterRequest { - - /** SetMasterRequest parent */ - parent?: (topodata.ITabletAlias|null); - - /** SetMasterRequest time_created_ns */ - time_created_ns?: (number|Long|null); - - /** SetMasterRequest force_start_replication */ - force_start_replication?: (boolean|null); - - /** SetMasterRequest wait_position */ - wait_position?: (string|null); - } - - /** Represents a SetMasterRequest. */ - class SetMasterRequest implements ISetMasterRequest { - - /** - * Constructs a new SetMasterRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISetMasterRequest); - - /** SetMasterRequest parent. */ - public parent?: (topodata.ITabletAlias|null); - - /** SetMasterRequest time_created_ns. */ - public time_created_ns: (number|Long); - - /** SetMasterRequest force_start_replication. */ - public force_start_replication: boolean; - - /** SetMasterRequest wait_position. */ - public wait_position: string; - - /** - * Creates a new SetMasterRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMasterRequest instance - */ - public static create(properties?: tabletmanagerdata.ISetMasterRequest): tabletmanagerdata.SetMasterRequest; - - /** - * Encodes the specified SetMasterRequest message. Does not implicitly {@link tabletmanagerdata.SetMasterRequest.verify|verify} messages. - * @param message SetMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISetMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SetMasterRequest.verify|verify} messages. - * @param message SetMasterRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISetMasterRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMasterRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SetMasterRequest; - - /** - * Decodes a SetMasterRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SetMasterRequest; - - /** - * Verifies a SetMasterRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMasterRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMasterRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SetMasterRequest; - - /** - * Creates a plain object from a SetMasterRequest message. Also converts values to other types if specified. - * @param message SetMasterRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SetMasterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMasterRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetMasterResponse. */ - interface ISetMasterResponse { - } - - /** Represents a SetMasterResponse. */ - class SetMasterResponse implements ISetMasterResponse { - - /** - * Constructs a new SetMasterResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.ISetMasterResponse); - - /** - * Creates a new SetMasterResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetMasterResponse instance - */ - public static create(properties?: tabletmanagerdata.ISetMasterResponse): tabletmanagerdata.SetMasterResponse; - - /** - * Encodes the specified SetMasterResponse message. Does not implicitly {@link tabletmanagerdata.SetMasterResponse.verify|verify} messages. - * @param message SetMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.ISetMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SetMasterResponse.verify|verify} messages. - * @param message SetMasterResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.ISetMasterResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetMasterResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.SetMasterResponse; - - /** - * Decodes a SetMasterResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.SetMasterResponse; - - /** - * Verifies a SetMasterResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetMasterResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetMasterResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.SetMasterResponse; - - /** - * Creates a plain object from a SetMasterResponse message. Also converts values to other types if specified. - * @param message SetMasterResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.SetMasterResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetMasterResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReplicaWasRestartedRequest. */ - interface IReplicaWasRestartedRequest { - - /** ReplicaWasRestartedRequest parent */ - parent?: (topodata.ITabletAlias|null); - } - - /** Represents a ReplicaWasRestartedRequest. */ - class ReplicaWasRestartedRequest implements IReplicaWasRestartedRequest { - - /** - * Constructs a new ReplicaWasRestartedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReplicaWasRestartedRequest); - - /** ReplicaWasRestartedRequest parent. */ - public parent?: (topodata.ITabletAlias|null); - - /** - * Creates a new ReplicaWasRestartedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicaWasRestartedRequest instance - */ - public static create(properties?: tabletmanagerdata.IReplicaWasRestartedRequest): tabletmanagerdata.ReplicaWasRestartedRequest; - - /** - * Encodes the specified ReplicaWasRestartedRequest message. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedRequest.verify|verify} messages. - * @param message ReplicaWasRestartedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReplicaWasRestartedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicaWasRestartedRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedRequest.verify|verify} messages. - * @param message ReplicaWasRestartedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReplicaWasRestartedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicaWasRestartedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicaWasRestartedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReplicaWasRestartedRequest; - - /** - * Decodes a ReplicaWasRestartedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicaWasRestartedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReplicaWasRestartedRequest; - - /** - * Verifies a ReplicaWasRestartedRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicaWasRestartedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicaWasRestartedRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReplicaWasRestartedRequest; - - /** - * Creates a plain object from a ReplicaWasRestartedRequest message. Also converts values to other types if specified. - * @param message ReplicaWasRestartedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReplicaWasRestartedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicaWasRestartedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReplicaWasRestartedResponse. */ - interface IReplicaWasRestartedResponse { - } - - /** Represents a ReplicaWasRestartedResponse. */ - class ReplicaWasRestartedResponse implements IReplicaWasRestartedResponse { - - /** - * Constructs a new ReplicaWasRestartedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IReplicaWasRestartedResponse); - - /** - * Creates a new ReplicaWasRestartedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicaWasRestartedResponse instance - */ - public static create(properties?: tabletmanagerdata.IReplicaWasRestartedResponse): tabletmanagerdata.ReplicaWasRestartedResponse; - - /** - * Encodes the specified ReplicaWasRestartedResponse message. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedResponse.verify|verify} messages. - * @param message ReplicaWasRestartedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IReplicaWasRestartedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicaWasRestartedResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedResponse.verify|verify} messages. - * @param message ReplicaWasRestartedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IReplicaWasRestartedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicaWasRestartedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicaWasRestartedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.ReplicaWasRestartedResponse; - - /** - * Decodes a ReplicaWasRestartedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicaWasRestartedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.ReplicaWasRestartedResponse; - - /** - * Verifies a ReplicaWasRestartedResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicaWasRestartedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicaWasRestartedResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.ReplicaWasRestartedResponse; - - /** - * Creates a plain object from a ReplicaWasRestartedResponse message. Also converts values to other types if specified. - * @param message ReplicaWasRestartedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.ReplicaWasRestartedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicaWasRestartedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationAndGetStatusRequest. */ - interface IStopReplicationAndGetStatusRequest { - - /** StopReplicationAndGetStatusRequest stop_replication_mode */ - stop_replication_mode?: (replicationdata.StopReplicationMode|null); - } - - /** Represents a StopReplicationAndGetStatusRequest. */ - class StopReplicationAndGetStatusRequest implements IStopReplicationAndGetStatusRequest { - - /** - * Constructs a new StopReplicationAndGetStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStopReplicationAndGetStatusRequest); - - /** StopReplicationAndGetStatusRequest stop_replication_mode. */ - public stop_replication_mode: replicationdata.StopReplicationMode; - - /** - * Creates a new StopReplicationAndGetStatusRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationAndGetStatusRequest instance - */ - public static create(properties?: tabletmanagerdata.IStopReplicationAndGetStatusRequest): tabletmanagerdata.StopReplicationAndGetStatusRequest; - - /** - * Encodes the specified StopReplicationAndGetStatusRequest message. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusRequest.verify|verify} messages. - * @param message StopReplicationAndGetStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStopReplicationAndGetStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationAndGetStatusRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusRequest.verify|verify} messages. - * @param message StopReplicationAndGetStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStopReplicationAndGetStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationAndGetStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationAndGetStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StopReplicationAndGetStatusRequest; - - /** - * Decodes a StopReplicationAndGetStatusRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationAndGetStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StopReplicationAndGetStatusRequest; - - /** - * Verifies a StopReplicationAndGetStatusRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationAndGetStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationAndGetStatusRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StopReplicationAndGetStatusRequest; - - /** - * Creates a plain object from a StopReplicationAndGetStatusRequest message. Also converts values to other types if specified. - * @param message StopReplicationAndGetStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StopReplicationAndGetStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationAndGetStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationAndGetStatusResponse. */ - interface IStopReplicationAndGetStatusResponse { - - /** StopReplicationAndGetStatusResponse hybrid_status */ - hybrid_status?: (replicationdata.IStatus|null); - - /** StopReplicationAndGetStatusResponse status */ - status?: (replicationdata.IStopReplicationStatus|null); - } - - /** Represents a StopReplicationAndGetStatusResponse. */ - class StopReplicationAndGetStatusResponse implements IStopReplicationAndGetStatusResponse { - - /** - * Constructs a new StopReplicationAndGetStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IStopReplicationAndGetStatusResponse); - - /** StopReplicationAndGetStatusResponse hybrid_status. */ - public hybrid_status?: (replicationdata.IStatus|null); - - /** StopReplicationAndGetStatusResponse status. */ - public status?: (replicationdata.IStopReplicationStatus|null); - - /** - * Creates a new StopReplicationAndGetStatusResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationAndGetStatusResponse instance - */ - public static create(properties?: tabletmanagerdata.IStopReplicationAndGetStatusResponse): tabletmanagerdata.StopReplicationAndGetStatusResponse; - - /** - * Encodes the specified StopReplicationAndGetStatusResponse message. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusResponse.verify|verify} messages. - * @param message StopReplicationAndGetStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IStopReplicationAndGetStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationAndGetStatusResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusResponse.verify|verify} messages. - * @param message StopReplicationAndGetStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IStopReplicationAndGetStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationAndGetStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationAndGetStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.StopReplicationAndGetStatusResponse; - - /** - * Decodes a StopReplicationAndGetStatusResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationAndGetStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.StopReplicationAndGetStatusResponse; - - /** - * Verifies a StopReplicationAndGetStatusResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationAndGetStatusResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationAndGetStatusResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.StopReplicationAndGetStatusResponse; - - /** - * Creates a plain object from a StopReplicationAndGetStatusResponse message. Also converts values to other types if specified. - * @param message StopReplicationAndGetStatusResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.StopReplicationAndGetStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationAndGetStatusResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PromoteReplicaRequest. */ - interface IPromoteReplicaRequest { - } - - /** Represents a PromoteReplicaRequest. */ - class PromoteReplicaRequest implements IPromoteReplicaRequest { - - /** - * Constructs a new PromoteReplicaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPromoteReplicaRequest); - - /** - * Creates a new PromoteReplicaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PromoteReplicaRequest instance - */ - public static create(properties?: tabletmanagerdata.IPromoteReplicaRequest): tabletmanagerdata.PromoteReplicaRequest; - - /** - * Encodes the specified PromoteReplicaRequest message. Does not implicitly {@link tabletmanagerdata.PromoteReplicaRequest.verify|verify} messages. - * @param message PromoteReplicaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPromoteReplicaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PromoteReplicaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PromoteReplicaRequest.verify|verify} messages. - * @param message PromoteReplicaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPromoteReplicaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PromoteReplicaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PromoteReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PromoteReplicaRequest; - - /** - * Decodes a PromoteReplicaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PromoteReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PromoteReplicaRequest; - - /** - * Verifies a PromoteReplicaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PromoteReplicaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PromoteReplicaRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PromoteReplicaRequest; - - /** - * Creates a plain object from a PromoteReplicaRequest message. Also converts values to other types if specified. - * @param message PromoteReplicaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PromoteReplicaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PromoteReplicaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PromoteReplicaResponse. */ - interface IPromoteReplicaResponse { - - /** PromoteReplicaResponse position */ - position?: (string|null); - } - - /** Represents a PromoteReplicaResponse. */ - class PromoteReplicaResponse implements IPromoteReplicaResponse { - - /** - * Constructs a new PromoteReplicaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IPromoteReplicaResponse); - - /** PromoteReplicaResponse position. */ - public position: string; - - /** - * Creates a new PromoteReplicaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PromoteReplicaResponse instance - */ - public static create(properties?: tabletmanagerdata.IPromoteReplicaResponse): tabletmanagerdata.PromoteReplicaResponse; - - /** - * Encodes the specified PromoteReplicaResponse message. Does not implicitly {@link tabletmanagerdata.PromoteReplicaResponse.verify|verify} messages. - * @param message PromoteReplicaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IPromoteReplicaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PromoteReplicaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PromoteReplicaResponse.verify|verify} messages. - * @param message PromoteReplicaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IPromoteReplicaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PromoteReplicaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PromoteReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.PromoteReplicaResponse; - - /** - * Decodes a PromoteReplicaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PromoteReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.PromoteReplicaResponse; - - /** - * Verifies a PromoteReplicaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PromoteReplicaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PromoteReplicaResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.PromoteReplicaResponse; - - /** - * Creates a plain object from a PromoteReplicaResponse message. Also converts values to other types if specified. - * @param message PromoteReplicaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.PromoteReplicaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PromoteReplicaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BackupRequest. */ - interface IBackupRequest { - - /** BackupRequest concurrency */ - concurrency?: (number|Long|null); - - /** BackupRequest allowMaster */ - allowMaster?: (boolean|null); - } - - /** Represents a BackupRequest. */ - class BackupRequest implements IBackupRequest { - - /** - * Constructs a new BackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IBackupRequest); - - /** BackupRequest concurrency. */ - public concurrency: (number|Long); - - /** BackupRequest allowMaster. */ - public allowMaster: boolean; - - /** - * Creates a new BackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupRequest instance - */ - public static create(properties?: tabletmanagerdata.IBackupRequest): tabletmanagerdata.BackupRequest; - - /** - * Encodes the specified BackupRequest message. Does not implicitly {@link tabletmanagerdata.BackupRequest.verify|verify} messages. - * @param message BackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.BackupRequest.verify|verify} messages. - * @param message BackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.BackupRequest; - - /** - * Decodes a BackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.BackupRequest; - - /** - * Verifies a BackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.BackupRequest; - - /** - * Creates a plain object from a BackupRequest message. Also converts values to other types if specified. - * @param message BackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.BackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BackupResponse. */ - interface IBackupResponse { - - /** BackupResponse event */ - event?: (logutil.IEvent|null); - } - - /** Represents a BackupResponse. */ - class BackupResponse implements IBackupResponse { - - /** - * Constructs a new BackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IBackupResponse); - - /** BackupResponse event. */ - public event?: (logutil.IEvent|null); - - /** - * Creates a new BackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupResponse instance - */ - public static create(properties?: tabletmanagerdata.IBackupResponse): tabletmanagerdata.BackupResponse; - - /** - * Encodes the specified BackupResponse message. Does not implicitly {@link tabletmanagerdata.BackupResponse.verify|verify} messages. - * @param message BackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.BackupResponse.verify|verify} messages. - * @param message BackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.BackupResponse; - - /** - * Decodes a BackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.BackupResponse; - - /** - * Verifies a BackupResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.BackupResponse; - - /** - * Creates a plain object from a BackupResponse message. Also converts values to other types if specified. - * @param message BackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.BackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RestoreFromBackupRequest. */ - interface IRestoreFromBackupRequest { - } - - /** Represents a RestoreFromBackupRequest. */ - class RestoreFromBackupRequest implements IRestoreFromBackupRequest { - - /** - * Constructs a new RestoreFromBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IRestoreFromBackupRequest); - - /** - * Creates a new RestoreFromBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreFromBackupRequest instance - */ - public static create(properties?: tabletmanagerdata.IRestoreFromBackupRequest): tabletmanagerdata.RestoreFromBackupRequest; - - /** - * Encodes the specified RestoreFromBackupRequest message. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupRequest.verify|verify} messages. - * @param message RestoreFromBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IRestoreFromBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreFromBackupRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupRequest.verify|verify} messages. - * @param message RestoreFromBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IRestoreFromBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreFromBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.RestoreFromBackupRequest; - - /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreFromBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.RestoreFromBackupRequest; - - /** - * Verifies a RestoreFromBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreFromBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreFromBackupRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.RestoreFromBackupRequest; - - /** - * Creates a plain object from a RestoreFromBackupRequest message. Also converts values to other types if specified. - * @param message RestoreFromBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.RestoreFromBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreFromBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RestoreFromBackupResponse. */ - interface IRestoreFromBackupResponse { - - /** RestoreFromBackupResponse event */ - event?: (logutil.IEvent|null); - } - - /** Represents a RestoreFromBackupResponse. */ - class RestoreFromBackupResponse implements IRestoreFromBackupResponse { - - /** - * Constructs a new RestoreFromBackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IRestoreFromBackupResponse); - - /** RestoreFromBackupResponse event. */ - public event?: (logutil.IEvent|null); - - /** - * Creates a new RestoreFromBackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreFromBackupResponse instance - */ - public static create(properties?: tabletmanagerdata.IRestoreFromBackupResponse): tabletmanagerdata.RestoreFromBackupResponse; - - /** - * Encodes the specified RestoreFromBackupResponse message. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupResponse.verify|verify} messages. - * @param message RestoreFromBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IRestoreFromBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreFromBackupResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupResponse.verify|verify} messages. - * @param message RestoreFromBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IRestoreFromBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreFromBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.RestoreFromBackupResponse; - - /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreFromBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.RestoreFromBackupResponse; - - /** - * Verifies a RestoreFromBackupResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreFromBackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreFromBackupResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.RestoreFromBackupResponse; - - /** - * Creates a plain object from a RestoreFromBackupResponse message. Also converts values to other types if specified. - * @param message RestoreFromBackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.RestoreFromBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreFromBackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VExecRequest. */ - interface IVExecRequest { - - /** VExecRequest query */ - query?: (string|null); - - /** VExecRequest workflow */ - workflow?: (string|null); - - /** VExecRequest keyspace */ - keyspace?: (string|null); - } - - /** Represents a VExecRequest. */ - class VExecRequest implements IVExecRequest { - - /** - * Constructs a new VExecRequest. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVExecRequest); - - /** VExecRequest query. */ - public query: string; - - /** VExecRequest workflow. */ - public workflow: string; - - /** VExecRequest keyspace. */ - public keyspace: string; - - /** - * Creates a new VExecRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VExecRequest instance - */ - public static create(properties?: tabletmanagerdata.IVExecRequest): tabletmanagerdata.VExecRequest; - - /** - * Encodes the specified VExecRequest message. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @param message VExecRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVExecRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VExecRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @param message VExecRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVExecRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VExecRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VExecRequest; - - /** - * Decodes a VExecRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VExecRequest; - - /** - * Verifies a VExecRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VExecRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VExecRequest - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VExecRequest; - - /** - * Creates a plain object from a VExecRequest message. Also converts values to other types if specified. - * @param message VExecRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VExecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VExecRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VExecResponse. */ - interface IVExecResponse { - - /** VExecResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents a VExecResponse. */ - class VExecResponse implements IVExecResponse { - - /** - * Constructs a new VExecResponse. - * @param [properties] Properties to set - */ - constructor(properties?: tabletmanagerdata.IVExecResponse); - - /** VExecResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new VExecResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VExecResponse instance - */ - public static create(properties?: tabletmanagerdata.IVExecResponse): tabletmanagerdata.VExecResponse; - - /** - * Encodes the specified VExecResponse message. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @param message VExecResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tabletmanagerdata.IVExecResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VExecResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @param message VExecResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tabletmanagerdata.IVExecResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VExecResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): tabletmanagerdata.VExecResponse; - - /** - * Decodes a VExecResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tabletmanagerdata.VExecResponse; - - /** - * Verifies a VExecResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VExecResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VExecResponse - */ - public static fromObject(object: { [k: string]: any }): tabletmanagerdata.VExecResponse; - - /** - * Creates a plain object from a VExecResponse message. Also converts values to other types if specified. - * @param message VExecResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tabletmanagerdata.VExecResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VExecResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace query. */ -export namespace query { - - /** Properties of a Target. */ - interface ITarget { - - /** Target keyspace */ - keyspace?: (string|null); - - /** Target shard */ - shard?: (string|null); - - /** Target tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** Target cell */ - cell?: (string|null); - } - - /** Represents a Target. */ - class Target implements ITarget { - - /** - * Constructs a new Target. - * @param [properties] Properties to set - */ - constructor(properties?: query.ITarget); - - /** Target keyspace. */ - public keyspace: string; - - /** Target shard. */ - public shard: string; - - /** Target tablet_type. */ - public tablet_type: topodata.TabletType; - - /** Target cell. */ - public cell: string; - - /** - * Creates a new Target instance using the specified properties. - * @param [properties] Properties to set - * @returns Target instance - */ - public static create(properties?: query.ITarget): query.Target; - - /** - * Encodes the specified Target message. Does not implicitly {@link query.Target.verify|verify} messages. - * @param message Target message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Target message, length delimited. Does not implicitly {@link query.Target.verify|verify} messages. - * @param message Target message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ITarget, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Target message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Target - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Target; - - /** - * Decodes a Target message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Target - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Target; - - /** - * Verifies a Target message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Target message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Target - */ - public static fromObject(object: { [k: string]: any }): query.Target; - - /** - * Creates a plain object from a Target message. Also converts values to other types if specified. - * @param message Target - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.Target, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Target to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VTGateCallerID. */ - interface IVTGateCallerID { - - /** VTGateCallerID username */ - username?: (string|null); - - /** VTGateCallerID groups */ - groups?: (string[]|null); - } - - /** Represents a VTGateCallerID. */ - class VTGateCallerID implements IVTGateCallerID { - - /** - * Constructs a new VTGateCallerID. - * @param [properties] Properties to set - */ - constructor(properties?: query.IVTGateCallerID); - - /** VTGateCallerID username. */ - public username: string; - - /** VTGateCallerID groups. */ - public groups: string[]; - - /** - * Creates a new VTGateCallerID instance using the specified properties. - * @param [properties] Properties to set - * @returns VTGateCallerID instance - */ - public static create(properties?: query.IVTGateCallerID): query.VTGateCallerID; - - /** - * Encodes the specified VTGateCallerID message. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. - * @param message VTGateCallerID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IVTGateCallerID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VTGateCallerID message, length delimited. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. - * @param message VTGateCallerID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IVTGateCallerID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VTGateCallerID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VTGateCallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.VTGateCallerID; - - /** - * Decodes a VTGateCallerID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VTGateCallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.VTGateCallerID; - - /** - * Verifies a VTGateCallerID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VTGateCallerID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VTGateCallerID - */ - public static fromObject(object: { [k: string]: any }): query.VTGateCallerID; - - /** - * Creates a plain object from a VTGateCallerID message. Also converts values to other types if specified. - * @param message VTGateCallerID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.VTGateCallerID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VTGateCallerID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EventToken. */ - interface IEventToken { - - /** EventToken timestamp */ - timestamp?: (number|Long|null); - - /** EventToken shard */ - shard?: (string|null); - - /** EventToken position */ - position?: (string|null); - } - - /** Represents an EventToken. */ - class EventToken implements IEventToken { - - /** - * Constructs a new EventToken. - * @param [properties] Properties to set - */ - constructor(properties?: query.IEventToken); - - /** EventToken timestamp. */ - public timestamp: (number|Long); - - /** EventToken shard. */ - public shard: string; - - /** EventToken position. */ - public position: string; - - /** - * Creates a new EventToken instance using the specified properties. - * @param [properties] Properties to set - * @returns EventToken instance - */ - public static create(properties?: query.IEventToken): query.EventToken; - - /** - * Encodes the specified EventToken message. Does not implicitly {@link query.EventToken.verify|verify} messages. - * @param message EventToken message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IEventToken, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventToken message, length delimited. Does not implicitly {@link query.EventToken.verify|verify} messages. - * @param message EventToken message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IEventToken, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventToken message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.EventToken; - - /** - * Decodes an EventToken message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.EventToken; - - /** - * Verifies an EventToken message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventToken message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventToken - */ - public static fromObject(object: { [k: string]: any }): query.EventToken; - - /** - * Creates a plain object from an EventToken message. Also converts values to other types if specified. - * @param message EventToken - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.EventToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventToken to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** MySqlFlag enum. */ - enum MySqlFlag { - EMPTY = 0, - NOT_NULL_FLAG = 1, - PRI_KEY_FLAG = 2, - UNIQUE_KEY_FLAG = 4, - MULTIPLE_KEY_FLAG = 8, - BLOB_FLAG = 16, - UNSIGNED_FLAG = 32, - ZEROFILL_FLAG = 64, - BINARY_FLAG = 128, - ENUM_FLAG = 256, - AUTO_INCREMENT_FLAG = 512, - TIMESTAMP_FLAG = 1024, - SET_FLAG = 2048, - NO_DEFAULT_VALUE_FLAG = 4096, - ON_UPDATE_NOW_FLAG = 8192, - NUM_FLAG = 32768, - PART_KEY_FLAG = 16384, - GROUP_FLAG = 32768, - UNIQUE_FLAG = 65536, - BINCMP_FLAG = 131072 - } - - /** Flag enum. */ - enum Flag { - NONE = 0, - ISINTEGRAL = 256, - ISUNSIGNED = 512, - ISFLOAT = 1024, - ISQUOTED = 2048, - ISTEXT = 4096, - ISBINARY = 8192 - } - - /** Type enum. */ - enum Type { - NULL_TYPE = 0, - INT8 = 257, - UINT8 = 770, - INT16 = 259, - UINT16 = 772, - INT24 = 261, - UINT24 = 774, - INT32 = 263, - UINT32 = 776, - INT64 = 265, - UINT64 = 778, - FLOAT32 = 1035, - FLOAT64 = 1036, - TIMESTAMP = 2061, - DATE = 2062, - TIME = 2063, - DATETIME = 2064, - YEAR = 785, - DECIMAL = 18, - TEXT = 6163, - BLOB = 10260, - VARCHAR = 6165, - VARBINARY = 10262, - CHAR = 6167, - BINARY = 10264, - BIT = 2073, - ENUM = 2074, - SET = 2075, - TUPLE = 28, - GEOMETRY = 2077, - JSON = 2078, - EXPRESSION = 31 - } - - /** Properties of a Value. */ - interface IValue { - - /** Value type */ - type?: (query.Type|null); - - /** Value value */ - value?: (Uint8Array|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: query.IValue); - - /** Value type. */ - public type: query.Type; - - /** Value value. */ - public value: Uint8Array; - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: query.IValue): query.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link query.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link query.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): query.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BindVariable. */ - interface IBindVariable { - - /** BindVariable type */ - type?: (query.Type|null); - - /** BindVariable value */ - value?: (Uint8Array|null); - - /** BindVariable values */ - values?: (query.IValue[]|null); - } - - /** Represents a BindVariable. */ - class BindVariable implements IBindVariable { - - /** - * Constructs a new BindVariable. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBindVariable); - - /** BindVariable type. */ - public type: query.Type; - - /** BindVariable value. */ - public value: Uint8Array; - - /** BindVariable values. */ - public values: query.IValue[]; - - /** - * Creates a new BindVariable instance using the specified properties. - * @param [properties] Properties to set - * @returns BindVariable instance - */ - public static create(properties?: query.IBindVariable): query.BindVariable; - - /** - * Encodes the specified BindVariable message. Does not implicitly {@link query.BindVariable.verify|verify} messages. - * @param message BindVariable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBindVariable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BindVariable message, length delimited. Does not implicitly {@link query.BindVariable.verify|verify} messages. - * @param message BindVariable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBindVariable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BindVariable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BindVariable; - - /** - * Decodes a BindVariable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BindVariable; - - /** - * Verifies a BindVariable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BindVariable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindVariable - */ - public static fromObject(object: { [k: string]: any }): query.BindVariable; - - /** - * Creates a plain object from a BindVariable message. Also converts values to other types if specified. - * @param message BindVariable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BindVariable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BindVariable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BoundQuery. */ - interface IBoundQuery { - - /** BoundQuery sql */ - sql?: (string|null); - - /** BoundQuery bind_variables */ - bind_variables?: ({ [k: string]: query.IBindVariable }|null); - } - - /** Represents a BoundQuery. */ - class BoundQuery implements IBoundQuery { - - /** - * Constructs a new BoundQuery. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBoundQuery); - - /** BoundQuery sql. */ - public sql: string; - - /** BoundQuery bind_variables. */ - public bind_variables: { [k: string]: query.IBindVariable }; - - /** - * Creates a new BoundQuery instance using the specified properties. - * @param [properties] Properties to set - * @returns BoundQuery instance - */ - public static create(properties?: query.IBoundQuery): query.BoundQuery; - - /** - * Encodes the specified BoundQuery message. Does not implicitly {@link query.BoundQuery.verify|verify} messages. - * @param message BoundQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBoundQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoundQuery message, length delimited. Does not implicitly {@link query.BoundQuery.verify|verify} messages. - * @param message BoundQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBoundQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoundQuery message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoundQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BoundQuery; - - /** - * Decodes a BoundQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoundQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BoundQuery; - - /** - * Verifies a BoundQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoundQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoundQuery - */ - public static fromObject(object: { [k: string]: any }): query.BoundQuery; - - /** - * Creates a plain object from a BoundQuery message. Also converts values to other types if specified. - * @param message BoundQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BoundQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoundQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteOptions. */ - interface IExecuteOptions { - - /** ExecuteOptions included_fields */ - included_fields?: (query.ExecuteOptions.IncludedFields|null); - - /** ExecuteOptions client_found_rows */ - client_found_rows?: (boolean|null); - - /** ExecuteOptions workload */ - workload?: (query.ExecuteOptions.Workload|null); - - /** ExecuteOptions sql_select_limit */ - sql_select_limit?: (number|Long|null); - - /** ExecuteOptions transaction_isolation */ - transaction_isolation?: (query.ExecuteOptions.TransactionIsolation|null); - - /** ExecuteOptions skip_query_plan_cache */ - skip_query_plan_cache?: (boolean|null); - - /** ExecuteOptions planner_version */ - planner_version?: (query.ExecuteOptions.PlannerVersion|null); - - /** ExecuteOptions has_created_temp_tables */ - has_created_temp_tables?: (boolean|null); - } - - /** Represents an ExecuteOptions. */ - class ExecuteOptions implements IExecuteOptions { - - /** - * Constructs a new ExecuteOptions. - * @param [properties] Properties to set - */ - constructor(properties?: query.IExecuteOptions); - - /** ExecuteOptions included_fields. */ - public included_fields: query.ExecuteOptions.IncludedFields; - - /** ExecuteOptions client_found_rows. */ - public client_found_rows: boolean; - - /** ExecuteOptions workload. */ - public workload: query.ExecuteOptions.Workload; - - /** ExecuteOptions sql_select_limit. */ - public sql_select_limit: (number|Long); - - /** ExecuteOptions transaction_isolation. */ - public transaction_isolation: query.ExecuteOptions.TransactionIsolation; - - /** ExecuteOptions skip_query_plan_cache. */ - public skip_query_plan_cache: boolean; - - /** ExecuteOptions planner_version. */ - public planner_version: query.ExecuteOptions.PlannerVersion; - - /** ExecuteOptions has_created_temp_tables. */ - public has_created_temp_tables: boolean; - - /** - * Creates a new ExecuteOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOptions instance - */ - public static create(properties?: query.IExecuteOptions): query.ExecuteOptions; - - /** - * Encodes the specified ExecuteOptions message. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. - * @param message ExecuteOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IExecuteOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOptions message, length delimited. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. - * @param message ExecuteOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IExecuteOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteOptions; - - /** - * Decodes an ExecuteOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteOptions; - - /** - * Verifies an ExecuteOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOptions - */ - public static fromObject(object: { [k: string]: any }): query.ExecuteOptions; - - /** - * Creates a plain object from an ExecuteOptions message. Also converts values to other types if specified. - * @param message ExecuteOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ExecuteOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ExecuteOptions { - - /** IncludedFields enum. */ - enum IncludedFields { - TYPE_AND_NAME = 0, - TYPE_ONLY = 1, - ALL = 2 - } - - /** Workload enum. */ - enum Workload { - UNSPECIFIED = 0, - OLTP = 1, - OLAP = 2, - DBA = 3 - } - - /** TransactionIsolation enum. */ - enum TransactionIsolation { - DEFAULT = 0, - REPEATABLE_READ = 1, - READ_COMMITTED = 2, - READ_UNCOMMITTED = 3, - SERIALIZABLE = 4, - CONSISTENT_SNAPSHOT_READ_ONLY = 5, - AUTOCOMMIT = 6 - } - - /** PlannerVersion enum. */ - enum PlannerVersion { - DEFAULT_PLANNER = 0, - V3 = 1, - Gen4 = 2, - Gen4Greedy = 3, - Gen4Left2Right = 4, - Gen4WithFallback = 5 - } - } - - /** Properties of a Field. */ - interface IField { - - /** Field name */ - name?: (string|null); - - /** Field type */ - type?: (query.Type|null); - - /** Field table */ - table?: (string|null); - - /** Field org_table */ - org_table?: (string|null); - - /** Field database */ - database?: (string|null); - - /** Field org_name */ - org_name?: (string|null); - - /** Field column_length */ - column_length?: (number|null); - - /** Field charset */ - charset?: (number|null); - - /** Field decimals */ - decimals?: (number|null); - - /** Field flags */ - flags?: (number|null); - - /** Field column_type */ - column_type?: (string|null); - } - - /** Represents a Field. */ - class Field implements IField { - - /** - * Constructs a new Field. - * @param [properties] Properties to set - */ - constructor(properties?: query.IField); - - /** Field name. */ - public name: string; - - /** Field type. */ - public type: query.Type; - - /** Field table. */ - public table: string; - - /** Field org_table. */ - public org_table: string; - - /** Field database. */ - public database: string; - - /** Field org_name. */ - public org_name: string; - - /** Field column_length. */ - public column_length: number; - - /** Field charset. */ - public charset: number; - - /** Field decimals. */ - public decimals: number; - - /** Field flags. */ - public flags: number; - - /** Field column_type. */ - public column_type: string; - - /** - * Creates a new Field instance using the specified properties. - * @param [properties] Properties to set - * @returns Field instance - */ - public static create(properties?: query.IField): query.Field; - - /** - * Encodes the specified Field message. Does not implicitly {@link query.Field.verify|verify} messages. - * @param message Field message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link query.Field.verify|verify} messages. - * @param message Field message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Field message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Field; - - /** - * Decodes a Field message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Field; - - /** - * Verifies a Field message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Field - */ - public static fromObject(object: { [k: string]: any }): query.Field; - - /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @param message Field - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Field to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Row. */ - interface IRow { - - /** Row lengths */ - lengths?: ((number|Long)[]|null); - - /** Row values */ - values?: (Uint8Array|null); - } - - /** Represents a Row. */ - class Row implements IRow { - - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: query.IRow); - - /** Row lengths. */ - public lengths: (number|Long)[]; - - /** Row values. */ - public values: Uint8Array; - - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: query.IRow): query.Row; - - /** - * Encodes the specified Row message. Does not implicitly {@link query.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link query.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.Row; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.Row; - - /** - * Verifies a Row message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): query.Row; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryResult. */ - interface IQueryResult { - - /** QueryResult fields */ - fields?: (query.IField[]|null); - - /** QueryResult rows_affected */ - rows_affected?: (number|Long|null); - - /** QueryResult insert_id */ - insert_id?: (number|Long|null); - - /** QueryResult rows */ - rows?: (query.IRow[]|null); - } - - /** Represents a QueryResult. */ - class QueryResult implements IQueryResult { - - /** - * Constructs a new QueryResult. - * @param [properties] Properties to set - */ - constructor(properties?: query.IQueryResult); - - /** QueryResult fields. */ - public fields: query.IField[]; - - /** QueryResult rows_affected. */ - public rows_affected: (number|Long); - - /** QueryResult insert_id. */ - public insert_id: (number|Long); - - /** QueryResult rows. */ - public rows: query.IRow[]; - - /** - * Creates a new QueryResult instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryResult instance - */ - public static create(properties?: query.IQueryResult): query.QueryResult; - - /** - * Encodes the specified QueryResult message. Does not implicitly {@link query.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link query.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.QueryResult; - - /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.QueryResult; - - /** - * Verifies a QueryResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryResult - */ - public static fromObject(object: { [k: string]: any }): query.QueryResult; - - /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @param message QueryResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryWarning. */ - interface IQueryWarning { - - /** QueryWarning code */ - code?: (number|null); - - /** QueryWarning message */ - message?: (string|null); - } - - /** Represents a QueryWarning. */ - class QueryWarning implements IQueryWarning { - - /** - * Constructs a new QueryWarning. - * @param [properties] Properties to set - */ - constructor(properties?: query.IQueryWarning); - - /** QueryWarning code. */ - public code: number; - - /** QueryWarning message. */ - public message: string; - - /** - * Creates a new QueryWarning instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryWarning instance - */ - public static create(properties?: query.IQueryWarning): query.QueryWarning; - - /** - * Encodes the specified QueryWarning message. Does not implicitly {@link query.QueryWarning.verify|verify} messages. - * @param message QueryWarning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IQueryWarning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryWarning message, length delimited. Does not implicitly {@link query.QueryWarning.verify|verify} messages. - * @param message QueryWarning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IQueryWarning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryWarning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryWarning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.QueryWarning; - - /** - * Decodes a QueryWarning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryWarning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.QueryWarning; - - /** - * Verifies a QueryWarning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryWarning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryWarning - */ - public static fromObject(object: { [k: string]: any }): query.QueryWarning; - - /** - * Creates a plain object from a QueryWarning message. Also converts values to other types if specified. - * @param message QueryWarning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.QueryWarning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryWarning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamEvent. */ - interface IStreamEvent { - - /** StreamEvent statements */ - statements?: (query.StreamEvent.IStatement[]|null); - - /** StreamEvent event_token */ - event_token?: (query.IEventToken|null); - } - - /** Represents a StreamEvent. */ - class StreamEvent implements IStreamEvent { - - /** - * Constructs a new StreamEvent. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStreamEvent); - - /** StreamEvent statements. */ - public statements: query.StreamEvent.IStatement[]; - - /** StreamEvent event_token. */ - public event_token?: (query.IEventToken|null); - - /** - * Creates a new StreamEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamEvent instance - */ - public static create(properties?: query.IStreamEvent): query.StreamEvent; - - /** - * Encodes the specified StreamEvent message. Does not implicitly {@link query.StreamEvent.verify|verify} messages. - * @param message StreamEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamEvent message, length delimited. Does not implicitly {@link query.StreamEvent.verify|verify} messages. - * @param message StreamEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStreamEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamEvent; - - /** - * Decodes a StreamEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamEvent; - - /** - * Verifies a StreamEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamEvent - */ - public static fromObject(object: { [k: string]: any }): query.StreamEvent; - - /** - * Creates a plain object from a StreamEvent message. Also converts values to other types if specified. - * @param message StreamEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace StreamEvent { - - /** Properties of a Statement. */ - interface IStatement { - - /** Statement category */ - category?: (query.StreamEvent.Statement.Category|null); - - /** Statement table_name */ - table_name?: (string|null); - - /** Statement primary_key_fields */ - primary_key_fields?: (query.IField[]|null); - - /** Statement primary_key_values */ - primary_key_values?: (query.IRow[]|null); - - /** Statement sql */ - sql?: (Uint8Array|null); - } - - /** Represents a Statement. */ - class Statement implements IStatement { - - /** - * Constructs a new Statement. - * @param [properties] Properties to set - */ - constructor(properties?: query.StreamEvent.IStatement); - - /** Statement category. */ - public category: query.StreamEvent.Statement.Category; - - /** Statement table_name. */ - public table_name: string; - - /** Statement primary_key_fields. */ - public primary_key_fields: query.IField[]; - - /** Statement primary_key_values. */ - public primary_key_values: query.IRow[]; - - /** Statement sql. */ - public sql: Uint8Array; - - /** - * Creates a new Statement instance using the specified properties. - * @param [properties] Properties to set - * @returns Statement instance - */ - public static create(properties?: query.StreamEvent.IStatement): query.StreamEvent.Statement; - - /** - * Encodes the specified Statement message. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.StreamEvent.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.StreamEvent.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamEvent.Statement; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamEvent.Statement; - - /** - * Verifies a Statement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Statement - */ - public static fromObject(object: { [k: string]: any }): query.StreamEvent.Statement; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @param message Statement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamEvent.Statement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Statement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Statement { - - /** Category enum. */ - enum Category { - Error = 0, - DML = 1, - DDL = 2 - } - } - } - - /** Properties of an ExecuteRequest. */ - interface IExecuteRequest { - - /** ExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ExecuteRequest target */ - target?: (query.ITarget|null); - - /** ExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ExecuteRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** ExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** ExecuteRequest reserved_id */ - reserved_id?: (number|Long|null); - } - - /** Represents an ExecuteRequest. */ - class ExecuteRequest implements IExecuteRequest { - - /** - * Constructs a new ExecuteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IExecuteRequest); - - /** ExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ExecuteRequest transaction_id. */ - public transaction_id: (number|Long); - - /** ExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** ExecuteRequest reserved_id. */ - public reserved_id: (number|Long); - - /** - * Creates a new ExecuteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteRequest instance - */ - public static create(properties?: query.IExecuteRequest): query.ExecuteRequest; - - /** - * Encodes the specified ExecuteRequest message. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. - * @param message ExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteRequest message, length delimited. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. - * @param message ExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteRequest; - - /** - * Decodes an ExecuteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteRequest; - - /** - * Verifies an ExecuteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteRequest - */ - public static fromObject(object: { [k: string]: any }): query.ExecuteRequest; - - /** - * Creates a plain object from an ExecuteRequest message. Also converts values to other types if specified. - * @param message ExecuteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteResponse. */ - interface IExecuteResponse { - - /** ExecuteResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents an ExecuteResponse. */ - class ExecuteResponse implements IExecuteResponse { - - /** - * Constructs a new ExecuteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IExecuteResponse); - - /** ExecuteResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new ExecuteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteResponse instance - */ - public static create(properties?: query.IExecuteResponse): query.ExecuteResponse; - - /** - * Encodes the specified ExecuteResponse message. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. - * @param message ExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteResponse message, length delimited. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. - * @param message ExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteResponse; - - /** - * Decodes an ExecuteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteResponse; - - /** - * Verifies an ExecuteResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteResponse - */ - public static fromObject(object: { [k: string]: any }): query.ExecuteResponse; - - /** - * Creates a plain object from an ExecuteResponse message. Also converts values to other types if specified. - * @param message ExecuteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ResultWithError. */ - interface IResultWithError { - - /** ResultWithError error */ - error?: (vtrpc.IRPCError|null); - - /** ResultWithError result */ - result?: (query.IQueryResult|null); - } - - /** Represents a ResultWithError. */ - class ResultWithError implements IResultWithError { - - /** - * Constructs a new ResultWithError. - * @param [properties] Properties to set - */ - constructor(properties?: query.IResultWithError); - - /** ResultWithError error. */ - public error?: (vtrpc.IRPCError|null); - - /** ResultWithError result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new ResultWithError instance using the specified properties. - * @param [properties] Properties to set - * @returns ResultWithError instance - */ - public static create(properties?: query.IResultWithError): query.ResultWithError; - - /** - * Encodes the specified ResultWithError message. Does not implicitly {@link query.ResultWithError.verify|verify} messages. - * @param message ResultWithError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IResultWithError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResultWithError message, length delimited. Does not implicitly {@link query.ResultWithError.verify|verify} messages. - * @param message ResultWithError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IResultWithError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResultWithError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResultWithError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ResultWithError; - - /** - * Decodes a ResultWithError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResultWithError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ResultWithError; - - /** - * Verifies a ResultWithError message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResultWithError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResultWithError - */ - public static fromObject(object: { [k: string]: any }): query.ResultWithError; - - /** - * Creates a plain object from a ResultWithError message. Also converts values to other types if specified. - * @param message ResultWithError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ResultWithError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResultWithError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteBatchRequest. */ - interface IExecuteBatchRequest { - - /** ExecuteBatchRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ExecuteBatchRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ExecuteBatchRequest target */ - target?: (query.ITarget|null); - - /** ExecuteBatchRequest queries */ - queries?: (query.IBoundQuery[]|null); - - /** ExecuteBatchRequest as_transaction */ - as_transaction?: (boolean|null); - - /** ExecuteBatchRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** ExecuteBatchRequest options */ - options?: (query.IExecuteOptions|null); - } - - /** Represents an ExecuteBatchRequest. */ - class ExecuteBatchRequest implements IExecuteBatchRequest { - - /** - * Constructs a new ExecuteBatchRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IExecuteBatchRequest); - - /** ExecuteBatchRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ExecuteBatchRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ExecuteBatchRequest target. */ - public target?: (query.ITarget|null); - - /** ExecuteBatchRequest queries. */ - public queries: query.IBoundQuery[]; - - /** ExecuteBatchRequest as_transaction. */ - public as_transaction: boolean; - - /** ExecuteBatchRequest transaction_id. */ - public transaction_id: (number|Long); - - /** ExecuteBatchRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** - * Creates a new ExecuteBatchRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteBatchRequest instance - */ - public static create(properties?: query.IExecuteBatchRequest): query.ExecuteBatchRequest; - - /** - * Encodes the specified ExecuteBatchRequest message. Does not implicitly {@link query.ExecuteBatchRequest.verify|verify} messages. - * @param message ExecuteBatchRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IExecuteBatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteBatchRequest message, length delimited. Does not implicitly {@link query.ExecuteBatchRequest.verify|verify} messages. - * @param message ExecuteBatchRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IExecuteBatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteBatchRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteBatchRequest; - - /** - * Decodes an ExecuteBatchRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteBatchRequest; - - /** - * Verifies an ExecuteBatchRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteBatchRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteBatchRequest - */ - public static fromObject(object: { [k: string]: any }): query.ExecuteBatchRequest; - - /** - * Creates a plain object from an ExecuteBatchRequest message. Also converts values to other types if specified. - * @param message ExecuteBatchRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ExecuteBatchRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteBatchRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteBatchResponse. */ - interface IExecuteBatchResponse { - - /** ExecuteBatchResponse results */ - results?: (query.IQueryResult[]|null); - } - - /** Represents an ExecuteBatchResponse. */ - class ExecuteBatchResponse implements IExecuteBatchResponse { - - /** - * Constructs a new ExecuteBatchResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IExecuteBatchResponse); - - /** ExecuteBatchResponse results. */ - public results: query.IQueryResult[]; - - /** - * Creates a new ExecuteBatchResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteBatchResponse instance - */ - public static create(properties?: query.IExecuteBatchResponse): query.ExecuteBatchResponse; - - /** - * Encodes the specified ExecuteBatchResponse message. Does not implicitly {@link query.ExecuteBatchResponse.verify|verify} messages. - * @param message ExecuteBatchResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IExecuteBatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteBatchResponse message, length delimited. Does not implicitly {@link query.ExecuteBatchResponse.verify|verify} messages. - * @param message ExecuteBatchResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IExecuteBatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteBatchResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ExecuteBatchResponse; - - /** - * Decodes an ExecuteBatchResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ExecuteBatchResponse; - - /** - * Verifies an ExecuteBatchResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteBatchResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteBatchResponse - */ - public static fromObject(object: { [k: string]: any }): query.ExecuteBatchResponse; - - /** - * Creates a plain object from an ExecuteBatchResponse message. Also converts values to other types if specified. - * @param message ExecuteBatchResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ExecuteBatchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteBatchResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamExecuteRequest. */ - interface IStreamExecuteRequest { - - /** StreamExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** StreamExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** StreamExecuteRequest target */ - target?: (query.ITarget|null); - - /** StreamExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** StreamExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** StreamExecuteRequest transaction_id */ - transaction_id?: (number|Long|null); - } - - /** Represents a StreamExecuteRequest. */ - class StreamExecuteRequest implements IStreamExecuteRequest { - - /** - * Constructs a new StreamExecuteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStreamExecuteRequest); - - /** StreamExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** StreamExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** StreamExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** StreamExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** StreamExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** StreamExecuteRequest transaction_id. */ - public transaction_id: (number|Long); - - /** - * Creates a new StreamExecuteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamExecuteRequest instance - */ - public static create(properties?: query.IStreamExecuteRequest): query.StreamExecuteRequest; - - /** - * Encodes the specified StreamExecuteRequest message. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. - * @param message StreamExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamExecuteRequest message, length delimited. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. - * @param message StreamExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStreamExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamExecuteRequest; - - /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamExecuteRequest; - - /** - * Verifies a StreamExecuteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamExecuteRequest - */ - public static fromObject(object: { [k: string]: any }): query.StreamExecuteRequest; - - /** - * Creates a plain object from a StreamExecuteRequest message. Also converts values to other types if specified. - * @param message StreamExecuteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamExecuteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamExecuteResponse. */ - interface IStreamExecuteResponse { - - /** StreamExecuteResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents a StreamExecuteResponse. */ - class StreamExecuteResponse implements IStreamExecuteResponse { - - /** - * Constructs a new StreamExecuteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStreamExecuteResponse); - - /** StreamExecuteResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new StreamExecuteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamExecuteResponse instance - */ - public static create(properties?: query.IStreamExecuteResponse): query.StreamExecuteResponse; - - /** - * Encodes the specified StreamExecuteResponse message. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. - * @param message StreamExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamExecuteResponse message, length delimited. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. - * @param message StreamExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStreamExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamExecuteResponse; - - /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamExecuteResponse; - - /** - * Verifies a StreamExecuteResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamExecuteResponse - */ - public static fromObject(object: { [k: string]: any }): query.StreamExecuteResponse; - - /** - * Creates a plain object from a StreamExecuteResponse message. Also converts values to other types if specified. - * @param message StreamExecuteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamExecuteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BeginRequest. */ - interface IBeginRequest { - - /** BeginRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginRequest target */ - target?: (query.ITarget|null); - - /** BeginRequest options */ - options?: (query.IExecuteOptions|null); - } - - /** Represents a BeginRequest. */ - class BeginRequest implements IBeginRequest { - - /** - * Constructs a new BeginRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBeginRequest); - - /** BeginRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginRequest target. */ - public target?: (query.ITarget|null); - - /** BeginRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** - * Creates a new BeginRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BeginRequest instance - */ - public static create(properties?: query.IBeginRequest): query.BeginRequest; - - /** - * Encodes the specified BeginRequest message. Does not implicitly {@link query.BeginRequest.verify|verify} messages. - * @param message BeginRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBeginRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BeginRequest message, length delimited. Does not implicitly {@link query.BeginRequest.verify|verify} messages. - * @param message BeginRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBeginRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BeginRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BeginRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginRequest; - - /** - * Decodes a BeginRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BeginRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginRequest; - - /** - * Verifies a BeginRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BeginRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BeginRequest - */ - public static fromObject(object: { [k: string]: any }): query.BeginRequest; - - /** - * Creates a plain object from a BeginRequest message. Also converts values to other types if specified. - * @param message BeginRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BeginRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BeginRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BeginResponse. */ - interface IBeginResponse { - - /** BeginResponse transaction_id */ - transaction_id?: (number|Long|null); - - /** BeginResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a BeginResponse. */ - class BeginResponse implements IBeginResponse { - - /** - * Constructs a new BeginResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBeginResponse); - - /** BeginResponse transaction_id. */ - public transaction_id: (number|Long); - - /** BeginResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new BeginResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns BeginResponse instance - */ - public static create(properties?: query.IBeginResponse): query.BeginResponse; - - /** - * Encodes the specified BeginResponse message. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @param message BeginResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBeginResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BeginResponse message, length delimited. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @param message BeginResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBeginResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BeginResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BeginResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginResponse; - - /** - * Decodes a BeginResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BeginResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginResponse; - - /** - * Verifies a BeginResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BeginResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BeginResponse - */ - public static fromObject(object: { [k: string]: any }): query.BeginResponse; - - /** - * Creates a plain object from a BeginResponse message. Also converts values to other types if specified. - * @param message BeginResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BeginResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BeginResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitRequest. */ - interface ICommitRequest { - - /** CommitRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** CommitRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** CommitRequest target */ - target?: (query.ITarget|null); - - /** CommitRequest transaction_id */ - transaction_id?: (number|Long|null); - } - - /** Represents a CommitRequest. */ - class CommitRequest implements ICommitRequest { - - /** - * Constructs a new CommitRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.ICommitRequest); - - /** CommitRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** CommitRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** CommitRequest target. */ - public target?: (query.ITarget|null); - - /** CommitRequest transaction_id. */ - public transaction_id: (number|Long); - - /** - * Creates a new CommitRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CommitRequest instance - */ - public static create(properties?: query.ICommitRequest): query.CommitRequest; - - /** - * Encodes the specified CommitRequest message. Does not implicitly {@link query.CommitRequest.verify|verify} messages. - * @param message CommitRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ICommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link query.CommitRequest.verify|verify} messages. - * @param message CommitRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ICommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitRequest; - - /** - * Decodes a CommitRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitRequest; - - /** - * Verifies a CommitRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitRequest - */ - public static fromObject(object: { [k: string]: any }): query.CommitRequest; - - /** - * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. - * @param message CommitRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.CommitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitResponse. */ - interface ICommitResponse { - - /** CommitResponse reserved_id */ - reserved_id?: (number|Long|null); - } - - /** Represents a CommitResponse. */ - class CommitResponse implements ICommitResponse { - - /** - * Constructs a new CommitResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.ICommitResponse); - - /** CommitResponse reserved_id. */ - public reserved_id: (number|Long); - - /** - * Creates a new CommitResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CommitResponse instance - */ - public static create(properties?: query.ICommitResponse): query.CommitResponse; - - /** - * Encodes the specified CommitResponse message. Does not implicitly {@link query.CommitResponse.verify|verify} messages. - * @param message CommitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ICommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link query.CommitResponse.verify|verify} messages. - * @param message CommitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ICommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitResponse; - - /** - * Decodes a CommitResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitResponse; - - /** - * Verifies a CommitResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitResponse - */ - public static fromObject(object: { [k: string]: any }): query.CommitResponse; - - /** - * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. - * @param message CommitResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.CommitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RollbackRequest. */ - interface IRollbackRequest { - - /** RollbackRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** RollbackRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** RollbackRequest target */ - target?: (query.ITarget|null); - - /** RollbackRequest transaction_id */ - transaction_id?: (number|Long|null); - } - - /** Represents a RollbackRequest. */ - class RollbackRequest implements IRollbackRequest { - - /** - * Constructs a new RollbackRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IRollbackRequest); - - /** RollbackRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** RollbackRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** RollbackRequest target. */ - public target?: (query.ITarget|null); - - /** RollbackRequest transaction_id. */ - public transaction_id: (number|Long); - - /** - * Creates a new RollbackRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackRequest instance - */ - public static create(properties?: query.IRollbackRequest): query.RollbackRequest; - - /** - * Encodes the specified RollbackRequest message. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. - * @param message RollbackRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. - * @param message RollbackRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackRequest; - - /** - * Decodes a RollbackRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackRequest; - - /** - * Verifies a RollbackRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackRequest - */ - public static fromObject(object: { [k: string]: any }): query.RollbackRequest; - - /** - * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. - * @param message RollbackRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.RollbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RollbackResponse. */ - interface IRollbackResponse { - - /** RollbackResponse reserved_id */ - reserved_id?: (number|Long|null); - } - - /** Represents a RollbackResponse. */ - class RollbackResponse implements IRollbackResponse { - - /** - * Constructs a new RollbackResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IRollbackResponse); - - /** RollbackResponse reserved_id. */ - public reserved_id: (number|Long); - - /** - * Creates a new RollbackResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackResponse instance - */ - public static create(properties?: query.IRollbackResponse): query.RollbackResponse; - - /** - * Encodes the specified RollbackResponse message. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. - * @param message RollbackResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. - * @param message RollbackResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackResponse; - - /** - * Decodes a RollbackResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackResponse; - - /** - * Verifies a RollbackResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackResponse - */ - public static fromObject(object: { [k: string]: any }): query.RollbackResponse; - - /** - * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified. - * @param message RollbackResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.RollbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PrepareRequest. */ - interface IPrepareRequest { - - /** PrepareRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** PrepareRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** PrepareRequest target */ - target?: (query.ITarget|null); - - /** PrepareRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** PrepareRequest dtid */ - dtid?: (string|null); - } - - /** Represents a PrepareRequest. */ - class PrepareRequest implements IPrepareRequest { - - /** - * Constructs a new PrepareRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IPrepareRequest); - - /** PrepareRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** PrepareRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** PrepareRequest target. */ - public target?: (query.ITarget|null); - - /** PrepareRequest transaction_id. */ - public transaction_id: (number|Long); - - /** PrepareRequest dtid. */ - public dtid: string; - - /** - * Creates a new PrepareRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PrepareRequest instance - */ - public static create(properties?: query.IPrepareRequest): query.PrepareRequest; - - /** - * Encodes the specified PrepareRequest message. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. - * @param message PrepareRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IPrepareRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrepareRequest message, length delimited. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. - * @param message PrepareRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IPrepareRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrepareRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrepareRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.PrepareRequest; - - /** - * Decodes a PrepareRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrepareRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.PrepareRequest; - - /** - * Verifies a PrepareRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrepareRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrepareRequest - */ - public static fromObject(object: { [k: string]: any }): query.PrepareRequest; - - /** - * Creates a plain object from a PrepareRequest message. Also converts values to other types if specified. - * @param message PrepareRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.PrepareRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrepareRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PrepareResponse. */ - interface IPrepareResponse { - } - - /** Represents a PrepareResponse. */ - class PrepareResponse implements IPrepareResponse { - - /** - * Constructs a new PrepareResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IPrepareResponse); - - /** - * Creates a new PrepareResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PrepareResponse instance - */ - public static create(properties?: query.IPrepareResponse): query.PrepareResponse; - - /** - * Encodes the specified PrepareResponse message. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. - * @param message PrepareResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IPrepareResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrepareResponse message, length delimited. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. - * @param message PrepareResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IPrepareResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrepareResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrepareResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.PrepareResponse; - - /** - * Decodes a PrepareResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrepareResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.PrepareResponse; - - /** - * Verifies a PrepareResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrepareResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrepareResponse - */ - public static fromObject(object: { [k: string]: any }): query.PrepareResponse; - - /** - * Creates a plain object from a PrepareResponse message. Also converts values to other types if specified. - * @param message PrepareResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.PrepareResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrepareResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitPreparedRequest. */ - interface ICommitPreparedRequest { - - /** CommitPreparedRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** CommitPreparedRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** CommitPreparedRequest target */ - target?: (query.ITarget|null); - - /** CommitPreparedRequest dtid */ - dtid?: (string|null); - } - - /** Represents a CommitPreparedRequest. */ - class CommitPreparedRequest implements ICommitPreparedRequest { - - /** - * Constructs a new CommitPreparedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.ICommitPreparedRequest); - - /** CommitPreparedRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** CommitPreparedRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** CommitPreparedRequest target. */ - public target?: (query.ITarget|null); - - /** CommitPreparedRequest dtid. */ - public dtid: string; - - /** - * Creates a new CommitPreparedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CommitPreparedRequest instance - */ - public static create(properties?: query.ICommitPreparedRequest): query.CommitPreparedRequest; - - /** - * Encodes the specified CommitPreparedRequest message. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. - * @param message CommitPreparedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ICommitPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitPreparedRequest message, length delimited. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. - * @param message CommitPreparedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ICommitPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitPreparedRequest; - - /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitPreparedRequest; - - /** - * Verifies a CommitPreparedRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitPreparedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitPreparedRequest - */ - public static fromObject(object: { [k: string]: any }): query.CommitPreparedRequest; - - /** - * Creates a plain object from a CommitPreparedRequest message. Also converts values to other types if specified. - * @param message CommitPreparedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.CommitPreparedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitPreparedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitPreparedResponse. */ - interface ICommitPreparedResponse { - } - - /** Represents a CommitPreparedResponse. */ - class CommitPreparedResponse implements ICommitPreparedResponse { - - /** - * Constructs a new CommitPreparedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.ICommitPreparedResponse); - - /** - * Creates a new CommitPreparedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CommitPreparedResponse instance - */ - public static create(properties?: query.ICommitPreparedResponse): query.CommitPreparedResponse; - - /** - * Encodes the specified CommitPreparedResponse message. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. - * @param message CommitPreparedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ICommitPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitPreparedResponse message, length delimited. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. - * @param message CommitPreparedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ICommitPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CommitPreparedResponse; - - /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CommitPreparedResponse; - - /** - * Verifies a CommitPreparedResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitPreparedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitPreparedResponse - */ - public static fromObject(object: { [k: string]: any }): query.CommitPreparedResponse; - - /** - * Creates a plain object from a CommitPreparedResponse message. Also converts values to other types if specified. - * @param message CommitPreparedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.CommitPreparedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitPreparedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RollbackPreparedRequest. */ - interface IRollbackPreparedRequest { - - /** RollbackPreparedRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** RollbackPreparedRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** RollbackPreparedRequest target */ - target?: (query.ITarget|null); - - /** RollbackPreparedRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** RollbackPreparedRequest dtid */ - dtid?: (string|null); - } - - /** Represents a RollbackPreparedRequest. */ - class RollbackPreparedRequest implements IRollbackPreparedRequest { - - /** - * Constructs a new RollbackPreparedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IRollbackPreparedRequest); - - /** RollbackPreparedRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** RollbackPreparedRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** RollbackPreparedRequest target. */ - public target?: (query.ITarget|null); - - /** RollbackPreparedRequest transaction_id. */ - public transaction_id: (number|Long); - - /** RollbackPreparedRequest dtid. */ - public dtid: string; - - /** - * Creates a new RollbackPreparedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackPreparedRequest instance - */ - public static create(properties?: query.IRollbackPreparedRequest): query.RollbackPreparedRequest; - - /** - * Encodes the specified RollbackPreparedRequest message. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. - * @param message RollbackPreparedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IRollbackPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackPreparedRequest message, length delimited. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. - * @param message RollbackPreparedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IRollbackPreparedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackPreparedRequest; - - /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackPreparedRequest; - - /** - * Verifies a RollbackPreparedRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackPreparedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackPreparedRequest - */ - public static fromObject(object: { [k: string]: any }): query.RollbackPreparedRequest; - - /** - * Creates a plain object from a RollbackPreparedRequest message. Also converts values to other types if specified. - * @param message RollbackPreparedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.RollbackPreparedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackPreparedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RollbackPreparedResponse. */ - interface IRollbackPreparedResponse { - } - - /** Represents a RollbackPreparedResponse. */ - class RollbackPreparedResponse implements IRollbackPreparedResponse { - - /** - * Constructs a new RollbackPreparedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IRollbackPreparedResponse); - - /** - * Creates a new RollbackPreparedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackPreparedResponse instance - */ - public static create(properties?: query.IRollbackPreparedResponse): query.RollbackPreparedResponse; - - /** - * Encodes the specified RollbackPreparedResponse message. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. - * @param message RollbackPreparedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IRollbackPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackPreparedResponse message, length delimited. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. - * @param message RollbackPreparedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IRollbackPreparedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RollbackPreparedResponse; - - /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RollbackPreparedResponse; - - /** - * Verifies a RollbackPreparedResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackPreparedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackPreparedResponse - */ - public static fromObject(object: { [k: string]: any }): query.RollbackPreparedResponse; - - /** - * Creates a plain object from a RollbackPreparedResponse message. Also converts values to other types if specified. - * @param message RollbackPreparedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.RollbackPreparedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackPreparedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateTransactionRequest. */ - interface ICreateTransactionRequest { - - /** CreateTransactionRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** CreateTransactionRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** CreateTransactionRequest target */ - target?: (query.ITarget|null); - - /** CreateTransactionRequest dtid */ - dtid?: (string|null); - - /** CreateTransactionRequest participants */ - participants?: (query.ITarget[]|null); - } - - /** Represents a CreateTransactionRequest. */ - class CreateTransactionRequest implements ICreateTransactionRequest { - - /** - * Constructs a new CreateTransactionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.ICreateTransactionRequest); - - /** CreateTransactionRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** CreateTransactionRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** CreateTransactionRequest target. */ - public target?: (query.ITarget|null); - - /** CreateTransactionRequest dtid. */ - public dtid: string; - - /** CreateTransactionRequest participants. */ - public participants: query.ITarget[]; - - /** - * Creates a new CreateTransactionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTransactionRequest instance - */ - public static create(properties?: query.ICreateTransactionRequest): query.CreateTransactionRequest; - - /** - * Encodes the specified CreateTransactionRequest message. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. - * @param message CreateTransactionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ICreateTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTransactionRequest message, length delimited. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. - * @param message CreateTransactionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ICreateTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CreateTransactionRequest; - - /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CreateTransactionRequest; - - /** - * Verifies a CreateTransactionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTransactionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTransactionRequest - */ - public static fromObject(object: { [k: string]: any }): query.CreateTransactionRequest; - - /** - * Creates a plain object from a CreateTransactionRequest message. Also converts values to other types if specified. - * @param message CreateTransactionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.CreateTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTransactionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateTransactionResponse. */ - interface ICreateTransactionResponse { - } - - /** Represents a CreateTransactionResponse. */ - class CreateTransactionResponse implements ICreateTransactionResponse { - - /** - * Constructs a new CreateTransactionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.ICreateTransactionResponse); - - /** - * Creates a new CreateTransactionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTransactionResponse instance - */ - public static create(properties?: query.ICreateTransactionResponse): query.CreateTransactionResponse; - - /** - * Encodes the specified CreateTransactionResponse message. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. - * @param message CreateTransactionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ICreateTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTransactionResponse message, length delimited. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. - * @param message CreateTransactionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ICreateTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.CreateTransactionResponse; - - /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.CreateTransactionResponse; - - /** - * Verifies a CreateTransactionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTransactionResponse - */ - public static fromObject(object: { [k: string]: any }): query.CreateTransactionResponse; - - /** - * Creates a plain object from a CreateTransactionResponse message. Also converts values to other types if specified. - * @param message CreateTransactionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.CreateTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTransactionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StartCommitRequest. */ - interface IStartCommitRequest { - - /** StartCommitRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** StartCommitRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** StartCommitRequest target */ - target?: (query.ITarget|null); - - /** StartCommitRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** StartCommitRequest dtid */ - dtid?: (string|null); - } - - /** Represents a StartCommitRequest. */ - class StartCommitRequest implements IStartCommitRequest { - - /** - * Constructs a new StartCommitRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStartCommitRequest); - - /** StartCommitRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** StartCommitRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** StartCommitRequest target. */ - public target?: (query.ITarget|null); - - /** StartCommitRequest transaction_id. */ - public transaction_id: (number|Long); - - /** StartCommitRequest dtid. */ - public dtid: string; - - /** - * Creates a new StartCommitRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartCommitRequest instance - */ - public static create(properties?: query.IStartCommitRequest): query.StartCommitRequest; - - /** - * Encodes the specified StartCommitRequest message. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. - * @param message StartCommitRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStartCommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartCommitRequest message, length delimited. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. - * @param message StartCommitRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStartCommitRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartCommitRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartCommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StartCommitRequest; - - /** - * Decodes a StartCommitRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartCommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StartCommitRequest; - - /** - * Verifies a StartCommitRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartCommitRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartCommitRequest - */ - public static fromObject(object: { [k: string]: any }): query.StartCommitRequest; - - /** - * Creates a plain object from a StartCommitRequest message. Also converts values to other types if specified. - * @param message StartCommitRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StartCommitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartCommitRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StartCommitResponse. */ - interface IStartCommitResponse { - } - - /** Represents a StartCommitResponse. */ - class StartCommitResponse implements IStartCommitResponse { - - /** - * Constructs a new StartCommitResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStartCommitResponse); - - /** - * Creates a new StartCommitResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StartCommitResponse instance - */ - public static create(properties?: query.IStartCommitResponse): query.StartCommitResponse; - - /** - * Encodes the specified StartCommitResponse message. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. - * @param message StartCommitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStartCommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartCommitResponse message, length delimited. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. - * @param message StartCommitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStartCommitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartCommitResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartCommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StartCommitResponse; - - /** - * Decodes a StartCommitResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartCommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StartCommitResponse; - - /** - * Verifies a StartCommitResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StartCommitResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartCommitResponse - */ - public static fromObject(object: { [k: string]: any }): query.StartCommitResponse; - - /** - * Creates a plain object from a StartCommitResponse message. Also converts values to other types if specified. - * @param message StartCommitResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StartCommitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartCommitResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetRollbackRequest. */ - interface ISetRollbackRequest { - - /** SetRollbackRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** SetRollbackRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** SetRollbackRequest target */ - target?: (query.ITarget|null); - - /** SetRollbackRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** SetRollbackRequest dtid */ - dtid?: (string|null); - } - - /** Represents a SetRollbackRequest. */ - class SetRollbackRequest implements ISetRollbackRequest { - - /** - * Constructs a new SetRollbackRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.ISetRollbackRequest); - - /** SetRollbackRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** SetRollbackRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** SetRollbackRequest target. */ - public target?: (query.ITarget|null); - - /** SetRollbackRequest transaction_id. */ - public transaction_id: (number|Long); - - /** SetRollbackRequest dtid. */ - public dtid: string; - - /** - * Creates a new SetRollbackRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetRollbackRequest instance - */ - public static create(properties?: query.ISetRollbackRequest): query.SetRollbackRequest; - - /** - * Encodes the specified SetRollbackRequest message. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. - * @param message SetRollbackRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ISetRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetRollbackRequest message, length delimited. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. - * @param message SetRollbackRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ISetRollbackRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetRollbackRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetRollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.SetRollbackRequest; - - /** - * Decodes a SetRollbackRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetRollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.SetRollbackRequest; - - /** - * Verifies a SetRollbackRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetRollbackRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetRollbackRequest - */ - public static fromObject(object: { [k: string]: any }): query.SetRollbackRequest; - - /** - * Creates a plain object from a SetRollbackRequest message. Also converts values to other types if specified. - * @param message SetRollbackRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.SetRollbackRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetRollbackRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SetRollbackResponse. */ - interface ISetRollbackResponse { - } - - /** Represents a SetRollbackResponse. */ - class SetRollbackResponse implements ISetRollbackResponse { - - /** - * Constructs a new SetRollbackResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.ISetRollbackResponse); - - /** - * Creates a new SetRollbackResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetRollbackResponse instance - */ - public static create(properties?: query.ISetRollbackResponse): query.SetRollbackResponse; - - /** - * Encodes the specified SetRollbackResponse message. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. - * @param message SetRollbackResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ISetRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetRollbackResponse message, length delimited. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. - * @param message SetRollbackResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ISetRollbackResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetRollbackResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetRollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.SetRollbackResponse; - - /** - * Decodes a SetRollbackResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetRollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.SetRollbackResponse; - - /** - * Verifies a SetRollbackResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetRollbackResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetRollbackResponse - */ - public static fromObject(object: { [k: string]: any }): query.SetRollbackResponse; - - /** - * Creates a plain object from a SetRollbackResponse message. Also converts values to other types if specified. - * @param message SetRollbackResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.SetRollbackResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetRollbackResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConcludeTransactionRequest. */ - interface IConcludeTransactionRequest { - - /** ConcludeTransactionRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ConcludeTransactionRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ConcludeTransactionRequest target */ - target?: (query.ITarget|null); - - /** ConcludeTransactionRequest dtid */ - dtid?: (string|null); - } - - /** Represents a ConcludeTransactionRequest. */ - class ConcludeTransactionRequest implements IConcludeTransactionRequest { - - /** - * Constructs a new ConcludeTransactionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IConcludeTransactionRequest); - - /** ConcludeTransactionRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ConcludeTransactionRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ConcludeTransactionRequest target. */ - public target?: (query.ITarget|null); - - /** ConcludeTransactionRequest dtid. */ - public dtid: string; - - /** - * Creates a new ConcludeTransactionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ConcludeTransactionRequest instance - */ - public static create(properties?: query.IConcludeTransactionRequest): query.ConcludeTransactionRequest; - - /** - * Encodes the specified ConcludeTransactionRequest message. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. - * @param message ConcludeTransactionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IConcludeTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConcludeTransactionRequest message, length delimited. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. - * @param message ConcludeTransactionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IConcludeTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConcludeTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ConcludeTransactionRequest; - - /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConcludeTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ConcludeTransactionRequest; - - /** - * Verifies a ConcludeTransactionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConcludeTransactionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConcludeTransactionRequest - */ - public static fromObject(object: { [k: string]: any }): query.ConcludeTransactionRequest; - - /** - * Creates a plain object from a ConcludeTransactionRequest message. Also converts values to other types if specified. - * @param message ConcludeTransactionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ConcludeTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConcludeTransactionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConcludeTransactionResponse. */ - interface IConcludeTransactionResponse { - } - - /** Represents a ConcludeTransactionResponse. */ - class ConcludeTransactionResponse implements IConcludeTransactionResponse { - - /** - * Constructs a new ConcludeTransactionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IConcludeTransactionResponse); - - /** - * Creates a new ConcludeTransactionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ConcludeTransactionResponse instance - */ - public static create(properties?: query.IConcludeTransactionResponse): query.ConcludeTransactionResponse; - - /** - * Encodes the specified ConcludeTransactionResponse message. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. - * @param message ConcludeTransactionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IConcludeTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConcludeTransactionResponse message, length delimited. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. - * @param message ConcludeTransactionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IConcludeTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConcludeTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ConcludeTransactionResponse; - - /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConcludeTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ConcludeTransactionResponse; - - /** - * Verifies a ConcludeTransactionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConcludeTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConcludeTransactionResponse - */ - public static fromObject(object: { [k: string]: any }): query.ConcludeTransactionResponse; - - /** - * Creates a plain object from a ConcludeTransactionResponse message. Also converts values to other types if specified. - * @param message ConcludeTransactionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ConcludeTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConcludeTransactionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReadTransactionRequest. */ - interface IReadTransactionRequest { - - /** ReadTransactionRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReadTransactionRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReadTransactionRequest target */ - target?: (query.ITarget|null); - - /** ReadTransactionRequest dtid */ - dtid?: (string|null); - } - - /** Represents a ReadTransactionRequest. */ - class ReadTransactionRequest implements IReadTransactionRequest { - - /** - * Constructs a new ReadTransactionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReadTransactionRequest); - - /** ReadTransactionRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReadTransactionRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReadTransactionRequest target. */ - public target?: (query.ITarget|null); - - /** ReadTransactionRequest dtid. */ - public dtid: string; - - /** - * Creates a new ReadTransactionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReadTransactionRequest instance - */ - public static create(properties?: query.IReadTransactionRequest): query.ReadTransactionRequest; - - /** - * Encodes the specified ReadTransactionRequest message. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. - * @param message ReadTransactionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReadTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReadTransactionRequest message, length delimited. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. - * @param message ReadTransactionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReadTransactionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReadTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReadTransactionRequest; - - /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReadTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReadTransactionRequest; - - /** - * Verifies a ReadTransactionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReadTransactionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReadTransactionRequest - */ - public static fromObject(object: { [k: string]: any }): query.ReadTransactionRequest; - - /** - * Creates a plain object from a ReadTransactionRequest message. Also converts values to other types if specified. - * @param message ReadTransactionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReadTransactionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReadTransactionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReadTransactionResponse. */ - interface IReadTransactionResponse { - - /** ReadTransactionResponse metadata */ - metadata?: (query.ITransactionMetadata|null); - } - - /** Represents a ReadTransactionResponse. */ - class ReadTransactionResponse implements IReadTransactionResponse { - - /** - * Constructs a new ReadTransactionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReadTransactionResponse); - - /** ReadTransactionResponse metadata. */ - public metadata?: (query.ITransactionMetadata|null); - - /** - * Creates a new ReadTransactionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReadTransactionResponse instance - */ - public static create(properties?: query.IReadTransactionResponse): query.ReadTransactionResponse; - - /** - * Encodes the specified ReadTransactionResponse message. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @param message ReadTransactionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReadTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReadTransactionResponse message, length delimited. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @param message ReadTransactionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReadTransactionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReadTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReadTransactionResponse; - - /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReadTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReadTransactionResponse; - - /** - * Verifies a ReadTransactionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReadTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReadTransactionResponse - */ - public static fromObject(object: { [k: string]: any }): query.ReadTransactionResponse; - - /** - * Creates a plain object from a ReadTransactionResponse message. Also converts values to other types if specified. - * @param message ReadTransactionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReadTransactionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReadTransactionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BeginExecuteRequest. */ - interface IBeginExecuteRequest { - - /** BeginExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginExecuteRequest target */ - target?: (query.ITarget|null); - - /** BeginExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** BeginExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** BeginExecuteRequest reserved_id */ - reserved_id?: (number|Long|null); - - /** BeginExecuteRequest pre_queries */ - pre_queries?: (string[]|null); - } - - /** Represents a BeginExecuteRequest. */ - class BeginExecuteRequest implements IBeginExecuteRequest { - - /** - * Constructs a new BeginExecuteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBeginExecuteRequest); - - /** BeginExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** BeginExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** BeginExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** BeginExecuteRequest reserved_id. */ - public reserved_id: (number|Long); - - /** BeginExecuteRequest pre_queries. */ - public pre_queries: string[]; - - /** - * Creates a new BeginExecuteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BeginExecuteRequest instance - */ - public static create(properties?: query.IBeginExecuteRequest): query.BeginExecuteRequest; - - /** - * Encodes the specified BeginExecuteRequest message. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. - * @param message BeginExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BeginExecuteRequest message, length delimited. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. - * @param message BeginExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteRequest; - - /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteRequest; - - /** - * Verifies a BeginExecuteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BeginExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BeginExecuteRequest - */ - public static fromObject(object: { [k: string]: any }): query.BeginExecuteRequest; - - /** - * Creates a plain object from a BeginExecuteRequest message. Also converts values to other types if specified. - * @param message BeginExecuteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BeginExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BeginExecuteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BeginExecuteResponse. */ - interface IBeginExecuteResponse { - - /** BeginExecuteResponse error */ - error?: (vtrpc.IRPCError|null); - - /** BeginExecuteResponse result */ - result?: (query.IQueryResult|null); - - /** BeginExecuteResponse transaction_id */ - transaction_id?: (number|Long|null); - - /** BeginExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a BeginExecuteResponse. */ - class BeginExecuteResponse implements IBeginExecuteResponse { - - /** - * Constructs a new BeginExecuteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBeginExecuteResponse); - - /** BeginExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); - - /** BeginExecuteResponse result. */ - public result?: (query.IQueryResult|null); - - /** BeginExecuteResponse transaction_id. */ - public transaction_id: (number|Long); - - /** BeginExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new BeginExecuteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns BeginExecuteResponse instance - */ - public static create(properties?: query.IBeginExecuteResponse): query.BeginExecuteResponse; - - /** - * Encodes the specified BeginExecuteResponse message. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @param message BeginExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BeginExecuteResponse message, length delimited. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @param message BeginExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteResponse; - - /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteResponse; - - /** - * Verifies a BeginExecuteResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BeginExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BeginExecuteResponse - */ - public static fromObject(object: { [k: string]: any }): query.BeginExecuteResponse; - - /** - * Creates a plain object from a BeginExecuteResponse message. Also converts values to other types if specified. - * @param message BeginExecuteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BeginExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BeginExecuteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BeginExecuteBatchRequest. */ - interface IBeginExecuteBatchRequest { - - /** BeginExecuteBatchRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginExecuteBatchRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginExecuteBatchRequest target */ - target?: (query.ITarget|null); - - /** BeginExecuteBatchRequest queries */ - queries?: (query.IBoundQuery[]|null); - - /** BeginExecuteBatchRequest as_transaction */ - as_transaction?: (boolean|null); - - /** BeginExecuteBatchRequest options */ - options?: (query.IExecuteOptions|null); - } - - /** Represents a BeginExecuteBatchRequest. */ - class BeginExecuteBatchRequest implements IBeginExecuteBatchRequest { - - /** - * Constructs a new BeginExecuteBatchRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBeginExecuteBatchRequest); - - /** BeginExecuteBatchRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** BeginExecuteBatchRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** BeginExecuteBatchRequest target. */ - public target?: (query.ITarget|null); - - /** BeginExecuteBatchRequest queries. */ - public queries: query.IBoundQuery[]; - - /** BeginExecuteBatchRequest as_transaction. */ - public as_transaction: boolean; - - /** BeginExecuteBatchRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** - * Creates a new BeginExecuteBatchRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BeginExecuteBatchRequest instance - */ - public static create(properties?: query.IBeginExecuteBatchRequest): query.BeginExecuteBatchRequest; - - /** - * Encodes the specified BeginExecuteBatchRequest message. Does not implicitly {@link query.BeginExecuteBatchRequest.verify|verify} messages. - * @param message BeginExecuteBatchRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBeginExecuteBatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BeginExecuteBatchRequest message, length delimited. Does not implicitly {@link query.BeginExecuteBatchRequest.verify|verify} messages. - * @param message BeginExecuteBatchRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBeginExecuteBatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BeginExecuteBatchRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BeginExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteBatchRequest; - - /** - * Decodes a BeginExecuteBatchRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BeginExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteBatchRequest; - - /** - * Verifies a BeginExecuteBatchRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BeginExecuteBatchRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BeginExecuteBatchRequest - */ - public static fromObject(object: { [k: string]: any }): query.BeginExecuteBatchRequest; - - /** - * Creates a plain object from a BeginExecuteBatchRequest message. Also converts values to other types if specified. - * @param message BeginExecuteBatchRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BeginExecuteBatchRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BeginExecuteBatchRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BeginExecuteBatchResponse. */ - interface IBeginExecuteBatchResponse { - - /** BeginExecuteBatchResponse error */ - error?: (vtrpc.IRPCError|null); - - /** BeginExecuteBatchResponse results */ - results?: (query.IQueryResult[]|null); - - /** BeginExecuteBatchResponse transaction_id */ - transaction_id?: (number|Long|null); - - /** BeginExecuteBatchResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a BeginExecuteBatchResponse. */ - class BeginExecuteBatchResponse implements IBeginExecuteBatchResponse { - - /** - * Constructs a new BeginExecuteBatchResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IBeginExecuteBatchResponse); - - /** BeginExecuteBatchResponse error. */ - public error?: (vtrpc.IRPCError|null); - - /** BeginExecuteBatchResponse results. */ - public results: query.IQueryResult[]; - - /** BeginExecuteBatchResponse transaction_id. */ - public transaction_id: (number|Long); - - /** BeginExecuteBatchResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new BeginExecuteBatchResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns BeginExecuteBatchResponse instance - */ - public static create(properties?: query.IBeginExecuteBatchResponse): query.BeginExecuteBatchResponse; - - /** - * Encodes the specified BeginExecuteBatchResponse message. Does not implicitly {@link query.BeginExecuteBatchResponse.verify|verify} messages. - * @param message BeginExecuteBatchResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IBeginExecuteBatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BeginExecuteBatchResponse message, length delimited. Does not implicitly {@link query.BeginExecuteBatchResponse.verify|verify} messages. - * @param message BeginExecuteBatchResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IBeginExecuteBatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BeginExecuteBatchResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BeginExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.BeginExecuteBatchResponse; - - /** - * Decodes a BeginExecuteBatchResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BeginExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.BeginExecuteBatchResponse; - - /** - * Verifies a BeginExecuteBatchResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BeginExecuteBatchResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BeginExecuteBatchResponse - */ - public static fromObject(object: { [k: string]: any }): query.BeginExecuteBatchResponse; - - /** - * Creates a plain object from a BeginExecuteBatchResponse message. Also converts values to other types if specified. - * @param message BeginExecuteBatchResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.BeginExecuteBatchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BeginExecuteBatchResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MessageStreamRequest. */ - interface IMessageStreamRequest { - - /** MessageStreamRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** MessageStreamRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** MessageStreamRequest target */ - target?: (query.ITarget|null); - - /** MessageStreamRequest name */ - name?: (string|null); - } - - /** Represents a MessageStreamRequest. */ - class MessageStreamRequest implements IMessageStreamRequest { - - /** - * Constructs a new MessageStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IMessageStreamRequest); - - /** MessageStreamRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** MessageStreamRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** MessageStreamRequest target. */ - public target?: (query.ITarget|null); - - /** MessageStreamRequest name. */ - public name: string; - - /** - * Creates a new MessageStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageStreamRequest instance - */ - public static create(properties?: query.IMessageStreamRequest): query.MessageStreamRequest; - - /** - * Encodes the specified MessageStreamRequest message. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. - * @param message MessageStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IMessageStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageStreamRequest message, length delimited. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. - * @param message MessageStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IMessageStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageStreamRequest; - - /** - * Decodes a MessageStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageStreamRequest; - - /** - * Verifies a MessageStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageStreamRequest - */ - public static fromObject(object: { [k: string]: any }): query.MessageStreamRequest; - - /** - * Creates a plain object from a MessageStreamRequest message. Also converts values to other types if specified. - * @param message MessageStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.MessageStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MessageStreamResponse. */ - interface IMessageStreamResponse { - - /** MessageStreamResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents a MessageStreamResponse. */ - class MessageStreamResponse implements IMessageStreamResponse { - - /** - * Constructs a new MessageStreamResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IMessageStreamResponse); - - /** MessageStreamResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new MessageStreamResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageStreamResponse instance - */ - public static create(properties?: query.IMessageStreamResponse): query.MessageStreamResponse; - - /** - * Encodes the specified MessageStreamResponse message. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. - * @param message MessageStreamResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IMessageStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageStreamResponse message, length delimited. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. - * @param message MessageStreamResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IMessageStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageStreamResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageStreamResponse; - - /** - * Decodes a MessageStreamResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageStreamResponse; - - /** - * Verifies a MessageStreamResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageStreamResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageStreamResponse - */ - public static fromObject(object: { [k: string]: any }): query.MessageStreamResponse; - - /** - * Creates a plain object from a MessageStreamResponse message. Also converts values to other types if specified. - * @param message MessageStreamResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.MessageStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageStreamResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MessageAckRequest. */ - interface IMessageAckRequest { - - /** MessageAckRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** MessageAckRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** MessageAckRequest target */ - target?: (query.ITarget|null); - - /** MessageAckRequest name */ - name?: (string|null); - - /** MessageAckRequest ids */ - ids?: (query.IValue[]|null); - } - - /** Represents a MessageAckRequest. */ - class MessageAckRequest implements IMessageAckRequest { - - /** - * Constructs a new MessageAckRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IMessageAckRequest); - - /** MessageAckRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** MessageAckRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** MessageAckRequest target. */ - public target?: (query.ITarget|null); - - /** MessageAckRequest name. */ - public name: string; - - /** MessageAckRequest ids. */ - public ids: query.IValue[]; - - /** - * Creates a new MessageAckRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageAckRequest instance - */ - public static create(properties?: query.IMessageAckRequest): query.MessageAckRequest; - - /** - * Encodes the specified MessageAckRequest message. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. - * @param message MessageAckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IMessageAckRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageAckRequest message, length delimited. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. - * @param message MessageAckRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IMessageAckRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageAckRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageAckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageAckRequest; - - /** - * Decodes a MessageAckRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageAckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageAckRequest; - - /** - * Verifies a MessageAckRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageAckRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageAckRequest - */ - public static fromObject(object: { [k: string]: any }): query.MessageAckRequest; - - /** - * Creates a plain object from a MessageAckRequest message. Also converts values to other types if specified. - * @param message MessageAckRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.MessageAckRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageAckRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MessageAckResponse. */ - interface IMessageAckResponse { - - /** MessageAckResponse result */ - result?: (query.IQueryResult|null); - } - - /** Represents a MessageAckResponse. */ - class MessageAckResponse implements IMessageAckResponse { - - /** - * Constructs a new MessageAckResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IMessageAckResponse); - - /** MessageAckResponse result. */ - public result?: (query.IQueryResult|null); - - /** - * Creates a new MessageAckResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageAckResponse instance - */ - public static create(properties?: query.IMessageAckResponse): query.MessageAckResponse; - - /** - * Encodes the specified MessageAckResponse message. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. - * @param message MessageAckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IMessageAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageAckResponse message, length delimited. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. - * @param message MessageAckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IMessageAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageAckResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.MessageAckResponse; - - /** - * Decodes a MessageAckResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.MessageAckResponse; - - /** - * Verifies a MessageAckResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageAckResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageAckResponse - */ - public static fromObject(object: { [k: string]: any }): query.MessageAckResponse; - - /** - * Creates a plain object from a MessageAckResponse message. Also converts values to other types if specified. - * @param message MessageAckResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.MessageAckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageAckResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReserveExecuteRequest. */ - interface IReserveExecuteRequest { - - /** ReserveExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveExecuteRequest target */ - target?: (query.ITarget|null); - - /** ReserveExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ReserveExecuteRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** ReserveExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** ReserveExecuteRequest pre_queries */ - pre_queries?: (string[]|null); - } - - /** Represents a ReserveExecuteRequest. */ - class ReserveExecuteRequest implements IReserveExecuteRequest { - - /** - * Constructs a new ReserveExecuteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReserveExecuteRequest); - - /** ReserveExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ReserveExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ReserveExecuteRequest transaction_id. */ - public transaction_id: (number|Long); - - /** ReserveExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** ReserveExecuteRequest pre_queries. */ - public pre_queries: string[]; - - /** - * Creates a new ReserveExecuteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReserveExecuteRequest instance - */ - public static create(properties?: query.IReserveExecuteRequest): query.ReserveExecuteRequest; - - /** - * Encodes the specified ReserveExecuteRequest message. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. - * @param message ReserveExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReserveExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReserveExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. - * @param message ReserveExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReserveExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReserveExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveExecuteRequest; - - /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReserveExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveExecuteRequest; - - /** - * Verifies a ReserveExecuteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReserveExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReserveExecuteRequest - */ - public static fromObject(object: { [k: string]: any }): query.ReserveExecuteRequest; - - /** - * Creates a plain object from a ReserveExecuteRequest message. Also converts values to other types if specified. - * @param message ReserveExecuteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReserveExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReserveExecuteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReserveExecuteResponse. */ - interface IReserveExecuteResponse { - - /** ReserveExecuteResponse error */ - error?: (vtrpc.IRPCError|null); - - /** ReserveExecuteResponse result */ - result?: (query.IQueryResult|null); - - /** ReserveExecuteResponse reserved_id */ - reserved_id?: (number|Long|null); - - /** ReserveExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a ReserveExecuteResponse. */ - class ReserveExecuteResponse implements IReserveExecuteResponse { - - /** - * Constructs a new ReserveExecuteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReserveExecuteResponse); - - /** ReserveExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); - - /** ReserveExecuteResponse result. */ - public result?: (query.IQueryResult|null); - - /** ReserveExecuteResponse reserved_id. */ - public reserved_id: (number|Long); - - /** ReserveExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new ReserveExecuteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReserveExecuteResponse instance - */ - public static create(properties?: query.IReserveExecuteResponse): query.ReserveExecuteResponse; - - /** - * Encodes the specified ReserveExecuteResponse message. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. - * @param message ReserveExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReserveExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReserveExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. - * @param message ReserveExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReserveExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReserveExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveExecuteResponse; - - /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReserveExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveExecuteResponse; - - /** - * Verifies a ReserveExecuteResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReserveExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReserveExecuteResponse - */ - public static fromObject(object: { [k: string]: any }): query.ReserveExecuteResponse; - - /** - * Creates a plain object from a ReserveExecuteResponse message. Also converts values to other types if specified. - * @param message ReserveExecuteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReserveExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReserveExecuteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReserveBeginExecuteRequest. */ - interface IReserveBeginExecuteRequest { - - /** ReserveBeginExecuteRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveBeginExecuteRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveBeginExecuteRequest target */ - target?: (query.ITarget|null); - - /** ReserveBeginExecuteRequest query */ - query?: (query.IBoundQuery|null); - - /** ReserveBeginExecuteRequest options */ - options?: (query.IExecuteOptions|null); - - /** ReserveBeginExecuteRequest pre_queries */ - pre_queries?: (string[]|null); - } - - /** Represents a ReserveBeginExecuteRequest. */ - class ReserveBeginExecuteRequest implements IReserveBeginExecuteRequest { - - /** - * Constructs a new ReserveBeginExecuteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReserveBeginExecuteRequest); - - /** ReserveBeginExecuteRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReserveBeginExecuteRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReserveBeginExecuteRequest target. */ - public target?: (query.ITarget|null); - - /** ReserveBeginExecuteRequest query. */ - public query?: (query.IBoundQuery|null); - - /** ReserveBeginExecuteRequest options. */ - public options?: (query.IExecuteOptions|null); - - /** ReserveBeginExecuteRequest pre_queries. */ - public pre_queries: string[]; - - /** - * Creates a new ReserveBeginExecuteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReserveBeginExecuteRequest instance - */ - public static create(properties?: query.IReserveBeginExecuteRequest): query.ReserveBeginExecuteRequest; - - /** - * Encodes the specified ReserveBeginExecuteRequest message. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. - * @param message ReserveBeginExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReserveBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReserveBeginExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. - * @param message ReserveBeginExecuteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReserveBeginExecuteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReserveBeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginExecuteRequest; - - /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReserveBeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginExecuteRequest; - - /** - * Verifies a ReserveBeginExecuteRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReserveBeginExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReserveBeginExecuteRequest - */ - public static fromObject(object: { [k: string]: any }): query.ReserveBeginExecuteRequest; - - /** - * Creates a plain object from a ReserveBeginExecuteRequest message. Also converts values to other types if specified. - * @param message ReserveBeginExecuteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReserveBeginExecuteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReserveBeginExecuteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReserveBeginExecuteResponse. */ - interface IReserveBeginExecuteResponse { - - /** ReserveBeginExecuteResponse error */ - error?: (vtrpc.IRPCError|null); - - /** ReserveBeginExecuteResponse result */ - result?: (query.IQueryResult|null); - - /** ReserveBeginExecuteResponse transaction_id */ - transaction_id?: (number|Long|null); - - /** ReserveBeginExecuteResponse reserved_id */ - reserved_id?: (number|Long|null); - - /** ReserveBeginExecuteResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a ReserveBeginExecuteResponse. */ - class ReserveBeginExecuteResponse implements IReserveBeginExecuteResponse { - - /** - * Constructs a new ReserveBeginExecuteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReserveBeginExecuteResponse); - - /** ReserveBeginExecuteResponse error. */ - public error?: (vtrpc.IRPCError|null); - - /** ReserveBeginExecuteResponse result. */ - public result?: (query.IQueryResult|null); - - /** ReserveBeginExecuteResponse transaction_id. */ - public transaction_id: (number|Long); - - /** ReserveBeginExecuteResponse reserved_id. */ - public reserved_id: (number|Long); - - /** ReserveBeginExecuteResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new ReserveBeginExecuteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReserveBeginExecuteResponse instance - */ - public static create(properties?: query.IReserveBeginExecuteResponse): query.ReserveBeginExecuteResponse; - - /** - * Encodes the specified ReserveBeginExecuteResponse message. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. - * @param message ReserveBeginExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReserveBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReserveBeginExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. - * @param message ReserveBeginExecuteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReserveBeginExecuteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReserveBeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReserveBeginExecuteResponse; - - /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReserveBeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReserveBeginExecuteResponse; - - /** - * Verifies a ReserveBeginExecuteResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReserveBeginExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReserveBeginExecuteResponse - */ - public static fromObject(object: { [k: string]: any }): query.ReserveBeginExecuteResponse; - - /** - * Creates a plain object from a ReserveBeginExecuteResponse message. Also converts values to other types if specified. - * @param message ReserveBeginExecuteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReserveBeginExecuteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReserveBeginExecuteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReleaseRequest. */ - interface IReleaseRequest { - - /** ReleaseRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReleaseRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReleaseRequest target */ - target?: (query.ITarget|null); - - /** ReleaseRequest transaction_id */ - transaction_id?: (number|Long|null); - - /** ReleaseRequest reserved_id */ - reserved_id?: (number|Long|null); - } - - /** Represents a ReleaseRequest. */ - class ReleaseRequest implements IReleaseRequest { - - /** - * Constructs a new ReleaseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReleaseRequest); - - /** ReleaseRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** ReleaseRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** ReleaseRequest target. */ - public target?: (query.ITarget|null); - - /** ReleaseRequest transaction_id. */ - public transaction_id: (number|Long); - - /** ReleaseRequest reserved_id. */ - public reserved_id: (number|Long); - - /** - * Creates a new ReleaseRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseRequest instance - */ - public static create(properties?: query.IReleaseRequest): query.ReleaseRequest; - - /** - * Encodes the specified ReleaseRequest message. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. - * @param message ReleaseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseRequest message, length delimited. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. - * @param message ReleaseRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReleaseRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReleaseRequest; - - /** - * Decodes a ReleaseRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReleaseRequest; - - /** - * Verifies a ReleaseRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReleaseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseRequest - */ - public static fromObject(object: { [k: string]: any }): query.ReleaseRequest; - - /** - * Creates a plain object from a ReleaseRequest message. Also converts values to other types if specified. - * @param message ReleaseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReleaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReleaseResponse. */ - interface IReleaseResponse { - } - - /** Represents a ReleaseResponse. */ - class ReleaseResponse implements IReleaseResponse { - - /** - * Constructs a new ReleaseResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IReleaseResponse); - - /** - * Creates a new ReleaseResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReleaseResponse instance - */ - public static create(properties?: query.IReleaseResponse): query.ReleaseResponse; - - /** - * Encodes the specified ReleaseResponse message. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. - * @param message ReleaseResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReleaseResponse message, length delimited. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. - * @param message ReleaseResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IReleaseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReleaseResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReleaseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.ReleaseResponse; - - /** - * Decodes a ReleaseResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReleaseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.ReleaseResponse; - - /** - * Verifies a ReleaseResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReleaseResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReleaseResponse - */ - public static fromObject(object: { [k: string]: any }): query.ReleaseResponse; - - /** - * Creates a plain object from a ReleaseResponse message. Also converts values to other types if specified. - * @param message ReleaseResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.ReleaseResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReleaseResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamHealthRequest. */ - interface IStreamHealthRequest { - } - - /** Represents a StreamHealthRequest. */ - class StreamHealthRequest implements IStreamHealthRequest { - - /** - * Constructs a new StreamHealthRequest. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStreamHealthRequest); - - /** - * Creates a new StreamHealthRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamHealthRequest instance - */ - public static create(properties?: query.IStreamHealthRequest): query.StreamHealthRequest; - - /** - * Encodes the specified StreamHealthRequest message. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. - * @param message StreamHealthRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStreamHealthRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamHealthRequest message, length delimited. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. - * @param message StreamHealthRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStreamHealthRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamHealthRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamHealthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamHealthRequest; - - /** - * Decodes a StreamHealthRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamHealthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamHealthRequest; - - /** - * Verifies a StreamHealthRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamHealthRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamHealthRequest - */ - public static fromObject(object: { [k: string]: any }): query.StreamHealthRequest; - - /** - * Creates a plain object from a StreamHealthRequest message. Also converts values to other types if specified. - * @param message StreamHealthRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamHealthRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamHealthRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RealtimeStats. */ - interface IRealtimeStats { - - /** RealtimeStats health_error */ - health_error?: (string|null); - - /** RealtimeStats seconds_behind_master */ - seconds_behind_master?: (number|null); - - /** RealtimeStats binlog_players_count */ - binlog_players_count?: (number|null); - - /** RealtimeStats seconds_behind_master_filtered_replication */ - seconds_behind_master_filtered_replication?: (number|Long|null); - - /** RealtimeStats cpu_usage */ - cpu_usage?: (number|null); - - /** RealtimeStats qps */ - qps?: (number|null); - } - - /** Represents a RealtimeStats. */ - class RealtimeStats implements IRealtimeStats { - - /** - * Constructs a new RealtimeStats. - * @param [properties] Properties to set - */ - constructor(properties?: query.IRealtimeStats); - - /** RealtimeStats health_error. */ - public health_error: string; - - /** RealtimeStats seconds_behind_master. */ - public seconds_behind_master: number; - - /** RealtimeStats binlog_players_count. */ - public binlog_players_count: number; - - /** RealtimeStats seconds_behind_master_filtered_replication. */ - public seconds_behind_master_filtered_replication: (number|Long); - - /** RealtimeStats cpu_usage. */ - public cpu_usage: number; - - /** RealtimeStats qps. */ - public qps: number; - - /** - * Creates a new RealtimeStats instance using the specified properties. - * @param [properties] Properties to set - * @returns RealtimeStats instance - */ - public static create(properties?: query.IRealtimeStats): query.RealtimeStats; - - /** - * Encodes the specified RealtimeStats message. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. - * @param message RealtimeStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IRealtimeStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RealtimeStats message, length delimited. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. - * @param message RealtimeStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IRealtimeStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RealtimeStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RealtimeStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.RealtimeStats; - - /** - * Decodes a RealtimeStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RealtimeStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.RealtimeStats; - - /** - * Verifies a RealtimeStats message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RealtimeStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RealtimeStats - */ - public static fromObject(object: { [k: string]: any }): query.RealtimeStats; - - /** - * Creates a plain object from a RealtimeStats message. Also converts values to other types if specified. - * @param message RealtimeStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.RealtimeStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RealtimeStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AggregateStats. */ - interface IAggregateStats { - - /** AggregateStats healthy_tablet_count */ - healthy_tablet_count?: (number|null); - - /** AggregateStats unhealthy_tablet_count */ - unhealthy_tablet_count?: (number|null); - - /** AggregateStats seconds_behind_master_min */ - seconds_behind_master_min?: (number|null); - - /** AggregateStats seconds_behind_master_max */ - seconds_behind_master_max?: (number|null); - } - - /** Represents an AggregateStats. */ - class AggregateStats implements IAggregateStats { - - /** - * Constructs a new AggregateStats. - * @param [properties] Properties to set - */ - constructor(properties?: query.IAggregateStats); - - /** AggregateStats healthy_tablet_count. */ - public healthy_tablet_count: number; - - /** AggregateStats unhealthy_tablet_count. */ - public unhealthy_tablet_count: number; - - /** AggregateStats seconds_behind_master_min. */ - public seconds_behind_master_min: number; - - /** AggregateStats seconds_behind_master_max. */ - public seconds_behind_master_max: number; - - /** - * Creates a new AggregateStats instance using the specified properties. - * @param [properties] Properties to set - * @returns AggregateStats instance - */ - public static create(properties?: query.IAggregateStats): query.AggregateStats; - - /** - * Encodes the specified AggregateStats message. Does not implicitly {@link query.AggregateStats.verify|verify} messages. - * @param message AggregateStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AggregateStats message, length delimited. Does not implicitly {@link query.AggregateStats.verify|verify} messages. - * @param message AggregateStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IAggregateStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AggregateStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AggregateStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.AggregateStats; - - /** - * Decodes an AggregateStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AggregateStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.AggregateStats; - - /** - * Verifies an AggregateStats message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AggregateStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AggregateStats - */ - public static fromObject(object: { [k: string]: any }): query.AggregateStats; - - /** - * Creates a plain object from an AggregateStats message. Also converts values to other types if specified. - * @param message AggregateStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.AggregateStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AggregateStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamHealthResponse. */ - interface IStreamHealthResponse { - - /** StreamHealthResponse target */ - target?: (query.ITarget|null); - - /** StreamHealthResponse serving */ - serving?: (boolean|null); - - /** StreamHealthResponse tablet_externally_reparented_timestamp */ - tablet_externally_reparented_timestamp?: (number|Long|null); - - /** StreamHealthResponse realtime_stats */ - realtime_stats?: (query.IRealtimeStats|null); - - /** StreamHealthResponse tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a StreamHealthResponse. */ - class StreamHealthResponse implements IStreamHealthResponse { - - /** - * Constructs a new StreamHealthResponse. - * @param [properties] Properties to set - */ - constructor(properties?: query.IStreamHealthResponse); - - /** StreamHealthResponse target. */ - public target?: (query.ITarget|null); - - /** StreamHealthResponse serving. */ - public serving: boolean; - - /** StreamHealthResponse tablet_externally_reparented_timestamp. */ - public tablet_externally_reparented_timestamp: (number|Long); - - /** StreamHealthResponse realtime_stats. */ - public realtime_stats?: (query.IRealtimeStats|null); - - /** StreamHealthResponse tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new StreamHealthResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamHealthResponse instance - */ - public static create(properties?: query.IStreamHealthResponse): query.StreamHealthResponse; - - /** - * Encodes the specified StreamHealthResponse message. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. - * @param message StreamHealthResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.IStreamHealthResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamHealthResponse message, length delimited. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. - * @param message StreamHealthResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.IStreamHealthResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamHealthResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamHealthResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.StreamHealthResponse; - - /** - * Decodes a StreamHealthResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamHealthResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.StreamHealthResponse; - - /** - * Verifies a StreamHealthResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamHealthResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamHealthResponse - */ - public static fromObject(object: { [k: string]: any }): query.StreamHealthResponse; - - /** - * Creates a plain object from a StreamHealthResponse message. Also converts values to other types if specified. - * @param message StreamHealthResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.StreamHealthResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamHealthResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** TransactionState enum. */ - enum TransactionState { - UNKNOWN = 0, - PREPARE = 1, - COMMIT = 2, - ROLLBACK = 3 - } - - /** Properties of a TransactionMetadata. */ - interface ITransactionMetadata { - - /** TransactionMetadata dtid */ - dtid?: (string|null); - - /** TransactionMetadata state */ - state?: (query.TransactionState|null); - - /** TransactionMetadata time_created */ - time_created?: (number|Long|null); - - /** TransactionMetadata participants */ - participants?: (query.ITarget[]|null); - } - - /** Represents a TransactionMetadata. */ - class TransactionMetadata implements ITransactionMetadata { - - /** - * Constructs a new TransactionMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: query.ITransactionMetadata); - - /** TransactionMetadata dtid. */ - public dtid: string; - - /** TransactionMetadata state. */ - public state: query.TransactionState; - - /** TransactionMetadata time_created. */ - public time_created: (number|Long); - - /** TransactionMetadata participants. */ - public participants: query.ITarget[]; - - /** - * Creates a new TransactionMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns TransactionMetadata instance - */ - public static create(properties?: query.ITransactionMetadata): query.TransactionMetadata; - - /** - * Encodes the specified TransactionMetadata message. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. - * @param message TransactionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: query.ITransactionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TransactionMetadata message, length delimited. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. - * @param message TransactionMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: query.ITransactionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TransactionMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TransactionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): query.TransactionMetadata; - - /** - * Decodes a TransactionMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TransactionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): query.TransactionMetadata; - - /** - * Verifies a TransactionMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TransactionMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TransactionMetadata - */ - public static fromObject(object: { [k: string]: any }): query.TransactionMetadata; - - /** - * Creates a plain object from a TransactionMetadata message. Also converts values to other types if specified. - * @param message TransactionMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: query.TransactionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TransactionMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace topodata. */ -export namespace topodata { - - /** Properties of a KeyRange. */ - interface IKeyRange { - - /** KeyRange start */ - start?: (Uint8Array|null); - - /** KeyRange end */ - end?: (Uint8Array|null); - } - - /** Represents a KeyRange. */ - class KeyRange implements IKeyRange { - - /** - * Constructs a new KeyRange. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IKeyRange); - - /** KeyRange start. */ - public start: Uint8Array; - - /** KeyRange end. */ - public end: Uint8Array; - - /** - * Creates a new KeyRange instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyRange instance - */ - public static create(properties?: topodata.IKeyRange): topodata.KeyRange; - - /** - * Encodes the specified KeyRange message. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. - * @param message KeyRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyRange message, length delimited. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. - * @param message KeyRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.KeyRange; - - /** - * Decodes a KeyRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.KeyRange; - - /** - * Verifies a KeyRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyRange - */ - public static fromObject(object: { [k: string]: any }): topodata.KeyRange; - - /** - * Creates a plain object from a KeyRange message. Also converts values to other types if specified. - * @param message KeyRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.KeyRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** KeyspaceType enum. */ - enum KeyspaceType { - NORMAL = 0, - SNAPSHOT = 1 - } - - /** KeyspaceIdType enum. */ - enum KeyspaceIdType { - UNSET = 0, - UINT64 = 1, - BYTES = 2 - } - - /** Properties of a TabletAlias. */ - interface ITabletAlias { - - /** TabletAlias cell */ - cell?: (string|null); - - /** TabletAlias uid */ - uid?: (number|null); - } - - /** Represents a TabletAlias. */ - class TabletAlias implements ITabletAlias { - - /** - * Constructs a new TabletAlias. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ITabletAlias); - - /** TabletAlias cell. */ - public cell: string; - - /** TabletAlias uid. */ - public uid: number; - - /** - * Creates a new TabletAlias instance using the specified properties. - * @param [properties] Properties to set - * @returns TabletAlias instance - */ - public static create(properties?: topodata.ITabletAlias): topodata.TabletAlias; - - /** - * Encodes the specified TabletAlias message. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. - * @param message TabletAlias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ITabletAlias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TabletAlias message, length delimited. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. - * @param message TabletAlias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ITabletAlias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TabletAlias message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TabletAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.TabletAlias; - - /** - * Decodes a TabletAlias message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TabletAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.TabletAlias; - - /** - * Verifies a TabletAlias message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TabletAlias message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TabletAlias - */ - public static fromObject(object: { [k: string]: any }): topodata.TabletAlias; - - /** - * Creates a plain object from a TabletAlias message. Also converts values to other types if specified. - * @param message TabletAlias - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.TabletAlias, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TabletAlias to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** TabletType enum. */ - enum TabletType { - UNKNOWN = 0, - MASTER = 1, - REPLICA = 2, - RDONLY = 3, - BATCH = 3, - SPARE = 4, - EXPERIMENTAL = 5, - BACKUP = 6, - RESTORE = 7, - DRAINED = 8 - } - - /** Properties of a Tablet. */ - interface ITablet { - - /** Tablet alias */ - alias?: (topodata.ITabletAlias|null); - - /** Tablet hostname */ - hostname?: (string|null); - - /** Tablet port_map */ - port_map?: ({ [k: string]: number }|null); - - /** Tablet keyspace */ - keyspace?: (string|null); - - /** Tablet shard */ - shard?: (string|null); - - /** Tablet key_range */ - key_range?: (topodata.IKeyRange|null); - - /** Tablet type */ - type?: (topodata.TabletType|null); - - /** Tablet db_name_override */ - db_name_override?: (string|null); - - /** Tablet tags */ - tags?: ({ [k: string]: string }|null); - - /** Tablet mysql_hostname */ - mysql_hostname?: (string|null); - - /** Tablet mysql_port */ - mysql_port?: (number|null); - - /** Tablet master_term_start_time */ - master_term_start_time?: (vttime.ITime|null); - } - - /** Represents a Tablet. */ - class Tablet implements ITablet { - - /** - * Constructs a new Tablet. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ITablet); - - /** Tablet alias. */ - public alias?: (topodata.ITabletAlias|null); - - /** Tablet hostname. */ - public hostname: string; - - /** Tablet port_map. */ - public port_map: { [k: string]: number }; - - /** Tablet keyspace. */ - public keyspace: string; - - /** Tablet shard. */ - public shard: string; - - /** Tablet key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** Tablet type. */ - public type: topodata.TabletType; - - /** Tablet db_name_override. */ - public db_name_override: string; - - /** Tablet tags. */ - public tags: { [k: string]: string }; - - /** Tablet mysql_hostname. */ - public mysql_hostname: string; - - /** Tablet mysql_port. */ - public mysql_port: number; - - /** Tablet master_term_start_time. */ - public master_term_start_time?: (vttime.ITime|null); - - /** - * Creates a new Tablet instance using the specified properties. - * @param [properties] Properties to set - * @returns Tablet instance - */ - public static create(properties?: topodata.ITablet): topodata.Tablet; - - /** - * Encodes the specified Tablet message. Does not implicitly {@link topodata.Tablet.verify|verify} messages. - * @param message Tablet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ITablet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tablet message, length delimited. Does not implicitly {@link topodata.Tablet.verify|verify} messages. - * @param message Tablet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ITablet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tablet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tablet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Tablet; - - /** - * Decodes a Tablet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tablet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Tablet; - - /** - * Verifies a Tablet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tablet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tablet - */ - public static fromObject(object: { [k: string]: any }): topodata.Tablet; - - /** - * Creates a plain object from a Tablet message. Also converts values to other types if specified. - * @param message Tablet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Tablet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tablet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Shard. */ - interface IShard { - - /** Shard master_alias */ - master_alias?: (topodata.ITabletAlias|null); - - /** Shard master_term_start_time */ - master_term_start_time?: (vttime.ITime|null); - - /** Shard key_range */ - key_range?: (topodata.IKeyRange|null); - - /** Shard served_types */ - served_types?: (topodata.Shard.IServedType[]|null); - - /** Shard source_shards */ - source_shards?: (topodata.Shard.ISourceShard[]|null); - - /** Shard tablet_controls */ - tablet_controls?: (topodata.Shard.ITabletControl[]|null); - - /** Shard is_master_serving */ - is_master_serving?: (boolean|null); - } - - /** Represents a Shard. */ - class Shard implements IShard { - - /** - * Constructs a new Shard. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IShard); - - /** Shard master_alias. */ - public master_alias?: (topodata.ITabletAlias|null); - - /** Shard master_term_start_time. */ - public master_term_start_time?: (vttime.ITime|null); - - /** Shard key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** Shard served_types. */ - public served_types: topodata.Shard.IServedType[]; - - /** Shard source_shards. */ - public source_shards: topodata.Shard.ISourceShard[]; - - /** Shard tablet_controls. */ - public tablet_controls: topodata.Shard.ITabletControl[]; - - /** Shard is_master_serving. */ - public is_master_serving: boolean; - - /** - * Creates a new Shard instance using the specified properties. - * @param [properties] Properties to set - * @returns Shard instance - */ - public static create(properties?: topodata.IShard): topodata.Shard; - - /** - * Encodes the specified Shard message. Does not implicitly {@link topodata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Shard message, length delimited. Does not implicitly {@link topodata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Shard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard; - - /** - * Decodes a Shard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard; - - /** - * Verifies a Shard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Shard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Shard - */ - public static fromObject(object: { [k: string]: any }): topodata.Shard; - - /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. - * @param message Shard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Shard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Shard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Shard { - - /** Properties of a ServedType. */ - interface IServedType { - - /** ServedType tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** ServedType cells */ - cells?: (string[]|null); - } - - /** Represents a ServedType. */ - class ServedType implements IServedType { - - /** - * Constructs a new ServedType. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Shard.IServedType); - - /** ServedType tablet_type. */ - public tablet_type: topodata.TabletType; - - /** ServedType cells. */ - public cells: string[]; - - /** - * Creates a new ServedType instance using the specified properties. - * @param [properties] Properties to set - * @returns ServedType instance - */ - public static create(properties?: topodata.Shard.IServedType): topodata.Shard.ServedType; - - /** - * Encodes the specified ServedType message. Does not implicitly {@link topodata.Shard.ServedType.verify|verify} messages. - * @param message ServedType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.Shard.IServedType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServedType message, length delimited. Does not implicitly {@link topodata.Shard.ServedType.verify|verify} messages. - * @param message ServedType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.Shard.IServedType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServedType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServedType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard.ServedType; - - /** - * Decodes a ServedType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServedType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard.ServedType; - - /** - * Verifies a ServedType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServedType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServedType - */ - public static fromObject(object: { [k: string]: any }): topodata.Shard.ServedType; - - /** - * Creates a plain object from a ServedType message. Also converts values to other types if specified. - * @param message ServedType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Shard.ServedType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServedType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SourceShard. */ - interface ISourceShard { - - /** SourceShard uid */ - uid?: (number|null); - - /** SourceShard keyspace */ - keyspace?: (string|null); - - /** SourceShard shard */ - shard?: (string|null); - - /** SourceShard key_range */ - key_range?: (topodata.IKeyRange|null); - - /** SourceShard tables */ - tables?: (string[]|null); - } - - /** Represents a SourceShard. */ - class SourceShard implements ISourceShard { - - /** - * Constructs a new SourceShard. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Shard.ISourceShard); - - /** SourceShard uid. */ - public uid: number; - - /** SourceShard keyspace. */ - public keyspace: string; - - /** SourceShard shard. */ - public shard: string; - - /** SourceShard key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** SourceShard tables. */ - public tables: string[]; - - /** - * Creates a new SourceShard instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceShard instance - */ - public static create(properties?: topodata.Shard.ISourceShard): topodata.Shard.SourceShard; - - /** - * Encodes the specified SourceShard message. Does not implicitly {@link topodata.Shard.SourceShard.verify|verify} messages. - * @param message SourceShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.Shard.ISourceShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceShard message, length delimited. Does not implicitly {@link topodata.Shard.SourceShard.verify|verify} messages. - * @param message SourceShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.Shard.ISourceShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard.SourceShard; - - /** - * Decodes a SourceShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard.SourceShard; - - /** - * Verifies a SourceShard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceShard - */ - public static fromObject(object: { [k: string]: any }): topodata.Shard.SourceShard; - - /** - * Creates a plain object from a SourceShard message. Also converts values to other types if specified. - * @param message SourceShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Shard.SourceShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TabletControl. */ - interface ITabletControl { - - /** TabletControl tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** TabletControl cells */ - cells?: (string[]|null); - - /** TabletControl blacklisted_tables */ - blacklisted_tables?: (string[]|null); - - /** TabletControl frozen */ - frozen?: (boolean|null); - } - - /** Represents a TabletControl. */ - class TabletControl implements ITabletControl { - - /** - * Constructs a new TabletControl. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Shard.ITabletControl); - - /** TabletControl tablet_type. */ - public tablet_type: topodata.TabletType; - - /** TabletControl cells. */ - public cells: string[]; - - /** TabletControl blacklisted_tables. */ - public blacklisted_tables: string[]; - - /** TabletControl frozen. */ - public frozen: boolean; - - /** - * Creates a new TabletControl instance using the specified properties. - * @param [properties] Properties to set - * @returns TabletControl instance - */ - public static create(properties?: topodata.Shard.ITabletControl): topodata.Shard.TabletControl; - - /** - * Encodes the specified TabletControl message. Does not implicitly {@link topodata.Shard.TabletControl.verify|verify} messages. - * @param message TabletControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.Shard.ITabletControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TabletControl message, length delimited. Does not implicitly {@link topodata.Shard.TabletControl.verify|verify} messages. - * @param message TabletControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.Shard.ITabletControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TabletControl message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard.TabletControl; - - /** - * Decodes a TabletControl message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard.TabletControl; - - /** - * Verifies a TabletControl message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TabletControl message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TabletControl - */ - public static fromObject(object: { [k: string]: any }): topodata.Shard.TabletControl; - - /** - * Creates a plain object from a TabletControl message. Also converts values to other types if specified. - * @param message TabletControl - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Shard.TabletControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TabletControl to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a Keyspace. */ - interface IKeyspace { - - /** Keyspace sharding_column_name */ - sharding_column_name?: (string|null); - - /** Keyspace sharding_column_type */ - sharding_column_type?: (topodata.KeyspaceIdType|null); - - /** Keyspace served_froms */ - served_froms?: (topodata.Keyspace.IServedFrom[]|null); - - /** Keyspace keyspace_type */ - keyspace_type?: (topodata.KeyspaceType|null); - - /** Keyspace base_keyspace */ - base_keyspace?: (string|null); - - /** Keyspace snapshot_time */ - snapshot_time?: (vttime.ITime|null); - } - - /** Represents a Keyspace. */ - class Keyspace implements IKeyspace { - - /** - * Constructs a new Keyspace. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IKeyspace); - - /** Keyspace sharding_column_name. */ - public sharding_column_name: string; - - /** Keyspace sharding_column_type. */ - public sharding_column_type: topodata.KeyspaceIdType; - - /** Keyspace served_froms. */ - public served_froms: topodata.Keyspace.IServedFrom[]; - - /** Keyspace keyspace_type. */ - public keyspace_type: topodata.KeyspaceType; - - /** Keyspace base_keyspace. */ - public base_keyspace: string; - - /** Keyspace snapshot_time. */ - public snapshot_time?: (vttime.ITime|null); - - /** - * Creates a new Keyspace instance using the specified properties. - * @param [properties] Properties to set - * @returns Keyspace instance - */ - public static create(properties?: topodata.IKeyspace): topodata.Keyspace; - - /** - * Encodes the specified Keyspace message. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Keyspace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Keyspace; - - /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Keyspace; - - /** - * Verifies a Keyspace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Keyspace - */ - public static fromObject(object: { [k: string]: any }): topodata.Keyspace; - - /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @param message Keyspace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Keyspace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Keyspace { - - /** Properties of a ServedFrom. */ - interface IServedFrom { - - /** ServedFrom tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** ServedFrom cells */ - cells?: (string[]|null); - - /** ServedFrom keyspace */ - keyspace?: (string|null); - } - - /** Represents a ServedFrom. */ - class ServedFrom implements IServedFrom { - - /** - * Constructs a new ServedFrom. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Keyspace.IServedFrom); - - /** ServedFrom tablet_type. */ - public tablet_type: topodata.TabletType; - - /** ServedFrom cells. */ - public cells: string[]; - - /** ServedFrom keyspace. */ - public keyspace: string; - - /** - * Creates a new ServedFrom instance using the specified properties. - * @param [properties] Properties to set - * @returns ServedFrom instance - */ - public static create(properties?: topodata.Keyspace.IServedFrom): topodata.Keyspace.ServedFrom; - - /** - * Encodes the specified ServedFrom message. Does not implicitly {@link topodata.Keyspace.ServedFrom.verify|verify} messages. - * @param message ServedFrom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.Keyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServedFrom message, length delimited. Does not implicitly {@link topodata.Keyspace.ServedFrom.verify|verify} messages. - * @param message ServedFrom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.Keyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServedFrom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Keyspace.ServedFrom; - - /** - * Decodes a ServedFrom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Keyspace.ServedFrom; - - /** - * Verifies a ServedFrom message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServedFrom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServedFrom - */ - public static fromObject(object: { [k: string]: any }): topodata.Keyspace.ServedFrom; - - /** - * Creates a plain object from a ServedFrom message. Also converts values to other types if specified. - * @param message ServedFrom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.Keyspace.ServedFrom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServedFrom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ShardReplication. */ - interface IShardReplication { - - /** ShardReplication nodes */ - nodes?: (topodata.ShardReplication.INode[]|null); - } - - /** Represents a ShardReplication. */ - class ShardReplication implements IShardReplication { - - /** - * Constructs a new ShardReplication. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IShardReplication); - - /** ShardReplication nodes. */ - public nodes: topodata.ShardReplication.INode[]; - - /** - * Creates a new ShardReplication instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardReplication instance - */ - public static create(properties?: topodata.IShardReplication): topodata.ShardReplication; - - /** - * Encodes the specified ShardReplication message. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. - * @param message ShardReplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IShardReplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardReplication message, length delimited. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. - * @param message ShardReplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IShardReplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardReplication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardReplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardReplication; - - /** - * Decodes a ShardReplication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardReplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardReplication; - - /** - * Verifies a ShardReplication message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardReplication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardReplication - */ - public static fromObject(object: { [k: string]: any }): topodata.ShardReplication; - - /** - * Creates a plain object from a ShardReplication message. Also converts values to other types if specified. - * @param message ShardReplication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.ShardReplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardReplication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ShardReplication { - - /** Properties of a Node. */ - interface INode { - - /** Node tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a Node. */ - class Node implements INode { - - /** - * Constructs a new Node. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ShardReplication.INode); - - /** Node tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new Node instance using the specified properties. - * @param [properties] Properties to set - * @returns Node instance - */ - public static create(properties?: topodata.ShardReplication.INode): topodata.ShardReplication.Node; - - /** - * Encodes the specified Node message. Does not implicitly {@link topodata.ShardReplication.Node.verify|verify} messages. - * @param message Node message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ShardReplication.INode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Node message, length delimited. Does not implicitly {@link topodata.ShardReplication.Node.verify|verify} messages. - * @param message Node message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ShardReplication.INode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Node message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardReplication.Node; - - /** - * Decodes a Node message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardReplication.Node; - - /** - * Verifies a Node message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Node message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Node - */ - public static fromObject(object: { [k: string]: any }): topodata.ShardReplication.Node; - - /** - * Creates a plain object from a Node message. Also converts values to other types if specified. - * @param message Node - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.ShardReplication.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Node to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ShardReference. */ - interface IShardReference { - - /** ShardReference name */ - name?: (string|null); - - /** ShardReference key_range */ - key_range?: (topodata.IKeyRange|null); - } - - /** Represents a ShardReference. */ - class ShardReference implements IShardReference { - - /** - * Constructs a new ShardReference. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IShardReference); - - /** ShardReference name. */ - public name: string; - - /** ShardReference key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** - * Creates a new ShardReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardReference instance - */ - public static create(properties?: topodata.IShardReference): topodata.ShardReference; - - /** - * Encodes the specified ShardReference message. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. - * @param message ShardReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IShardReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardReference message, length delimited. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. - * @param message ShardReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IShardReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardReference; - - /** - * Decodes a ShardReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardReference; - - /** - * Verifies a ShardReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardReference - */ - public static fromObject(object: { [k: string]: any }): topodata.ShardReference; - - /** - * Creates a plain object from a ShardReference message. Also converts values to other types if specified. - * @param message ShardReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.ShardReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ShardTabletControl. */ - interface IShardTabletControl { - - /** ShardTabletControl name */ - name?: (string|null); - - /** ShardTabletControl key_range */ - key_range?: (topodata.IKeyRange|null); - - /** ShardTabletControl query_service_disabled */ - query_service_disabled?: (boolean|null); - } - - /** Represents a ShardTabletControl. */ - class ShardTabletControl implements IShardTabletControl { - - /** - * Constructs a new ShardTabletControl. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IShardTabletControl); - - /** ShardTabletControl name. */ - public name: string; - - /** ShardTabletControl key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** ShardTabletControl query_service_disabled. */ - public query_service_disabled: boolean; - - /** - * Creates a new ShardTabletControl instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardTabletControl instance - */ - public static create(properties?: topodata.IShardTabletControl): topodata.ShardTabletControl; - - /** - * Encodes the specified ShardTabletControl message. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. - * @param message ShardTabletControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IShardTabletControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardTabletControl message, length delimited. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. - * @param message ShardTabletControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IShardTabletControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardTabletControl message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardTabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardTabletControl; - - /** - * Decodes a ShardTabletControl message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardTabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardTabletControl; - - /** - * Verifies a ShardTabletControl message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardTabletControl message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardTabletControl - */ - public static fromObject(object: { [k: string]: any }): topodata.ShardTabletControl; - - /** - * Creates a plain object from a ShardTabletControl message. Also converts values to other types if specified. - * @param message ShardTabletControl - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.ShardTabletControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardTabletControl to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SrvKeyspace. */ - interface ISrvKeyspace { - - /** SrvKeyspace partitions */ - partitions?: (topodata.SrvKeyspace.IKeyspacePartition[]|null); - - /** SrvKeyspace sharding_column_name */ - sharding_column_name?: (string|null); - - /** SrvKeyspace sharding_column_type */ - sharding_column_type?: (topodata.KeyspaceIdType|null); - - /** SrvKeyspace served_from */ - served_from?: (topodata.SrvKeyspace.IServedFrom[]|null); - } - - /** Represents a SrvKeyspace. */ - class SrvKeyspace implements ISrvKeyspace { - - /** - * Constructs a new SrvKeyspace. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ISrvKeyspace); - - /** SrvKeyspace partitions. */ - public partitions: topodata.SrvKeyspace.IKeyspacePartition[]; - - /** SrvKeyspace sharding_column_name. */ - public sharding_column_name: string; - - /** SrvKeyspace sharding_column_type. */ - public sharding_column_type: topodata.KeyspaceIdType; - - /** SrvKeyspace served_from. */ - public served_from: topodata.SrvKeyspace.IServedFrom[]; - - /** - * Creates a new SrvKeyspace instance using the specified properties. - * @param [properties] Properties to set - * @returns SrvKeyspace instance - */ - public static create(properties?: topodata.ISrvKeyspace): topodata.SrvKeyspace; - - /** - * Encodes the specified SrvKeyspace message. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. - * @param message SrvKeyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ISrvKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SrvKeyspace message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. - * @param message SrvKeyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ISrvKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SrvKeyspace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SrvKeyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.SrvKeyspace; - - /** - * Decodes a SrvKeyspace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SrvKeyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.SrvKeyspace; - - /** - * Verifies a SrvKeyspace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SrvKeyspace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SrvKeyspace - */ - public static fromObject(object: { [k: string]: any }): topodata.SrvKeyspace; - - /** - * Creates a plain object from a SrvKeyspace message. Also converts values to other types if specified. - * @param message SrvKeyspace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.SrvKeyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SrvKeyspace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace SrvKeyspace { - - /** Properties of a KeyspacePartition. */ - interface IKeyspacePartition { - - /** KeyspacePartition served_type */ - served_type?: (topodata.TabletType|null); - - /** KeyspacePartition shard_references */ - shard_references?: (topodata.IShardReference[]|null); - - /** KeyspacePartition shard_tablet_controls */ - shard_tablet_controls?: (topodata.IShardTabletControl[]|null); - } - - /** Represents a KeyspacePartition. */ - class KeyspacePartition implements IKeyspacePartition { - - /** - * Constructs a new KeyspacePartition. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.SrvKeyspace.IKeyspacePartition); - - /** KeyspacePartition served_type. */ - public served_type: topodata.TabletType; - - /** KeyspacePartition shard_references. */ - public shard_references: topodata.IShardReference[]; - - /** KeyspacePartition shard_tablet_controls. */ - public shard_tablet_controls: topodata.IShardTabletControl[]; - - /** - * Creates a new KeyspacePartition instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyspacePartition instance - */ - public static create(properties?: topodata.SrvKeyspace.IKeyspacePartition): topodata.SrvKeyspace.KeyspacePartition; - - /** - * Encodes the specified KeyspacePartition message. Does not implicitly {@link topodata.SrvKeyspace.KeyspacePartition.verify|verify} messages. - * @param message KeyspacePartition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.SrvKeyspace.IKeyspacePartition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyspacePartition message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.KeyspacePartition.verify|verify} messages. - * @param message KeyspacePartition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.SrvKeyspace.IKeyspacePartition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyspacePartition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyspacePartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.SrvKeyspace.KeyspacePartition; - - /** - * Decodes a KeyspacePartition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyspacePartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.SrvKeyspace.KeyspacePartition; - - /** - * Verifies a KeyspacePartition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyspacePartition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyspacePartition - */ - public static fromObject(object: { [k: string]: any }): topodata.SrvKeyspace.KeyspacePartition; - - /** - * Creates a plain object from a KeyspacePartition message. Also converts values to other types if specified. - * @param message KeyspacePartition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.SrvKeyspace.KeyspacePartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyspacePartition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServedFrom. */ - interface IServedFrom { - - /** ServedFrom tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** ServedFrom keyspace */ - keyspace?: (string|null); - } - - /** Represents a ServedFrom. */ - class ServedFrom implements IServedFrom { - - /** - * Constructs a new ServedFrom. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.SrvKeyspace.IServedFrom); - - /** ServedFrom tablet_type. */ - public tablet_type: topodata.TabletType; - - /** ServedFrom keyspace. */ - public keyspace: string; - - /** - * Creates a new ServedFrom instance using the specified properties. - * @param [properties] Properties to set - * @returns ServedFrom instance - */ - public static create(properties?: topodata.SrvKeyspace.IServedFrom): topodata.SrvKeyspace.ServedFrom; - - /** - * Encodes the specified ServedFrom message. Does not implicitly {@link topodata.SrvKeyspace.ServedFrom.verify|verify} messages. - * @param message ServedFrom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.SrvKeyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServedFrom message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.ServedFrom.verify|verify} messages. - * @param message ServedFrom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.SrvKeyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServedFrom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.SrvKeyspace.ServedFrom; - - /** - * Decodes a ServedFrom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.SrvKeyspace.ServedFrom; - - /** - * Verifies a ServedFrom message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServedFrom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServedFrom - */ - public static fromObject(object: { [k: string]: any }): topodata.SrvKeyspace.ServedFrom; - - /** - * Creates a plain object from a ServedFrom message. Also converts values to other types if specified. - * @param message ServedFrom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.SrvKeyspace.ServedFrom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServedFrom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a CellInfo. */ - interface ICellInfo { - - /** CellInfo server_address */ - server_address?: (string|null); - - /** CellInfo root */ - root?: (string|null); - } - - /** Represents a CellInfo. */ - class CellInfo implements ICellInfo { - - /** - * Constructs a new CellInfo. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ICellInfo); - - /** CellInfo server_address. */ - public server_address: string; - - /** CellInfo root. */ - public root: string; - - /** - * Creates a new CellInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CellInfo instance - */ - public static create(properties?: topodata.ICellInfo): topodata.CellInfo; - - /** - * Encodes the specified CellInfo message. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. - * @param message CellInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ICellInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CellInfo message, length delimited. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. - * @param message CellInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ICellInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CellInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CellInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.CellInfo; - - /** - * Decodes a CellInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CellInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.CellInfo; - - /** - * Verifies a CellInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CellInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CellInfo - */ - public static fromObject(object: { [k: string]: any }): topodata.CellInfo; - - /** - * Creates a plain object from a CellInfo message. Also converts values to other types if specified. - * @param message CellInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.CellInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CellInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CellsAlias. */ - interface ICellsAlias { - - /** CellsAlias cells */ - cells?: (string[]|null); - } - - /** Represents a CellsAlias. */ - class CellsAlias implements ICellsAlias { - - /** - * Constructs a new CellsAlias. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ICellsAlias); - - /** CellsAlias cells. */ - public cells: string[]; - - /** - * Creates a new CellsAlias instance using the specified properties. - * @param [properties] Properties to set - * @returns CellsAlias instance - */ - public static create(properties?: topodata.ICellsAlias): topodata.CellsAlias; - - /** - * Encodes the specified CellsAlias message. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. - * @param message CellsAlias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ICellsAlias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CellsAlias message, length delimited. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. - * @param message CellsAlias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ICellsAlias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CellsAlias message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CellsAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.CellsAlias; - - /** - * Decodes a CellsAlias message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CellsAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.CellsAlias; - - /** - * Verifies a CellsAlias message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CellsAlias message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CellsAlias - */ - public static fromObject(object: { [k: string]: any }): topodata.CellsAlias; - - /** - * Creates a plain object from a CellsAlias message. Also converts values to other types if specified. - * @param message CellsAlias - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.CellsAlias, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CellsAlias to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TopoConfig. */ - interface ITopoConfig { - - /** TopoConfig topo_type */ - topo_type?: (string|null); - - /** TopoConfig server */ - server?: (string|null); - - /** TopoConfig root */ - root?: (string|null); - } - - /** Represents a TopoConfig. */ - class TopoConfig implements ITopoConfig { - - /** - * Constructs a new TopoConfig. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ITopoConfig); - - /** TopoConfig topo_type. */ - public topo_type: string; - - /** TopoConfig server. */ - public server: string; - - /** TopoConfig root. */ - public root: string; - - /** - * Creates a new TopoConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TopoConfig instance - */ - public static create(properties?: topodata.ITopoConfig): topodata.TopoConfig; - - /** - * Encodes the specified TopoConfig message. Does not implicitly {@link topodata.TopoConfig.verify|verify} messages. - * @param message TopoConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.ITopoConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TopoConfig message, length delimited. Does not implicitly {@link topodata.TopoConfig.verify|verify} messages. - * @param message TopoConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.ITopoConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TopoConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TopoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.TopoConfig; - - /** - * Decodes a TopoConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TopoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.TopoConfig; - - /** - * Verifies a TopoConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TopoConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TopoConfig - */ - public static fromObject(object: { [k: string]: any }): topodata.TopoConfig; - - /** - * Creates a plain object from a TopoConfig message. Also converts values to other types if specified. - * @param message TopoConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.TopoConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TopoConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExternalVitessCluster. */ - interface IExternalVitessCluster { - - /** ExternalVitessCluster topo_config */ - topo_config?: (topodata.ITopoConfig|null); - } - - /** Represents an ExternalVitessCluster. */ - class ExternalVitessCluster implements IExternalVitessCluster { - - /** - * Constructs a new ExternalVitessCluster. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IExternalVitessCluster); - - /** ExternalVitessCluster topo_config. */ - public topo_config?: (topodata.ITopoConfig|null); - - /** - * Creates a new ExternalVitessCluster instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalVitessCluster instance - */ - public static create(properties?: topodata.IExternalVitessCluster): topodata.ExternalVitessCluster; - - /** - * Encodes the specified ExternalVitessCluster message. Does not implicitly {@link topodata.ExternalVitessCluster.verify|verify} messages. - * @param message ExternalVitessCluster message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IExternalVitessCluster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalVitessCluster message, length delimited. Does not implicitly {@link topodata.ExternalVitessCluster.verify|verify} messages. - * @param message ExternalVitessCluster message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IExternalVitessCluster, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalVitessCluster message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalVitessCluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ExternalVitessCluster; - - /** - * Decodes an ExternalVitessCluster message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalVitessCluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ExternalVitessCluster; - - /** - * Verifies an ExternalVitessCluster message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExternalVitessCluster message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalVitessCluster - */ - public static fromObject(object: { [k: string]: any }): topodata.ExternalVitessCluster; - - /** - * Creates a plain object from an ExternalVitessCluster message. Also converts values to other types if specified. - * @param message ExternalVitessCluster - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.ExternalVitessCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalVitessCluster to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExternalClusters. */ - interface IExternalClusters { - - /** ExternalClusters vitess_cluster */ - vitess_cluster?: (topodata.IExternalVitessCluster[]|null); - } - - /** Represents an ExternalClusters. */ - class ExternalClusters implements IExternalClusters { - - /** - * Constructs a new ExternalClusters. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.IExternalClusters); - - /** ExternalClusters vitess_cluster. */ - public vitess_cluster: topodata.IExternalVitessCluster[]; - - /** - * Creates a new ExternalClusters instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalClusters instance - */ - public static create(properties?: topodata.IExternalClusters): topodata.ExternalClusters; - - /** - * Encodes the specified ExternalClusters message. Does not implicitly {@link topodata.ExternalClusters.verify|verify} messages. - * @param message ExternalClusters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: topodata.IExternalClusters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalClusters message, length delimited. Does not implicitly {@link topodata.ExternalClusters.verify|verify} messages. - * @param message ExternalClusters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: topodata.IExternalClusters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalClusters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalClusters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ExternalClusters; - - /** - * Decodes an ExternalClusters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalClusters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ExternalClusters; - - /** - * Verifies an ExternalClusters message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExternalClusters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalClusters - */ - public static fromObject(object: { [k: string]: any }): topodata.ExternalClusters; - - /** - * Creates a plain object from an ExternalClusters message. Also converts values to other types if specified. - * @param message ExternalClusters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: topodata.ExternalClusters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalClusters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace vttime. */ -export namespace vttime { - - /** Properties of a Time. */ - interface ITime { - - /** Time seconds */ - seconds?: (number|Long|null); - - /** Time nanoseconds */ - nanoseconds?: (number|null); - } - - /** Represents a Time. */ - class Time implements ITime { - - /** - * Constructs a new Time. - * @param [properties] Properties to set - */ - constructor(properties?: vttime.ITime); - - /** Time seconds. */ - public seconds: (number|Long); - - /** Time nanoseconds. */ - public nanoseconds: number; - - /** - * Creates a new Time instance using the specified properties. - * @param [properties] Properties to set - * @returns Time instance - */ - public static create(properties?: vttime.ITime): vttime.Time; - - /** - * Encodes the specified Time message. Does not implicitly {@link vttime.Time.verify|verify} messages. - * @param message Time message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vttime.ITime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Time message, length delimited. Does not implicitly {@link vttime.Time.verify|verify} messages. - * @param message Time message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vttime.ITime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Time message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Time - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vttime.Time; - - /** - * Decodes a Time message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Time - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vttime.Time; - - /** - * Verifies a Time message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Time message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Time - */ - public static fromObject(object: { [k: string]: any }): vttime.Time; - - /** - * Creates a plain object from a Time message. Also converts values to other types if specified. - * @param message Time - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vttime.Time, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Time to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: vttime.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: vttime.IDuration): vttime.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link vttime.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vttime.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link vttime.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vttime.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vttime.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vttime.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): vttime.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vttime.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace vtrpc. */ -export namespace vtrpc { - - /** Properties of a CallerID. */ - interface ICallerID { - - /** CallerID principal */ - principal?: (string|null); - - /** CallerID component */ - component?: (string|null); - - /** CallerID subcomponent */ - subcomponent?: (string|null); - } - - /** Represents a CallerID. */ - class CallerID implements ICallerID { - - /** - * Constructs a new CallerID. - * @param [properties] Properties to set - */ - constructor(properties?: vtrpc.ICallerID); - - /** CallerID principal. */ - public principal: string; - - /** CallerID component. */ - public component: string; - - /** CallerID subcomponent. */ - public subcomponent: string; - - /** - * Creates a new CallerID instance using the specified properties. - * @param [properties] Properties to set - * @returns CallerID instance - */ - public static create(properties?: vtrpc.ICallerID): vtrpc.CallerID; - - /** - * Encodes the specified CallerID message. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. - * @param message CallerID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtrpc.ICallerID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CallerID message, length delimited. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. - * @param message CallerID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtrpc.ICallerID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CallerID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtrpc.CallerID; - - /** - * Decodes a CallerID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtrpc.CallerID; - - /** - * Verifies a CallerID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CallerID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CallerID - */ - public static fromObject(object: { [k: string]: any }): vtrpc.CallerID; - - /** - * Creates a plain object from a CallerID message. Also converts values to other types if specified. - * @param message CallerID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtrpc.CallerID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CallerID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Code enum. */ - enum Code { - OK = 0, - CANCELED = 1, - UNKNOWN = 2, - INVALID_ARGUMENT = 3, - DEADLINE_EXCEEDED = 4, - NOT_FOUND = 5, - ALREADY_EXISTS = 6, - PERMISSION_DENIED = 7, - UNAUTHENTICATED = 16, - RESOURCE_EXHAUSTED = 8, - FAILED_PRECONDITION = 9, - ABORTED = 10, - OUT_OF_RANGE = 11, - UNIMPLEMENTED = 12, - INTERNAL = 13, - UNAVAILABLE = 14, - DATA_LOSS = 15 - } - - /** LegacyErrorCode enum. */ - enum LegacyErrorCode { - SUCCESS_LEGACY = 0, - CANCELLED_LEGACY = 1, - UNKNOWN_ERROR_LEGACY = 2, - BAD_INPUT_LEGACY = 3, - DEADLINE_EXCEEDED_LEGACY = 4, - INTEGRITY_ERROR_LEGACY = 5, - PERMISSION_DENIED_LEGACY = 6, - RESOURCE_EXHAUSTED_LEGACY = 7, - QUERY_NOT_SERVED_LEGACY = 8, - NOT_IN_TX_LEGACY = 9, - INTERNAL_ERROR_LEGACY = 10, - TRANSIENT_ERROR_LEGACY = 11, - UNAUTHENTICATED_LEGACY = 12 - } - - /** Properties of a RPCError. */ - interface IRPCError { - - /** RPCError legacy_code */ - legacy_code?: (vtrpc.LegacyErrorCode|null); - - /** RPCError message */ - message?: (string|null); - - /** RPCError code */ - code?: (vtrpc.Code|null); - } - - /** Represents a RPCError. */ - class RPCError implements IRPCError { - - /** - * Constructs a new RPCError. - * @param [properties] Properties to set - */ - constructor(properties?: vtrpc.IRPCError); - - /** RPCError legacy_code. */ - public legacy_code: vtrpc.LegacyErrorCode; - - /** RPCError message. */ - public message: string; - - /** RPCError code. */ - public code: vtrpc.Code; - - /** - * Creates a new RPCError instance using the specified properties. - * @param [properties] Properties to set - * @returns RPCError instance - */ - public static create(properties?: vtrpc.IRPCError): vtrpc.RPCError; - - /** - * Encodes the specified RPCError message. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. - * @param message RPCError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtrpc.IRPCError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RPCError message, length delimited. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. - * @param message RPCError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtrpc.IRPCError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RPCError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RPCError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtrpc.RPCError; - - /** - * Decodes a RPCError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RPCError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtrpc.RPCError; - - /** - * Verifies a RPCError message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RPCError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RPCError - */ - public static fromObject(object: { [k: string]: any }): vtrpc.RPCError; - - /** - * Creates a plain object from a RPCError message. Also converts values to other types if specified. - * @param message RPCError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtrpc.RPCError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RPCError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace replicationdata. */ -export namespace replicationdata { - - /** Properties of a Status. */ - interface IStatus { - - /** Status position */ - position?: (string|null); - - /** Status io_thread_running */ - io_thread_running?: (boolean|null); - - /** Status sql_thread_running */ - sql_thread_running?: (boolean|null); - - /** Status seconds_behind_master */ - seconds_behind_master?: (number|null); - - /** Status master_host */ - master_host?: (string|null); - - /** Status master_port */ - master_port?: (number|null); - - /** Status master_connect_retry */ - master_connect_retry?: (number|null); - - /** Status relay_log_position */ - relay_log_position?: (string|null); - - /** Status file_position */ - file_position?: (string|null); - - /** Status file_relay_log_position */ - file_relay_log_position?: (string|null); - - /** Status master_server_id */ - master_server_id?: (number|null); - - /** Status master_uuid */ - master_uuid?: (string|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: replicationdata.IStatus); - - /** Status position. */ - public position: string; - - /** Status io_thread_running. */ - public io_thread_running: boolean; - - /** Status sql_thread_running. */ - public sql_thread_running: boolean; - - /** Status seconds_behind_master. */ - public seconds_behind_master: number; - - /** Status master_host. */ - public master_host: string; - - /** Status master_port. */ - public master_port: number; - - /** Status master_connect_retry. */ - public master_connect_retry: number; - - /** Status relay_log_position. */ - public relay_log_position: string; - - /** Status file_position. */ - public file_position: string; - - /** Status file_relay_log_position. */ - public file_relay_log_position: string; - - /** Status master_server_id. */ - public master_server_id: number; - - /** Status master_uuid. */ - public master_uuid: string; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: replicationdata.IStatus): replicationdata.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link replicationdata.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: replicationdata.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link replicationdata.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: replicationdata.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): replicationdata.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: replicationdata.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StopReplicationStatus. */ - interface IStopReplicationStatus { - - /** StopReplicationStatus before */ - before?: (replicationdata.IStatus|null); - - /** StopReplicationStatus after */ - after?: (replicationdata.IStatus|null); - } - - /** Represents a StopReplicationStatus. */ - class StopReplicationStatus implements IStopReplicationStatus { - - /** - * Constructs a new StopReplicationStatus. - * @param [properties] Properties to set - */ - constructor(properties?: replicationdata.IStopReplicationStatus); - - /** StopReplicationStatus before. */ - public before?: (replicationdata.IStatus|null); - - /** StopReplicationStatus after. */ - public after?: (replicationdata.IStatus|null); - - /** - * Creates a new StopReplicationStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationStatus instance - */ - public static create(properties?: replicationdata.IStopReplicationStatus): replicationdata.StopReplicationStatus; - - /** - * Encodes the specified StopReplicationStatus message. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. - * @param message StopReplicationStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: replicationdata.IStopReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationStatus message, length delimited. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. - * @param message StopReplicationStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: replicationdata.IStopReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.StopReplicationStatus; - - /** - * Decodes a StopReplicationStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.StopReplicationStatus; - - /** - * Verifies a StopReplicationStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopReplicationStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationStatus - */ - public static fromObject(object: { [k: string]: any }): replicationdata.StopReplicationStatus; - - /** - * Creates a plain object from a StopReplicationStatus message. Also converts values to other types if specified. - * @param message StopReplicationStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: replicationdata.StopReplicationStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** StopReplicationMode enum. */ - enum StopReplicationMode { - IOANDSQLTHREAD = 0, - IOTHREADONLY = 1 - } - - /** Properties of a MasterStatus. */ - interface IMasterStatus { - - /** MasterStatus position */ - position?: (string|null); - - /** MasterStatus file_position */ - file_position?: (string|null); - } - - /** Represents a MasterStatus. */ - class MasterStatus implements IMasterStatus { - - /** - * Constructs a new MasterStatus. - * @param [properties] Properties to set - */ - constructor(properties?: replicationdata.IMasterStatus); - - /** MasterStatus position. */ - public position: string; - - /** MasterStatus file_position. */ - public file_position: string; - - /** - * Creates a new MasterStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterStatus instance - */ - public static create(properties?: replicationdata.IMasterStatus): replicationdata.MasterStatus; - - /** - * Encodes the specified MasterStatus message. Does not implicitly {@link replicationdata.MasterStatus.verify|verify} messages. - * @param message MasterStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: replicationdata.IMasterStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterStatus message, length delimited. Does not implicitly {@link replicationdata.MasterStatus.verify|verify} messages. - * @param message MasterStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: replicationdata.IMasterStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): replicationdata.MasterStatus; - - /** - * Decodes a MasterStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): replicationdata.MasterStatus; - - /** - * Verifies a MasterStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterStatus - */ - public static fromObject(object: { [k: string]: any }): replicationdata.MasterStatus; - - /** - * Creates a plain object from a MasterStatus message. Also converts values to other types if specified. - * @param message MasterStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: replicationdata.MasterStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace logutil. */ -export namespace logutil { - - /** Level enum. */ - enum Level { - INFO = 0, - WARNING = 1, - ERROR = 2, - CONSOLE = 3 - } - - /** Properties of an Event. */ - interface IEvent { - - /** Event time */ - time?: (vttime.ITime|null); - - /** Event level */ - level?: (logutil.Level|null); - - /** Event file */ - file?: (string|null); - - /** Event line */ - line?: (number|Long|null); - - /** Event value */ - value?: (string|null); - } - - /** Represents an Event. */ - class Event implements IEvent { - - /** - * Constructs a new Event. - * @param [properties] Properties to set - */ - constructor(properties?: logutil.IEvent); - - /** Event time. */ - public time?: (vttime.ITime|null); - - /** Event level. */ - public level: logutil.Level; - - /** Event file. */ - public file: string; - - /** Event line. */ - public line: (number|Long); - - /** Event value. */ - public value: string; - - /** - * Creates a new Event instance using the specified properties. - * @param [properties] Properties to set - * @returns Event instance - */ - public static create(properties?: logutil.IEvent): logutil.Event; - - /** - * Encodes the specified Event message. Does not implicitly {@link logutil.Event.verify|verify} messages. - * @param message Event message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: logutil.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link logutil.Event.verify|verify} messages. - * @param message Event message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: logutil.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Event message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): logutil.Event; - - /** - * Decodes an Event message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): logutil.Event; - - /** - * Verifies an Event message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Event message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Event - */ - public static fromObject(object: { [k: string]: any }): logutil.Event; - - /** - * Creates a plain object from an Event message. Also converts values to other types if specified. - * @param message Event - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: logutil.Event, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Event to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace vschema. */ -export namespace vschema { - - /** Properties of a RoutingRules. */ - interface IRoutingRules { - - /** RoutingRules rules */ - rules?: (vschema.IRoutingRule[]|null); - } - - /** Represents a RoutingRules. */ - class RoutingRules implements IRoutingRules { - - /** - * Constructs a new RoutingRules. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IRoutingRules); - - /** RoutingRules rules. */ - public rules: vschema.IRoutingRule[]; - - /** - * Creates a new RoutingRules instance using the specified properties. - * @param [properties] Properties to set - * @returns RoutingRules instance - */ - public static create(properties?: vschema.IRoutingRules): vschema.RoutingRules; - - /** - * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. - * @param message RoutingRules message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. - * @param message RoutingRules message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IRoutingRules, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RoutingRules message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RoutingRules - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRules; - - /** - * Decodes a RoutingRules message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RoutingRules - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRules; - - /** - * Verifies a RoutingRules message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RoutingRules - */ - public static fromObject(object: { [k: string]: any }): vschema.RoutingRules; - - /** - * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. - * @param message RoutingRules - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.RoutingRules, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RoutingRules to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RoutingRule. */ - interface IRoutingRule { - - /** RoutingRule from_table */ - from_table?: (string|null); - - /** RoutingRule to_tables */ - to_tables?: (string[]|null); - } - - /** Represents a RoutingRule. */ - class RoutingRule implements IRoutingRule { - - /** - * Constructs a new RoutingRule. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IRoutingRule); - - /** RoutingRule from_table. */ - public from_table: string; - - /** RoutingRule to_tables. */ - public to_tables: string[]; - - /** - * Creates a new RoutingRule instance using the specified properties. - * @param [properties] Properties to set - * @returns RoutingRule instance - */ - public static create(properties?: vschema.IRoutingRule): vschema.RoutingRule; - - /** - * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. - * @param message RoutingRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. - * @param message RoutingRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RoutingRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RoutingRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRule; - - /** - * Decodes a RoutingRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RoutingRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRule; - - /** - * Verifies a RoutingRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RoutingRule - */ - public static fromObject(object: { [k: string]: any }): vschema.RoutingRule; - - /** - * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. - * @param message RoutingRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.RoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RoutingRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Keyspace. */ - interface IKeyspace { - - /** Keyspace sharded */ - sharded?: (boolean|null); - - /** Keyspace vindexes */ - vindexes?: ({ [k: string]: vschema.IVindex }|null); - - /** Keyspace tables */ - tables?: ({ [k: string]: vschema.ITable }|null); - - /** Keyspace require_explicit_routing */ - require_explicit_routing?: (boolean|null); - } - - /** Represents a Keyspace. */ - class Keyspace implements IKeyspace { - - /** - * Constructs a new Keyspace. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IKeyspace); - - /** Keyspace sharded. */ - public sharded: boolean; - - /** Keyspace vindexes. */ - public vindexes: { [k: string]: vschema.IVindex }; - - /** Keyspace tables. */ - public tables: { [k: string]: vschema.ITable }; - - /** Keyspace require_explicit_routing. */ - public require_explicit_routing: boolean; - - /** - * Creates a new Keyspace instance using the specified properties. - * @param [properties] Properties to set - * @returns Keyspace instance - */ - public static create(properties?: vschema.IKeyspace): vschema.Keyspace; - - /** - * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Keyspace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Keyspace; - - /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Keyspace; - - /** - * Verifies a Keyspace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Keyspace - */ - public static fromObject(object: { [k: string]: any }): vschema.Keyspace; - - /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @param message Keyspace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Keyspace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Vindex. */ - interface IVindex { - - /** Vindex type */ - type?: (string|null); - - /** Vindex params */ - params?: ({ [k: string]: string }|null); - - /** Vindex owner */ - owner?: (string|null); - } - - /** Represents a Vindex. */ - class Vindex implements IVindex { - - /** - * Constructs a new Vindex. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IVindex); - - /** Vindex type. */ - public type: string; - - /** Vindex params. */ - public params: { [k: string]: string }; - - /** Vindex owner. */ - public owner: string; - - /** - * Creates a new Vindex instance using the specified properties. - * @param [properties] Properties to set - * @returns Vindex instance - */ - public static create(properties?: vschema.IVindex): vschema.Vindex; - - /** - * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. - * @param message Vindex message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. - * @param message Vindex message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Vindex message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Vindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Vindex; - - /** - * Decodes a Vindex message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Vindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Vindex; - - /** - * Verifies a Vindex message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Vindex message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Vindex - */ - public static fromObject(object: { [k: string]: any }): vschema.Vindex; - - /** - * Creates a plain object from a Vindex message. Also converts values to other types if specified. - * @param message Vindex - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.Vindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vindex to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Table. */ - interface ITable { - - /** Table type */ - type?: (string|null); - - /** Table column_vindexes */ - column_vindexes?: (vschema.IColumnVindex[]|null); - - /** Table auto_increment */ - auto_increment?: (vschema.IAutoIncrement|null); - - /** Table columns */ - columns?: (vschema.IColumn[]|null); - - /** Table pinned */ - pinned?: (string|null); - - /** Table column_list_authoritative */ - column_list_authoritative?: (boolean|null); - } - - /** Represents a Table. */ - class Table implements ITable { - - /** - * Constructs a new Table. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.ITable); - - /** Table type. */ - public type: string; - - /** Table column_vindexes. */ - public column_vindexes: vschema.IColumnVindex[]; - - /** Table auto_increment. */ - public auto_increment?: (vschema.IAutoIncrement|null); - - /** Table columns. */ - public columns: vschema.IColumn[]; - - /** Table pinned. */ - public pinned: string; - - /** Table column_list_authoritative. */ - public column_list_authoritative: boolean; - - /** - * Creates a new Table instance using the specified properties. - * @param [properties] Properties to set - * @returns Table instance - */ - public static create(properties?: vschema.ITable): vschema.Table; - - /** - * Encodes the specified Table message. Does not implicitly {@link vschema.Table.verify|verify} messages. - * @param message Table message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.ITable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Table message, length delimited. Does not implicitly {@link vschema.Table.verify|verify} messages. - * @param message Table message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.ITable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Table message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Table - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Table; - - /** - * Decodes a Table message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Table - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Table; - - /** - * Verifies a Table message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Table message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Table - */ - public static fromObject(object: { [k: string]: any }): vschema.Table; - - /** - * Creates a plain object from a Table message. Also converts values to other types if specified. - * @param message Table - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Table to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ColumnVindex. */ - interface IColumnVindex { - - /** ColumnVindex column */ - column?: (string|null); - - /** ColumnVindex name */ - name?: (string|null); - - /** ColumnVindex columns */ - columns?: (string[]|null); - } - - /** Represents a ColumnVindex. */ - class ColumnVindex implements IColumnVindex { - - /** - * Constructs a new ColumnVindex. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IColumnVindex); - - /** ColumnVindex column. */ - public column: string; - - /** ColumnVindex name. */ - public name: string; - - /** ColumnVindex columns. */ - public columns: string[]; - - /** - * Creates a new ColumnVindex instance using the specified properties. - * @param [properties] Properties to set - * @returns ColumnVindex instance - */ - public static create(properties?: vschema.IColumnVindex): vschema.ColumnVindex; - - /** - * Encodes the specified ColumnVindex message. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. - * @param message ColumnVindex message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IColumnVindex, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ColumnVindex message, length delimited. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. - * @param message ColumnVindex message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IColumnVindex, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ColumnVindex message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ColumnVindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.ColumnVindex; - - /** - * Decodes a ColumnVindex message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ColumnVindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.ColumnVindex; - - /** - * Verifies a ColumnVindex message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ColumnVindex message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ColumnVindex - */ - public static fromObject(object: { [k: string]: any }): vschema.ColumnVindex; - - /** - * Creates a plain object from a ColumnVindex message. Also converts values to other types if specified. - * @param message ColumnVindex - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.ColumnVindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ColumnVindex to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AutoIncrement. */ - interface IAutoIncrement { - - /** AutoIncrement column */ - column?: (string|null); - - /** AutoIncrement sequence */ - sequence?: (string|null); - } - - /** Represents an AutoIncrement. */ - class AutoIncrement implements IAutoIncrement { - - /** - * Constructs a new AutoIncrement. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IAutoIncrement); - - /** AutoIncrement column. */ - public column: string; - - /** AutoIncrement sequence. */ - public sequence: string; - - /** - * Creates a new AutoIncrement instance using the specified properties. - * @param [properties] Properties to set - * @returns AutoIncrement instance - */ - public static create(properties?: vschema.IAutoIncrement): vschema.AutoIncrement; - - /** - * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. - * @param message AutoIncrement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. - * @param message AutoIncrement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutoIncrement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutoIncrement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.AutoIncrement; - - /** - * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutoIncrement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.AutoIncrement; - - /** - * Verifies an AutoIncrement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutoIncrement - */ - public static fromObject(object: { [k: string]: any }): vschema.AutoIncrement; - - /** - * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. - * @param message AutoIncrement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.AutoIncrement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutoIncrement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Column. */ - interface IColumn { - - /** Column name */ - name?: (string|null); - - /** Column type */ - type?: (query.Type|null); - } - - /** Represents a Column. */ - class Column implements IColumn { - - /** - * Constructs a new Column. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.IColumn); - - /** Column name. */ - public name: string; - - /** Column type. */ - public type: query.Type; - - /** - * Creates a new Column instance using the specified properties. - * @param [properties] Properties to set - * @returns Column instance - */ - public static create(properties?: vschema.IColumn): vschema.Column; - - /** - * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. - * @param message Column message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. - * @param message Column message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Column message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Column; - - /** - * Decodes a Column message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Column; - - /** - * Verifies a Column message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Column - */ - public static fromObject(object: { [k: string]: any }): vschema.Column; - - /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @param message Column - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Column to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SrvVSchema. */ - interface ISrvVSchema { - - /** SrvVSchema keyspaces */ - keyspaces?: ({ [k: string]: vschema.IKeyspace }|null); - - /** SrvVSchema routing_rules */ - routing_rules?: (vschema.IRoutingRules|null); - } - - /** Represents a SrvVSchema. */ - class SrvVSchema implements ISrvVSchema { - - /** - * Constructs a new SrvVSchema. - * @param [properties] Properties to set - */ - constructor(properties?: vschema.ISrvVSchema); - - /** SrvVSchema keyspaces. */ - public keyspaces: { [k: string]: vschema.IKeyspace }; - - /** SrvVSchema routing_rules. */ - public routing_rules?: (vschema.IRoutingRules|null); - - /** - * Creates a new SrvVSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns SrvVSchema instance - */ - public static create(properties?: vschema.ISrvVSchema): vschema.SrvVSchema; - - /** - * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. - * @param message SrvVSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. - * @param message SrvVSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SrvVSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SrvVSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.SrvVSchema; - - /** - * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SrvVSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.SrvVSchema; - - /** - * Verifies a SrvVSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SrvVSchema - */ - public static fromObject(object: { [k: string]: any }): vschema.SrvVSchema; - - /** - * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. - * @param message SrvVSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vschema.SrvVSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SrvVSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace vtctldata. */ -export namespace vtctldata { - - /** Properties of an ExecuteVtctlCommandRequest. */ - interface IExecuteVtctlCommandRequest { - - /** ExecuteVtctlCommandRequest args */ - args?: (string[]|null); - - /** ExecuteVtctlCommandRequest action_timeout */ - action_timeout?: (number|Long|null); - } - - /** Represents an ExecuteVtctlCommandRequest. */ - class ExecuteVtctlCommandRequest implements IExecuteVtctlCommandRequest { - - /** - * Constructs a new ExecuteVtctlCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IExecuteVtctlCommandRequest); - - /** ExecuteVtctlCommandRequest args. */ - public args: string[]; - - /** ExecuteVtctlCommandRequest action_timeout. */ - public action_timeout: (number|Long); - - /** - * Creates a new ExecuteVtctlCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteVtctlCommandRequest instance - */ - public static create(properties?: vtctldata.IExecuteVtctlCommandRequest): vtctldata.ExecuteVtctlCommandRequest; - - /** - * Encodes the specified ExecuteVtctlCommandRequest message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. - * @param message ExecuteVtctlCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IExecuteVtctlCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteVtctlCommandRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. - * @param message ExecuteVtctlCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IExecuteVtctlCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteVtctlCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteVtctlCommandRequest; - - /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteVtctlCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteVtctlCommandRequest; - - /** - * Verifies an ExecuteVtctlCommandRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteVtctlCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteVtctlCommandRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteVtctlCommandRequest; - - /** - * Creates a plain object from an ExecuteVtctlCommandRequest message. Also converts values to other types if specified. - * @param message ExecuteVtctlCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ExecuteVtctlCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteVtctlCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExecuteVtctlCommandResponse. */ - interface IExecuteVtctlCommandResponse { - - /** ExecuteVtctlCommandResponse event */ - event?: (logutil.IEvent|null); - } - - /** Represents an ExecuteVtctlCommandResponse. */ - class ExecuteVtctlCommandResponse implements IExecuteVtctlCommandResponse { - - /** - * Constructs a new ExecuteVtctlCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IExecuteVtctlCommandResponse); - - /** ExecuteVtctlCommandResponse event. */ - public event?: (logutil.IEvent|null); - - /** - * Creates a new ExecuteVtctlCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteVtctlCommandResponse instance - */ - public static create(properties?: vtctldata.IExecuteVtctlCommandResponse): vtctldata.ExecuteVtctlCommandResponse; - - /** - * Encodes the specified ExecuteVtctlCommandResponse message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. - * @param message ExecuteVtctlCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IExecuteVtctlCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteVtctlCommandResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. - * @param message ExecuteVtctlCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IExecuteVtctlCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteVtctlCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ExecuteVtctlCommandResponse; - - /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteVtctlCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ExecuteVtctlCommandResponse; - - /** - * Verifies an ExecuteVtctlCommandResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExecuteVtctlCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteVtctlCommandResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ExecuteVtctlCommandResponse; - - /** - * Creates a plain object from an ExecuteVtctlCommandResponse message. Also converts values to other types if specified. - * @param message ExecuteVtctlCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ExecuteVtctlCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteVtctlCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TableMaterializeSettings. */ - interface ITableMaterializeSettings { - - /** TableMaterializeSettings target_table */ - target_table?: (string|null); - - /** TableMaterializeSettings source_expression */ - source_expression?: (string|null); - - /** TableMaterializeSettings create_ddl */ - create_ddl?: (string|null); - } - - /** Represents a TableMaterializeSettings. */ - class TableMaterializeSettings implements ITableMaterializeSettings { - - /** - * Constructs a new TableMaterializeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ITableMaterializeSettings); - - /** TableMaterializeSettings target_table. */ - public target_table: string; - - /** TableMaterializeSettings source_expression. */ - public source_expression: string; - - /** TableMaterializeSettings create_ddl. */ - public create_ddl: string; - - /** - * Creates a new TableMaterializeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns TableMaterializeSettings instance - */ - public static create(properties?: vtctldata.ITableMaterializeSettings): vtctldata.TableMaterializeSettings; - - /** - * Encodes the specified TableMaterializeSettings message. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. - * @param message TableMaterializeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ITableMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableMaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. - * @param message TableMaterializeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ITableMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableMaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TableMaterializeSettings; - - /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableMaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TableMaterializeSettings; - - /** - * Verifies a TableMaterializeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TableMaterializeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableMaterializeSettings - */ - public static fromObject(object: { [k: string]: any }): vtctldata.TableMaterializeSettings; - - /** - * Creates a plain object from a TableMaterializeSettings message. Also converts values to other types if specified. - * @param message TableMaterializeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.TableMaterializeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableMaterializeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MaterializeSettings. */ - interface IMaterializeSettings { - - /** MaterializeSettings workflow */ - workflow?: (string|null); - - /** MaterializeSettings source_keyspace */ - source_keyspace?: (string|null); - - /** MaterializeSettings target_keyspace */ - target_keyspace?: (string|null); - - /** MaterializeSettings stop_after_copy */ - stop_after_copy?: (boolean|null); - - /** MaterializeSettings table_settings */ - table_settings?: (vtctldata.ITableMaterializeSettings[]|null); - - /** MaterializeSettings cell */ - cell?: (string|null); - - /** MaterializeSettings tablet_types */ - tablet_types?: (string|null); - - /** MaterializeSettings external_cluster */ - external_cluster?: (string|null); - } - - /** Represents a MaterializeSettings. */ - class MaterializeSettings implements IMaterializeSettings { - - /** - * Constructs a new MaterializeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IMaterializeSettings); - - /** MaterializeSettings workflow. */ - public workflow: string; - - /** MaterializeSettings source_keyspace. */ - public source_keyspace: string; - - /** MaterializeSettings target_keyspace. */ - public target_keyspace: string; - - /** MaterializeSettings stop_after_copy. */ - public stop_after_copy: boolean; - - /** MaterializeSettings table_settings. */ - public table_settings: vtctldata.ITableMaterializeSettings[]; - - /** MaterializeSettings cell. */ - public cell: string; - - /** MaterializeSettings tablet_types. */ - public tablet_types: string; - - /** MaterializeSettings external_cluster. */ - public external_cluster: string; - - /** - * Creates a new MaterializeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MaterializeSettings instance - */ - public static create(properties?: vtctldata.IMaterializeSettings): vtctldata.MaterializeSettings; - - /** - * Encodes the specified MaterializeSettings message. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. - * @param message MaterializeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. - * @param message MaterializeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IMaterializeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaterializeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.MaterializeSettings; - - /** - * Decodes a MaterializeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.MaterializeSettings; - - /** - * Verifies a MaterializeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaterializeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaterializeSettings - */ - public static fromObject(object: { [k: string]: any }): vtctldata.MaterializeSettings; - - /** - * Creates a plain object from a MaterializeSettings message. Also converts values to other types if specified. - * @param message MaterializeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.MaterializeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaterializeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Keyspace. */ - interface IKeyspace { - - /** Keyspace name */ - name?: (string|null); - - /** Keyspace keyspace */ - keyspace?: (topodata.IKeyspace|null); - } - - /** Represents a Keyspace. */ - class Keyspace implements IKeyspace { - - /** - * Constructs a new Keyspace. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IKeyspace); - - /** Keyspace name. */ - public name: string; - - /** Keyspace keyspace. */ - public keyspace?: (topodata.IKeyspace|null); - - /** - * Creates a new Keyspace instance using the specified properties. - * @param [properties] Properties to set - * @returns Keyspace instance - */ - public static create(properties?: vtctldata.IKeyspace): vtctldata.Keyspace; - - /** - * Encodes the specified Keyspace message. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Keyspace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Keyspace; - - /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Keyspace; - - /** - * Verifies a Keyspace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Keyspace - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Keyspace; - - /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @param message Keyspace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Keyspace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Shard. */ - interface IShard { - - /** Shard keyspace */ - keyspace?: (string|null); - - /** Shard name */ - name?: (string|null); - - /** Shard shard */ - shard?: (topodata.IShard|null); - } - - /** Represents a Shard. */ - class Shard implements IShard { - - /** - * Constructs a new Shard. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IShard); - - /** Shard keyspace. */ - public keyspace: string; - - /** Shard name. */ - public name: string; - - /** Shard shard. */ - public shard?: (topodata.IShard|null); - - /** - * Creates a new Shard instance using the specified properties. - * @param [properties] Properties to set - * @returns Shard instance - */ - public static create(properties?: vtctldata.IShard): vtctldata.Shard; - - /** - * Encodes the specified Shard message. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Shard message, length delimited. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Shard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Shard; - - /** - * Decodes a Shard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Shard; - - /** - * Verifies a Shard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Shard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Shard - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Shard; - - /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. - * @param message Shard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Shard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Shard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Workflow. */ - interface IWorkflow { - - /** Workflow name */ - name?: (string|null); - - /** Workflow source */ - source?: (vtctldata.Workflow.IReplicationLocation|null); - - /** Workflow target */ - target?: (vtctldata.Workflow.IReplicationLocation|null); - - /** Workflow max_v_replication_lag */ - max_v_replication_lag?: (number|Long|null); - - /** Workflow shard_streams */ - shard_streams?: ({ [k: string]: vtctldata.Workflow.IShardStream }|null); - } - - /** Represents a Workflow. */ - class Workflow implements IWorkflow { - - /** - * Constructs a new Workflow. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IWorkflow); - - /** Workflow name. */ - public name: string; - - /** Workflow source. */ - public source?: (vtctldata.Workflow.IReplicationLocation|null); - - /** Workflow target. */ - public target?: (vtctldata.Workflow.IReplicationLocation|null); - - /** Workflow max_v_replication_lag. */ - public max_v_replication_lag: (number|Long); - - /** Workflow shard_streams. */ - public shard_streams: { [k: string]: vtctldata.Workflow.IShardStream }; - - /** - * Creates a new Workflow instance using the specified properties. - * @param [properties] Properties to set - * @returns Workflow instance - */ - public static create(properties?: vtctldata.IWorkflow): vtctldata.Workflow; - - /** - * Encodes the specified Workflow message. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. - * @param message Workflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Workflow message, length delimited. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. - * @param message Workflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Workflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Workflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow; - - /** - * Decodes a Workflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Workflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow; - - /** - * Verifies a Workflow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Workflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Workflow - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow; - - /** - * Creates a plain object from a Workflow message. Also converts values to other types if specified. - * @param message Workflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Workflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Workflow { - - /** Properties of a ReplicationLocation. */ - interface IReplicationLocation { - - /** ReplicationLocation keyspace */ - keyspace?: (string|null); - - /** ReplicationLocation shards */ - shards?: (string[]|null); - } - - /** Represents a ReplicationLocation. */ - class ReplicationLocation implements IReplicationLocation { - - /** - * Constructs a new ReplicationLocation. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.IReplicationLocation); - - /** ReplicationLocation keyspace. */ - public keyspace: string; - - /** ReplicationLocation shards. */ - public shards: string[]; - - /** - * Creates a new ReplicationLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplicationLocation instance - */ - public static create(properties?: vtctldata.Workflow.IReplicationLocation): vtctldata.Workflow.ReplicationLocation; - - /** - * Encodes the specified ReplicationLocation message. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @param message ReplicationLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.IReplicationLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplicationLocation message, length delimited. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @param message ReplicationLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.IReplicationLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplicationLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.ReplicationLocation; - - /** - * Decodes a ReplicationLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.ReplicationLocation; - - /** - * Verifies a ReplicationLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplicationLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplicationLocation - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.ReplicationLocation; - - /** - * Creates a plain object from a ReplicationLocation message. Also converts values to other types if specified. - * @param message ReplicationLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.ReplicationLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplicationLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ShardStream. */ - interface IShardStream { - - /** ShardStream streams */ - streams?: (vtctldata.Workflow.IStream[]|null); - - /** ShardStream tablet_controls */ - tablet_controls?: (topodata.Shard.ITabletControl[]|null); - - /** ShardStream is_primary_serving */ - is_primary_serving?: (boolean|null); - } - - /** Represents a ShardStream. */ - class ShardStream implements IShardStream { - - /** - * Constructs a new ShardStream. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.IShardStream); - - /** ShardStream streams. */ - public streams: vtctldata.Workflow.IStream[]; - - /** ShardStream tablet_controls. */ - public tablet_controls: topodata.Shard.ITabletControl[]; - - /** ShardStream is_primary_serving. */ - public is_primary_serving: boolean; - - /** - * Creates a new ShardStream instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardStream instance - */ - public static create(properties?: vtctldata.Workflow.IShardStream): vtctldata.Workflow.ShardStream; - - /** - * Encodes the specified ShardStream message. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @param message ShardStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.IShardStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardStream message, length delimited. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @param message ShardStream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.IShardStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardStream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.ShardStream; - - /** - * Decodes a ShardStream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.ShardStream; - - /** - * Verifies a ShardStream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardStream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardStream - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.ShardStream; - - /** - * Creates a plain object from a ShardStream message. Also converts values to other types if specified. - * @param message ShardStream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.ShardStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardStream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Stream. */ - interface IStream { - - /** Stream id */ - id?: (number|Long|null); - - /** Stream shard */ - shard?: (string|null); - - /** Stream tablet */ - tablet?: (topodata.ITabletAlias|null); - - /** Stream binlog_source */ - binlog_source?: (binlogdata.IBinlogSource|null); - - /** Stream position */ - position?: (string|null); - - /** Stream stop_position */ - stop_position?: (string|null); - - /** Stream state */ - state?: (string|null); - - /** Stream db_name */ - db_name?: (string|null); - - /** Stream transaction_timestamp */ - transaction_timestamp?: (vttime.ITime|null); - - /** Stream time_updated */ - time_updated?: (vttime.ITime|null); - - /** Stream message */ - message?: (string|null); - - /** Stream copy_states */ - copy_states?: (vtctldata.Workflow.Stream.ICopyState[]|null); - } - - /** Represents a Stream. */ - class Stream implements IStream { - - /** - * Constructs a new Stream. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.IStream); - - /** Stream id. */ - public id: (number|Long); - - /** Stream shard. */ - public shard: string; - - /** Stream tablet. */ - public tablet?: (topodata.ITabletAlias|null); - - /** Stream binlog_source. */ - public binlog_source?: (binlogdata.IBinlogSource|null); - - /** Stream position. */ - public position: string; - - /** Stream stop_position. */ - public stop_position: string; - - /** Stream state. */ - public state: string; - - /** Stream db_name. */ - public db_name: string; - - /** Stream transaction_timestamp. */ - public transaction_timestamp?: (vttime.ITime|null); - - /** Stream time_updated. */ - public time_updated?: (vttime.ITime|null); - - /** Stream message. */ - public message: string; - - /** Stream copy_states. */ - public copy_states: vtctldata.Workflow.Stream.ICopyState[]; - - /** - * Creates a new Stream instance using the specified properties. - * @param [properties] Properties to set - * @returns Stream instance - */ - public static create(properties?: vtctldata.Workflow.IStream): vtctldata.Workflow.Stream; - - /** - * Encodes the specified Stream message. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream; - - /** - * Verifies a Stream message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Stream - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @param message Stream - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Stream to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Stream { - - /** Properties of a CopyState. */ - interface ICopyState { - - /** CopyState table */ - table?: (string|null); - - /** CopyState last_pk */ - last_pk?: (string|null); - } - - /** Represents a CopyState. */ - class CopyState implements ICopyState { - - /** - * Constructs a new CopyState. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.Workflow.Stream.ICopyState); - - /** CopyState table. */ - public table: string; - - /** CopyState last_pk. */ - public last_pk: string; - - /** - * Creates a new CopyState instance using the specified properties. - * @param [properties] Properties to set - * @returns CopyState instance - */ - public static create(properties?: vtctldata.Workflow.Stream.ICopyState): vtctldata.Workflow.Stream.CopyState; - - /** - * Encodes the specified CopyState message. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @param message CopyState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.Workflow.Stream.ICopyState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CopyState message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @param message CopyState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.Workflow.Stream.ICopyState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CopyState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.Workflow.Stream.CopyState; - - /** - * Decodes a CopyState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.Workflow.Stream.CopyState; - - /** - * Verifies a CopyState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CopyState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CopyState - */ - public static fromObject(object: { [k: string]: any }): vtctldata.Workflow.Stream.CopyState; - - /** - * Creates a plain object from a CopyState message. Also converts values to other types if specified. - * @param message CopyState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.Workflow.Stream.CopyState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CopyState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Properties of a ChangeTabletTypeRequest. */ - interface IChangeTabletTypeRequest { - - /** ChangeTabletTypeRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - - /** ChangeTabletTypeRequest db_type */ - db_type?: (topodata.TabletType|null); - - /** ChangeTabletTypeRequest dry_run */ - dry_run?: (boolean|null); - } - - /** Represents a ChangeTabletTypeRequest. */ - class ChangeTabletTypeRequest implements IChangeTabletTypeRequest { - - /** - * Constructs a new ChangeTabletTypeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IChangeTabletTypeRequest); - - /** ChangeTabletTypeRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** ChangeTabletTypeRequest db_type. */ - public db_type: topodata.TabletType; - - /** ChangeTabletTypeRequest dry_run. */ - public dry_run: boolean; - - /** - * Creates a new ChangeTabletTypeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ChangeTabletTypeRequest instance - */ - public static create(properties?: vtctldata.IChangeTabletTypeRequest): vtctldata.ChangeTabletTypeRequest; - - /** - * Encodes the specified ChangeTabletTypeRequest message. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. - * @param message ChangeTabletTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IChangeTabletTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChangeTabletTypeRequest message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. - * @param message ChangeTabletTypeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IChangeTabletTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChangeTabletTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ChangeTabletTypeRequest; - - /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChangeTabletTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ChangeTabletTypeRequest; - - /** - * Verifies a ChangeTabletTypeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ChangeTabletTypeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChangeTabletTypeRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ChangeTabletTypeRequest; - - /** - * Creates a plain object from a ChangeTabletTypeRequest message. Also converts values to other types if specified. - * @param message ChangeTabletTypeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ChangeTabletTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChangeTabletTypeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ChangeTabletTypeResponse. */ - interface IChangeTabletTypeResponse { - - /** ChangeTabletTypeResponse before_tablet */ - before_tablet?: (topodata.ITablet|null); - - /** ChangeTabletTypeResponse after_tablet */ - after_tablet?: (topodata.ITablet|null); - - /** ChangeTabletTypeResponse was_dry_run */ - was_dry_run?: (boolean|null); - } - - /** Represents a ChangeTabletTypeResponse. */ - class ChangeTabletTypeResponse implements IChangeTabletTypeResponse { - - /** - * Constructs a new ChangeTabletTypeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IChangeTabletTypeResponse); - - /** ChangeTabletTypeResponse before_tablet. */ - public before_tablet?: (topodata.ITablet|null); - - /** ChangeTabletTypeResponse after_tablet. */ - public after_tablet?: (topodata.ITablet|null); - - /** ChangeTabletTypeResponse was_dry_run. */ - public was_dry_run: boolean; - - /** - * Creates a new ChangeTabletTypeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ChangeTabletTypeResponse instance - */ - public static create(properties?: vtctldata.IChangeTabletTypeResponse): vtctldata.ChangeTabletTypeResponse; - - /** - * Encodes the specified ChangeTabletTypeResponse message. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. - * @param message ChangeTabletTypeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IChangeTabletTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChangeTabletTypeResponse message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. - * @param message ChangeTabletTypeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IChangeTabletTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChangeTabletTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ChangeTabletTypeResponse; - - /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChangeTabletTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ChangeTabletTypeResponse; - - /** - * Verifies a ChangeTabletTypeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ChangeTabletTypeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChangeTabletTypeResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ChangeTabletTypeResponse; - - /** - * Creates a plain object from a ChangeTabletTypeResponse message. Also converts values to other types if specified. - * @param message ChangeTabletTypeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ChangeTabletTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChangeTabletTypeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateKeyspaceRequest. */ - interface ICreateKeyspaceRequest { - - /** CreateKeyspaceRequest name */ - name?: (string|null); - - /** CreateKeyspaceRequest force */ - force?: (boolean|null); - - /** CreateKeyspaceRequest allow_empty_v_schema */ - allow_empty_v_schema?: (boolean|null); - - /** CreateKeyspaceRequest sharding_column_name */ - sharding_column_name?: (string|null); - - /** CreateKeyspaceRequest sharding_column_type */ - sharding_column_type?: (topodata.KeyspaceIdType|null); - - /** CreateKeyspaceRequest served_froms */ - served_froms?: (topodata.Keyspace.IServedFrom[]|null); - - /** CreateKeyspaceRequest type */ - type?: (topodata.KeyspaceType|null); - - /** CreateKeyspaceRequest base_keyspace */ - base_keyspace?: (string|null); - - /** CreateKeyspaceRequest snapshot_time */ - snapshot_time?: (vttime.ITime|null); - } - - /** Represents a CreateKeyspaceRequest. */ - class CreateKeyspaceRequest implements ICreateKeyspaceRequest { - - /** - * Constructs a new CreateKeyspaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ICreateKeyspaceRequest); - - /** CreateKeyspaceRequest name. */ - public name: string; - - /** CreateKeyspaceRequest force. */ - public force: boolean; - - /** CreateKeyspaceRequest allow_empty_v_schema. */ - public allow_empty_v_schema: boolean; - - /** CreateKeyspaceRequest sharding_column_name. */ - public sharding_column_name: string; - - /** CreateKeyspaceRequest sharding_column_type. */ - public sharding_column_type: topodata.KeyspaceIdType; - - /** CreateKeyspaceRequest served_froms. */ - public served_froms: topodata.Keyspace.IServedFrom[]; - - /** CreateKeyspaceRequest type. */ - public type: topodata.KeyspaceType; - - /** CreateKeyspaceRequest base_keyspace. */ - public base_keyspace: string; - - /** CreateKeyspaceRequest snapshot_time. */ - public snapshot_time?: (vttime.ITime|null); - - /** - * Creates a new CreateKeyspaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateKeyspaceRequest instance - */ - public static create(properties?: vtctldata.ICreateKeyspaceRequest): vtctldata.CreateKeyspaceRequest; - - /** - * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. - * @param message CreateKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ICreateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. - * @param message CreateKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ICreateKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateKeyspaceRequest; - - /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateKeyspaceRequest; - - /** - * Verifies a CreateKeyspaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateKeyspaceRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateKeyspaceRequest; - - /** - * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. - * @param message CreateKeyspaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.CreateKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateKeyspaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateKeyspaceResponse. */ - interface ICreateKeyspaceResponse { - - /** CreateKeyspaceResponse keyspace */ - keyspace?: (vtctldata.IKeyspace|null); - } - - /** Represents a CreateKeyspaceResponse. */ - class CreateKeyspaceResponse implements ICreateKeyspaceResponse { - - /** - * Constructs a new CreateKeyspaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ICreateKeyspaceResponse); - - /** CreateKeyspaceResponse keyspace. */ - public keyspace?: (vtctldata.IKeyspace|null); - - /** - * Creates a new CreateKeyspaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateKeyspaceResponse instance - */ - public static create(properties?: vtctldata.ICreateKeyspaceResponse): vtctldata.CreateKeyspaceResponse; - - /** - * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. - * @param message CreateKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ICreateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. - * @param message CreateKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ICreateKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateKeyspaceResponse; - - /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateKeyspaceResponse; - - /** - * Verifies a CreateKeyspaceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateKeyspaceResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateKeyspaceResponse; - - /** - * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. - * @param message CreateKeyspaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.CreateKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateKeyspaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateShardRequest. */ - interface ICreateShardRequest { - - /** CreateShardRequest keyspace */ - keyspace?: (string|null); - - /** CreateShardRequest shard_name */ - shard_name?: (string|null); - - /** CreateShardRequest force */ - force?: (boolean|null); - - /** CreateShardRequest include_parent */ - include_parent?: (boolean|null); - } - - /** Represents a CreateShardRequest. */ - class CreateShardRequest implements ICreateShardRequest { - - /** - * Constructs a new CreateShardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ICreateShardRequest); - - /** CreateShardRequest keyspace. */ - public keyspace: string; - - /** CreateShardRequest shard_name. */ - public shard_name: string; - - /** CreateShardRequest force. */ - public force: boolean; - - /** CreateShardRequest include_parent. */ - public include_parent: boolean; - - /** - * Creates a new CreateShardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShardRequest instance - */ - public static create(properties?: vtctldata.ICreateShardRequest): vtctldata.CreateShardRequest; - - /** - * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. - * @param message CreateShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ICreateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. - * @param message CreateShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ICreateShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateShardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateShardRequest; - - /** - * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateShardRequest; - - /** - * Verifies a CreateShardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShardRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateShardRequest; - - /** - * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. - * @param message CreateShardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.CreateShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateShardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CreateShardResponse. */ - interface ICreateShardResponse { - - /** CreateShardResponse keyspace */ - keyspace?: (vtctldata.IKeyspace|null); - - /** CreateShardResponse shard */ - shard?: (vtctldata.IShard|null); - - /** CreateShardResponse shard_already_exists */ - shard_already_exists?: (boolean|null); - } - - /** Represents a CreateShardResponse. */ - class CreateShardResponse implements ICreateShardResponse { - - /** - * Constructs a new CreateShardResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ICreateShardResponse); - - /** CreateShardResponse keyspace. */ - public keyspace?: (vtctldata.IKeyspace|null); - - /** CreateShardResponse shard. */ - public shard?: (vtctldata.IShard|null); - - /** CreateShardResponse shard_already_exists. */ - public shard_already_exists: boolean; - - /** - * Creates a new CreateShardResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShardResponse instance - */ - public static create(properties?: vtctldata.ICreateShardResponse): vtctldata.CreateShardResponse; - - /** - * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. - * @param message CreateShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ICreateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. - * @param message CreateShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ICreateShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateShardResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.CreateShardResponse; - - /** - * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.CreateShardResponse; - - /** - * Verifies a CreateShardResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShardResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.CreateShardResponse; - - /** - * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. - * @param message CreateShardResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.CreateShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateShardResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteKeyspaceRequest. */ - interface IDeleteKeyspaceRequest { - - /** DeleteKeyspaceRequest keyspace */ - keyspace?: (string|null); - - /** DeleteKeyspaceRequest recursive */ - recursive?: (boolean|null); - } - - /** Represents a DeleteKeyspaceRequest. */ - class DeleteKeyspaceRequest implements IDeleteKeyspaceRequest { - - /** - * Constructs a new DeleteKeyspaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteKeyspaceRequest); - - /** DeleteKeyspaceRequest keyspace. */ - public keyspace: string; - - /** DeleteKeyspaceRequest recursive. */ - public recursive: boolean; - - /** - * Creates a new DeleteKeyspaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteKeyspaceRequest instance - */ - public static create(properties?: vtctldata.IDeleteKeyspaceRequest): vtctldata.DeleteKeyspaceRequest; - - /** - * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @param message DeleteKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @param message DeleteKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteKeyspaceRequest; - - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteKeyspaceRequest; - - /** - * Verifies a DeleteKeyspaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteKeyspaceRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteKeyspaceRequest; - - /** - * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. - * @param message DeleteKeyspaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteKeyspaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteKeyspaceResponse. */ - interface IDeleteKeyspaceResponse { - } - - /** Represents a DeleteKeyspaceResponse. */ - class DeleteKeyspaceResponse implements IDeleteKeyspaceResponse { - - /** - * Constructs a new DeleteKeyspaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteKeyspaceResponse); - - /** - * Creates a new DeleteKeyspaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteKeyspaceResponse instance - */ - public static create(properties?: vtctldata.IDeleteKeyspaceResponse): vtctldata.DeleteKeyspaceResponse; - - /** - * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @param message DeleteKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @param message DeleteKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteKeyspaceResponse; - - /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteKeyspaceResponse; - - /** - * Verifies a DeleteKeyspaceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteKeyspaceResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteKeyspaceResponse; - - /** - * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. - * @param message DeleteKeyspaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteKeyspaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteShardsRequest. */ - interface IDeleteShardsRequest { - - /** DeleteShardsRequest shards */ - shards?: (vtctldata.IShard[]|null); - - /** DeleteShardsRequest recursive */ - recursive?: (boolean|null); - - /** DeleteShardsRequest even_if_serving */ - even_if_serving?: (boolean|null); - } - - /** Represents a DeleteShardsRequest. */ - class DeleteShardsRequest implements IDeleteShardsRequest { - - /** - * Constructs a new DeleteShardsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteShardsRequest); - - /** DeleteShardsRequest shards. */ - public shards: vtctldata.IShard[]; - - /** DeleteShardsRequest recursive. */ - public recursive: boolean; - - /** DeleteShardsRequest even_if_serving. */ - public even_if_serving: boolean; - - /** - * Creates a new DeleteShardsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteShardsRequest instance - */ - public static create(properties?: vtctldata.IDeleteShardsRequest): vtctldata.DeleteShardsRequest; - - /** - * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @param message DeleteShardsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteShardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @param message DeleteShardsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteShardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteShardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteShardsRequest; - - /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteShardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteShardsRequest; - - /** - * Verifies a DeleteShardsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteShardsRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteShardsRequest; - - /** - * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. - * @param message DeleteShardsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteShardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteShardsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteShardsResponse. */ - interface IDeleteShardsResponse { - } - - /** Represents a DeleteShardsResponse. */ - class DeleteShardsResponse implements IDeleteShardsResponse { - - /** - * Constructs a new DeleteShardsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteShardsResponse); - - /** - * Creates a new DeleteShardsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteShardsResponse instance - */ - public static create(properties?: vtctldata.IDeleteShardsResponse): vtctldata.DeleteShardsResponse; - - /** - * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @param message DeleteShardsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteShardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @param message DeleteShardsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteShardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteShardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteShardsResponse; - - /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteShardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteShardsResponse; - - /** - * Verifies a DeleteShardsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteShardsResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteShardsResponse; - - /** - * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. - * @param message DeleteShardsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteShardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteShardsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteTabletsRequest. */ - interface IDeleteTabletsRequest { - - /** DeleteTabletsRequest tablet_aliases */ - tablet_aliases?: (topodata.ITabletAlias[]|null); - - /** DeleteTabletsRequest allow_primary */ - allow_primary?: (boolean|null); - } - - /** Represents a DeleteTabletsRequest. */ - class DeleteTabletsRequest implements IDeleteTabletsRequest { - - /** - * Constructs a new DeleteTabletsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteTabletsRequest); - - /** DeleteTabletsRequest tablet_aliases. */ - public tablet_aliases: topodata.ITabletAlias[]; - - /** DeleteTabletsRequest allow_primary. */ - public allow_primary: boolean; - - /** - * Creates a new DeleteTabletsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTabletsRequest instance - */ - public static create(properties?: vtctldata.IDeleteTabletsRequest): vtctldata.DeleteTabletsRequest; - - /** - * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. - * @param message DeleteTabletsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. - * @param message DeleteTabletsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteTabletsRequest; - - /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteTabletsRequest; - - /** - * Verifies a DeleteTabletsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTabletsRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteTabletsRequest; - - /** - * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. - * @param message DeleteTabletsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTabletsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteTabletsResponse. */ - interface IDeleteTabletsResponse { - } - - /** Represents a DeleteTabletsResponse. */ - class DeleteTabletsResponse implements IDeleteTabletsResponse { - - /** - * Constructs a new DeleteTabletsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IDeleteTabletsResponse); - - /** - * Creates a new DeleteTabletsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTabletsResponse instance - */ - public static create(properties?: vtctldata.IDeleteTabletsResponse): vtctldata.DeleteTabletsResponse; - - /** - * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. - * @param message DeleteTabletsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IDeleteTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. - * @param message DeleteTabletsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IDeleteTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.DeleteTabletsResponse; - - /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.DeleteTabletsResponse; - - /** - * Verifies a DeleteTabletsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTabletsResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.DeleteTabletsResponse; - - /** - * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. - * @param message DeleteTabletsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.DeleteTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTabletsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EmergencyReparentShardRequest. */ - interface IEmergencyReparentShardRequest { - - /** EmergencyReparentShardRequest keyspace */ - keyspace?: (string|null); - - /** EmergencyReparentShardRequest shard */ - shard?: (string|null); - - /** EmergencyReparentShardRequest new_primary */ - new_primary?: (topodata.ITabletAlias|null); - - /** EmergencyReparentShardRequest ignore_replicas */ - ignore_replicas?: (topodata.ITabletAlias[]|null); - - /** EmergencyReparentShardRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); - } - - /** Represents an EmergencyReparentShardRequest. */ - class EmergencyReparentShardRequest implements IEmergencyReparentShardRequest { - - /** - * Constructs a new EmergencyReparentShardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IEmergencyReparentShardRequest); - - /** EmergencyReparentShardRequest keyspace. */ - public keyspace: string; - - /** EmergencyReparentShardRequest shard. */ - public shard: string; - - /** EmergencyReparentShardRequest new_primary. */ - public new_primary?: (topodata.ITabletAlias|null); - - /** EmergencyReparentShardRequest ignore_replicas. */ - public ignore_replicas: topodata.ITabletAlias[]; - - /** EmergencyReparentShardRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); - - /** - * Creates a new EmergencyReparentShardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EmergencyReparentShardRequest instance - */ - public static create(properties?: vtctldata.IEmergencyReparentShardRequest): vtctldata.EmergencyReparentShardRequest; - - /** - * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. - * @param message EmergencyReparentShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IEmergencyReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. - * @param message EmergencyReparentShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IEmergencyReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EmergencyReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.EmergencyReparentShardRequest; - - /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EmergencyReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.EmergencyReparentShardRequest; - - /** - * Verifies an EmergencyReparentShardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EmergencyReparentShardRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.EmergencyReparentShardRequest; - - /** - * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. - * @param message EmergencyReparentShardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.EmergencyReparentShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EmergencyReparentShardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EmergencyReparentShardResponse. */ - interface IEmergencyReparentShardResponse { - - /** EmergencyReparentShardResponse keyspace */ - keyspace?: (string|null); - - /** EmergencyReparentShardResponse shard */ - shard?: (string|null); - - /** EmergencyReparentShardResponse promoted_primary */ - promoted_primary?: (topodata.ITabletAlias|null); - - /** EmergencyReparentShardResponse events */ - events?: (logutil.IEvent[]|null); - } - - /** Represents an EmergencyReparentShardResponse. */ - class EmergencyReparentShardResponse implements IEmergencyReparentShardResponse { - - /** - * Constructs a new EmergencyReparentShardResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IEmergencyReparentShardResponse); - - /** EmergencyReparentShardResponse keyspace. */ - public keyspace: string; - - /** EmergencyReparentShardResponse shard. */ - public shard: string; - - /** EmergencyReparentShardResponse promoted_primary. */ - public promoted_primary?: (topodata.ITabletAlias|null); - - /** EmergencyReparentShardResponse events. */ - public events: logutil.IEvent[]; - - /** - * Creates a new EmergencyReparentShardResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns EmergencyReparentShardResponse instance - */ - public static create(properties?: vtctldata.IEmergencyReparentShardResponse): vtctldata.EmergencyReparentShardResponse; - - /** - * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. - * @param message EmergencyReparentShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IEmergencyReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. - * @param message EmergencyReparentShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IEmergencyReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EmergencyReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.EmergencyReparentShardResponse; - - /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EmergencyReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.EmergencyReparentShardResponse; - - /** - * Verifies an EmergencyReparentShardResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EmergencyReparentShardResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.EmergencyReparentShardResponse; - - /** - * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. - * @param message EmergencyReparentShardResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.EmergencyReparentShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EmergencyReparentShardResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FindAllShardsInKeyspaceRequest. */ - interface IFindAllShardsInKeyspaceRequest { - - /** FindAllShardsInKeyspaceRequest keyspace */ - keyspace?: (string|null); - } - - /** Represents a FindAllShardsInKeyspaceRequest. */ - class FindAllShardsInKeyspaceRequest implements IFindAllShardsInKeyspaceRequest { - - /** - * Constructs a new FindAllShardsInKeyspaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IFindAllShardsInKeyspaceRequest); - - /** FindAllShardsInKeyspaceRequest keyspace. */ - public keyspace: string; - - /** - * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FindAllShardsInKeyspaceRequest instance - */ - public static create(properties?: vtctldata.IFindAllShardsInKeyspaceRequest): vtctldata.FindAllShardsInKeyspaceRequest; - - /** - * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. - * @param message FindAllShardsInKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IFindAllShardsInKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. - * @param message FindAllShardsInKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IFindAllShardsInKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FindAllShardsInKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.FindAllShardsInKeyspaceRequest; - - /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FindAllShardsInKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.FindAllShardsInKeyspaceRequest; - - /** - * Verifies a FindAllShardsInKeyspaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FindAllShardsInKeyspaceRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.FindAllShardsInKeyspaceRequest; - - /** - * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. - * @param message FindAllShardsInKeyspaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.FindAllShardsInKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FindAllShardsInKeyspaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FindAllShardsInKeyspaceResponse. */ - interface IFindAllShardsInKeyspaceResponse { - - /** FindAllShardsInKeyspaceResponse shards */ - shards?: ({ [k: string]: vtctldata.IShard }|null); - } - - /** Represents a FindAllShardsInKeyspaceResponse. */ - class FindAllShardsInKeyspaceResponse implements IFindAllShardsInKeyspaceResponse { - - /** - * Constructs a new FindAllShardsInKeyspaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IFindAllShardsInKeyspaceResponse); - - /** FindAllShardsInKeyspaceResponse shards. */ - public shards: { [k: string]: vtctldata.IShard }; - - /** - * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FindAllShardsInKeyspaceResponse instance - */ - public static create(properties?: vtctldata.IFindAllShardsInKeyspaceResponse): vtctldata.FindAllShardsInKeyspaceResponse; - - /** - * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. - * @param message FindAllShardsInKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IFindAllShardsInKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. - * @param message FindAllShardsInKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IFindAllShardsInKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FindAllShardsInKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.FindAllShardsInKeyspaceResponse; - - /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FindAllShardsInKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.FindAllShardsInKeyspaceResponse; - - /** - * Verifies a FindAllShardsInKeyspaceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FindAllShardsInKeyspaceResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.FindAllShardsInKeyspaceResponse; - - /** - * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. - * @param message FindAllShardsInKeyspaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.FindAllShardsInKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FindAllShardsInKeyspaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetBackupsRequest. */ - interface IGetBackupsRequest { - - /** GetBackupsRequest keyspace */ - keyspace?: (string|null); - - /** GetBackupsRequest shard */ - shard?: (string|null); - } - - /** Represents a GetBackupsRequest. */ - class GetBackupsRequest implements IGetBackupsRequest { - - /** - * Constructs a new GetBackupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetBackupsRequest); - - /** GetBackupsRequest keyspace. */ - public keyspace: string; - - /** GetBackupsRequest shard. */ - public shard: string; - - /** - * Creates a new GetBackupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupsRequest instance - */ - public static create(properties?: vtctldata.IGetBackupsRequest): vtctldata.GetBackupsRequest; - - /** - * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. - * @param message GetBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. - * @param message GetBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetBackupsRequest; - - /** - * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetBackupsRequest; - - /** - * Verifies a GetBackupsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupsRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetBackupsRequest; - - /** - * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. - * @param message GetBackupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetBackupsResponse. */ - interface IGetBackupsResponse { - - /** GetBackupsResponse backups */ - backups?: (mysqlctl.IBackupInfo[]|null); - } - - /** Represents a GetBackupsResponse. */ - class GetBackupsResponse implements IGetBackupsResponse { - - /** - * Constructs a new GetBackupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetBackupsResponse); - - /** GetBackupsResponse backups. */ - public backups: mysqlctl.IBackupInfo[]; - - /** - * Creates a new GetBackupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupsResponse instance - */ - public static create(properties?: vtctldata.IGetBackupsResponse): vtctldata.GetBackupsResponse; - - /** - * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. - * @param message GetBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. - * @param message GetBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetBackupsResponse; - - /** - * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetBackupsResponse; - - /** - * Verifies a GetBackupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupsResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetBackupsResponse; - - /** - * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. - * @param message GetBackupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCellInfoNamesRequest. */ - interface IGetCellInfoNamesRequest { - } - - /** Represents a GetCellInfoNamesRequest. */ - class GetCellInfoNamesRequest implements IGetCellInfoNamesRequest { - - /** - * Constructs a new GetCellInfoNamesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetCellInfoNamesRequest); - - /** - * Creates a new GetCellInfoNamesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCellInfoNamesRequest instance - */ - public static create(properties?: vtctldata.IGetCellInfoNamesRequest): vtctldata.GetCellInfoNamesRequest; - - /** - * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. - * @param message GetCellInfoNamesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetCellInfoNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. - * @param message GetCellInfoNamesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetCellInfoNamesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCellInfoNamesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoNamesRequest; - - /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCellInfoNamesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoNamesRequest; - - /** - * Verifies a GetCellInfoNamesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCellInfoNamesRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoNamesRequest; - - /** - * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. - * @param message GetCellInfoNamesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetCellInfoNamesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCellInfoNamesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCellInfoNamesResponse. */ - interface IGetCellInfoNamesResponse { - - /** GetCellInfoNamesResponse names */ - names?: (string[]|null); - } - - /** Represents a GetCellInfoNamesResponse. */ - class GetCellInfoNamesResponse implements IGetCellInfoNamesResponse { - - /** - * Constructs a new GetCellInfoNamesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetCellInfoNamesResponse); - - /** GetCellInfoNamesResponse names. */ - public names: string[]; - - /** - * Creates a new GetCellInfoNamesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCellInfoNamesResponse instance - */ - public static create(properties?: vtctldata.IGetCellInfoNamesResponse): vtctldata.GetCellInfoNamesResponse; - - /** - * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. - * @param message GetCellInfoNamesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetCellInfoNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. - * @param message GetCellInfoNamesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetCellInfoNamesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCellInfoNamesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoNamesResponse; - - /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCellInfoNamesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoNamesResponse; - - /** - * Verifies a GetCellInfoNamesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCellInfoNamesResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoNamesResponse; - - /** - * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. - * @param message GetCellInfoNamesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetCellInfoNamesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCellInfoNamesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCellInfoRequest. */ - interface IGetCellInfoRequest { - - /** GetCellInfoRequest cell */ - cell?: (string|null); - } - - /** Represents a GetCellInfoRequest. */ - class GetCellInfoRequest implements IGetCellInfoRequest { - - /** - * Constructs a new GetCellInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetCellInfoRequest); - - /** GetCellInfoRequest cell. */ - public cell: string; - - /** - * Creates a new GetCellInfoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCellInfoRequest instance - */ - public static create(properties?: vtctldata.IGetCellInfoRequest): vtctldata.GetCellInfoRequest; - - /** - * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. - * @param message GetCellInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. - * @param message GetCellInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetCellInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCellInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoRequest; - - /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCellInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoRequest; - - /** - * Verifies a GetCellInfoRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCellInfoRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoRequest; - - /** - * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. - * @param message GetCellInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetCellInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCellInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCellInfoResponse. */ - interface IGetCellInfoResponse { - - /** GetCellInfoResponse cell_info */ - cell_info?: (topodata.ICellInfo|null); - } - - /** Represents a GetCellInfoResponse. */ - class GetCellInfoResponse implements IGetCellInfoResponse { - - /** - * Constructs a new GetCellInfoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetCellInfoResponse); - - /** GetCellInfoResponse cell_info. */ - public cell_info?: (topodata.ICellInfo|null); - - /** - * Creates a new GetCellInfoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCellInfoResponse instance - */ - public static create(properties?: vtctldata.IGetCellInfoResponse): vtctldata.GetCellInfoResponse; - - /** - * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. - * @param message GetCellInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. - * @param message GetCellInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetCellInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCellInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellInfoResponse; - - /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCellInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellInfoResponse; - - /** - * Verifies a GetCellInfoResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCellInfoResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellInfoResponse; - - /** - * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. - * @param message GetCellInfoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetCellInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCellInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCellsAliasesRequest. */ - interface IGetCellsAliasesRequest { - } - - /** Represents a GetCellsAliasesRequest. */ - class GetCellsAliasesRequest implements IGetCellsAliasesRequest { - - /** - * Constructs a new GetCellsAliasesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetCellsAliasesRequest); - - /** - * Creates a new GetCellsAliasesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCellsAliasesRequest instance - */ - public static create(properties?: vtctldata.IGetCellsAliasesRequest): vtctldata.GetCellsAliasesRequest; - - /** - * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. - * @param message GetCellsAliasesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetCellsAliasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. - * @param message GetCellsAliasesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetCellsAliasesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCellsAliasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellsAliasesRequest; - - /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCellsAliasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellsAliasesRequest; - - /** - * Verifies a GetCellsAliasesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCellsAliasesRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellsAliasesRequest; - - /** - * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. - * @param message GetCellsAliasesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetCellsAliasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCellsAliasesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetCellsAliasesResponse. */ - interface IGetCellsAliasesResponse { - - /** GetCellsAliasesResponse aliases */ - aliases?: ({ [k: string]: topodata.ICellsAlias }|null); - } - - /** Represents a GetCellsAliasesResponse. */ - class GetCellsAliasesResponse implements IGetCellsAliasesResponse { - - /** - * Constructs a new GetCellsAliasesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetCellsAliasesResponse); - - /** GetCellsAliasesResponse aliases. */ - public aliases: { [k: string]: topodata.ICellsAlias }; - - /** - * Creates a new GetCellsAliasesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetCellsAliasesResponse instance - */ - public static create(properties?: vtctldata.IGetCellsAliasesResponse): vtctldata.GetCellsAliasesResponse; - - /** - * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. - * @param message GetCellsAliasesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetCellsAliasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. - * @param message GetCellsAliasesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetCellsAliasesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetCellsAliasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetCellsAliasesResponse; - - /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetCellsAliasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetCellsAliasesResponse; - - /** - * Verifies a GetCellsAliasesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetCellsAliasesResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetCellsAliasesResponse; - - /** - * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. - * @param message GetCellsAliasesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetCellsAliasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetCellsAliasesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetKeyspacesRequest. */ - interface IGetKeyspacesRequest { - } - - /** Represents a GetKeyspacesRequest. */ - class GetKeyspacesRequest implements IGetKeyspacesRequest { - - /** - * Constructs a new GetKeyspacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetKeyspacesRequest); - - /** - * Creates a new GetKeyspacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyspacesRequest instance - */ - public static create(properties?: vtctldata.IGetKeyspacesRequest): vtctldata.GetKeyspacesRequest; - - /** - * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. - * @param message GetKeyspacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. - * @param message GetKeyspacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspacesRequest; - - /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspacesRequest; - - /** - * Verifies a GetKeyspacesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyspacesRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspacesRequest; - - /** - * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. - * @param message GetKeyspacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyspacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetKeyspacesResponse. */ - interface IGetKeyspacesResponse { - - /** GetKeyspacesResponse keyspaces */ - keyspaces?: (vtctldata.IKeyspace[]|null); - } - - /** Represents a GetKeyspacesResponse. */ - class GetKeyspacesResponse implements IGetKeyspacesResponse { - - /** - * Constructs a new GetKeyspacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetKeyspacesResponse); - - /** GetKeyspacesResponse keyspaces. */ - public keyspaces: vtctldata.IKeyspace[]; - - /** - * Creates a new GetKeyspacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyspacesResponse instance - */ - public static create(properties?: vtctldata.IGetKeyspacesResponse): vtctldata.GetKeyspacesResponse; - - /** - * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. - * @param message GetKeyspacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. - * @param message GetKeyspacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspacesResponse; - - /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspacesResponse; - - /** - * Verifies a GetKeyspacesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyspacesResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspacesResponse; - - /** - * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. - * @param message GetKeyspacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyspacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetKeyspaceRequest. */ - interface IGetKeyspaceRequest { - - /** GetKeyspaceRequest keyspace */ - keyspace?: (string|null); - } - - /** Represents a GetKeyspaceRequest. */ - class GetKeyspaceRequest implements IGetKeyspaceRequest { - - /** - * Constructs a new GetKeyspaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetKeyspaceRequest); - - /** GetKeyspaceRequest keyspace. */ - public keyspace: string; - - /** - * Creates a new GetKeyspaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyspaceRequest instance - */ - public static create(properties?: vtctldata.IGetKeyspaceRequest): vtctldata.GetKeyspaceRequest; - - /** - * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. - * @param message GetKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. - * @param message GetKeyspaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetKeyspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspaceRequest; - - /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspaceRequest; - - /** - * Verifies a GetKeyspaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyspaceRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspaceRequest; - - /** - * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. - * @param message GetKeyspaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetKeyspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyspaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetKeyspaceResponse. */ - interface IGetKeyspaceResponse { - - /** GetKeyspaceResponse keyspace */ - keyspace?: (vtctldata.IKeyspace|null); - } - - /** Represents a GetKeyspaceResponse. */ - class GetKeyspaceResponse implements IGetKeyspaceResponse { - - /** - * Constructs a new GetKeyspaceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetKeyspaceResponse); - - /** GetKeyspaceResponse keyspace. */ - public keyspace?: (vtctldata.IKeyspace|null); - - /** - * Creates a new GetKeyspaceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyspaceResponse instance - */ - public static create(properties?: vtctldata.IGetKeyspaceResponse): vtctldata.GetKeyspaceResponse; - - /** - * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. - * @param message GetKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. - * @param message GetKeyspaceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetKeyspaceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetKeyspaceResponse; - - /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetKeyspaceResponse; - - /** - * Verifies a GetKeyspaceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyspaceResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetKeyspaceResponse; - - /** - * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. - * @param message GetKeyspaceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetKeyspaceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyspaceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemaRequest. */ - interface IGetSchemaRequest { - - /** GetSchemaRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - - /** GetSchemaRequest tables */ - tables?: (string[]|null); - - /** GetSchemaRequest exclude_tables */ - exclude_tables?: (string[]|null); - - /** GetSchemaRequest include_views */ - include_views?: (boolean|null); - - /** GetSchemaRequest table_names_only */ - table_names_only?: (boolean|null); - - /** GetSchemaRequest table_sizes_only */ - table_sizes_only?: (boolean|null); - } - - /** Represents a GetSchemaRequest. */ - class GetSchemaRequest implements IGetSchemaRequest { - - /** - * Constructs a new GetSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetSchemaRequest); - - /** GetSchemaRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** GetSchemaRequest tables. */ - public tables: string[]; - - /** GetSchemaRequest exclude_tables. */ - public exclude_tables: string[]; - - /** GetSchemaRequest include_views. */ - public include_views: boolean; - - /** GetSchemaRequest table_names_only. */ - public table_names_only: boolean; - - /** GetSchemaRequest table_sizes_only. */ - public table_sizes_only: boolean; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemaRequest instance - */ - public static create(properties?: vtctldata.IGetSchemaRequest): vtctldata.GetSchemaRequest; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSchemaRequest; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSchemaRequest; - - /** - * Verifies a GetSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSchemaRequest; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @param message GetSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSchemaResponse. */ - interface IGetSchemaResponse { - - /** GetSchemaResponse schema */ - schema?: (tabletmanagerdata.ISchemaDefinition|null); - } - - /** Represents a GetSchemaResponse. */ - class GetSchemaResponse implements IGetSchemaResponse { - - /** - * Constructs a new GetSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetSchemaResponse); - - /** GetSchemaResponse schema. */ - public schema?: (tabletmanagerdata.ISchemaDefinition|null); - - /** - * Creates a new GetSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemaResponse instance - */ - public static create(properties?: vtctldata.IGetSchemaResponse): vtctldata.GetSchemaResponse; - - /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. - * @param message GetSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSchemaResponse; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSchemaResponse; - - /** - * Verifies a GetSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSchemaResponse; - - /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. - * @param message GetSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetShardRequest. */ - interface IGetShardRequest { - - /** GetShardRequest keyspace */ - keyspace?: (string|null); - - /** GetShardRequest shard_name */ - shard_name?: (string|null); - } - - /** Represents a GetShardRequest. */ - class GetShardRequest implements IGetShardRequest { - - /** - * Constructs a new GetShardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetShardRequest); - - /** GetShardRequest keyspace. */ - public keyspace: string; - - /** GetShardRequest shard_name. */ - public shard_name: string; - - /** - * Creates a new GetShardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetShardRequest instance - */ - public static create(properties?: vtctldata.IGetShardRequest): vtctldata.GetShardRequest; - - /** - * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. - * @param message GetShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. - * @param message GetShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetShardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardRequest; - - /** - * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardRequest; - - /** - * Verifies a GetShardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetShardRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetShardRequest; - - /** - * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. - * @param message GetShardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetShardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetShardResponse. */ - interface IGetShardResponse { - - /** GetShardResponse shard */ - shard?: (vtctldata.IShard|null); - } - - /** Represents a GetShardResponse. */ - class GetShardResponse implements IGetShardResponse { - - /** - * Constructs a new GetShardResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetShardResponse); - - /** GetShardResponse shard. */ - public shard?: (vtctldata.IShard|null); - - /** - * Creates a new GetShardResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetShardResponse instance - */ - public static create(properties?: vtctldata.IGetShardResponse): vtctldata.GetShardResponse; - - /** - * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. - * @param message GetShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. - * @param message GetShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetShardResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetShardResponse; - - /** - * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetShardResponse; - - /** - * Verifies a GetShardResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetShardResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetShardResponse; - - /** - * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. - * @param message GetShardResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetShardResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSrvKeyspacesRequest. */ - interface IGetSrvKeyspacesRequest { - - /** GetSrvKeyspacesRequest keyspace */ - keyspace?: (string|null); - - /** GetSrvKeyspacesRequest cells */ - cells?: (string[]|null); - } - - /** Represents a GetSrvKeyspacesRequest. */ - class GetSrvKeyspacesRequest implements IGetSrvKeyspacesRequest { - - /** - * Constructs a new GetSrvKeyspacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetSrvKeyspacesRequest); - - /** GetSrvKeyspacesRequest keyspace. */ - public keyspace: string; - - /** GetSrvKeyspacesRequest cells. */ - public cells: string[]; - - /** - * Creates a new GetSrvKeyspacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSrvKeyspacesRequest instance - */ - public static create(properties?: vtctldata.IGetSrvKeyspacesRequest): vtctldata.GetSrvKeyspacesRequest; - - /** - * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. - * @param message GetSrvKeyspacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. - * @param message GetSrvKeyspacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSrvKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesRequest; - - /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSrvKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesRequest; - - /** - * Verifies a GetSrvKeyspacesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSrvKeyspacesRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesRequest; - - /** - * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. - * @param message GetSrvKeyspacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSrvKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSrvKeyspacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSrvKeyspacesResponse. */ - interface IGetSrvKeyspacesResponse { - - /** GetSrvKeyspacesResponse srv_keyspaces */ - srv_keyspaces?: ({ [k: string]: topodata.ISrvKeyspace }|null); - } - - /** Represents a GetSrvKeyspacesResponse. */ - class GetSrvKeyspacesResponse implements IGetSrvKeyspacesResponse { - - /** - * Constructs a new GetSrvKeyspacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetSrvKeyspacesResponse); - - /** GetSrvKeyspacesResponse srv_keyspaces. */ - public srv_keyspaces: { [k: string]: topodata.ISrvKeyspace }; - - /** - * Creates a new GetSrvKeyspacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSrvKeyspacesResponse instance - */ - public static create(properties?: vtctldata.IGetSrvKeyspacesResponse): vtctldata.GetSrvKeyspacesResponse; - - /** - * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. - * @param message GetSrvKeyspacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. - * @param message GetSrvKeyspacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetSrvKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSrvKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvKeyspacesResponse; - - /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSrvKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvKeyspacesResponse; - - /** - * Verifies a GetSrvKeyspacesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSrvKeyspacesResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvKeyspacesResponse; - - /** - * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. - * @param message GetSrvKeyspacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSrvKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSrvKeyspacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSrvVSchemaRequest. */ - interface IGetSrvVSchemaRequest { - - /** GetSrvVSchemaRequest cell */ - cell?: (string|null); - } - - /** Represents a GetSrvVSchemaRequest. */ - class GetSrvVSchemaRequest implements IGetSrvVSchemaRequest { - - /** - * Constructs a new GetSrvVSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetSrvVSchemaRequest); - - /** GetSrvVSchemaRequest cell. */ - public cell: string; - - /** - * Creates a new GetSrvVSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSrvVSchemaRequest instance - */ - public static create(properties?: vtctldata.IGetSrvVSchemaRequest): vtctldata.GetSrvVSchemaRequest; - - /** - * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. - * @param message GetSrvVSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. - * @param message GetSrvVSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetSrvVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSrvVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemaRequest; - - /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSrvVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemaRequest; - - /** - * Verifies a GetSrvVSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSrvVSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemaRequest; - - /** - * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. - * @param message GetSrvVSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSrvVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSrvVSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetSrvVSchemaResponse. */ - interface IGetSrvVSchemaResponse { - - /** GetSrvVSchemaResponse srv_v_schema */ - srv_v_schema?: (vschema.ISrvVSchema|null); - } - - /** Represents a GetSrvVSchemaResponse. */ - class GetSrvVSchemaResponse implements IGetSrvVSchemaResponse { - - /** - * Constructs a new GetSrvVSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetSrvVSchemaResponse); - - /** GetSrvVSchemaResponse srv_v_schema. */ - public srv_v_schema?: (vschema.ISrvVSchema|null); - - /** - * Creates a new GetSrvVSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSrvVSchemaResponse instance - */ - public static create(properties?: vtctldata.IGetSrvVSchemaResponse): vtctldata.GetSrvVSchemaResponse; - - /** - * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. - * @param message GetSrvVSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. - * @param message GetSrvVSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetSrvVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSrvVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetSrvVSchemaResponse; - - /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSrvVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetSrvVSchemaResponse; - - /** - * Verifies a GetSrvVSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSrvVSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetSrvVSchemaResponse; - - /** - * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. - * @param message GetSrvVSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetSrvVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSrvVSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletRequest. */ - interface IGetTabletRequest { - - /** GetTabletRequest tablet_alias */ - tablet_alias?: (topodata.ITabletAlias|null); - } - - /** Represents a GetTabletRequest. */ - class GetTabletRequest implements IGetTabletRequest { - - /** - * Constructs a new GetTabletRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetTabletRequest); - - /** GetTabletRequest tablet_alias. */ - public tablet_alias?: (topodata.ITabletAlias|null); - - /** - * Creates a new GetTabletRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletRequest instance - */ - public static create(properties?: vtctldata.IGetTabletRequest): vtctldata.GetTabletRequest; - - /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletRequest; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletRequest; - - /** - * Verifies a GetTabletRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletRequest; - - /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. - * @param message GetTabletRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletResponse. */ - interface IGetTabletResponse { - - /** GetTabletResponse tablet */ - tablet?: (topodata.ITablet|null); - } - - /** Represents a GetTabletResponse. */ - class GetTabletResponse implements IGetTabletResponse { - - /** - * Constructs a new GetTabletResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetTabletResponse); - - /** GetTabletResponse tablet. */ - public tablet?: (topodata.ITablet|null); - - /** - * Creates a new GetTabletResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletResponse instance - */ - public static create(properties?: vtctldata.IGetTabletResponse): vtctldata.GetTabletResponse; - - /** - * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. - * @param message GetTabletResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. - * @param message GetTabletResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletResponse; - - /** - * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletResponse; - - /** - * Verifies a GetTabletResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletResponse; - - /** - * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. - * @param message GetTabletResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletsRequest. */ - interface IGetTabletsRequest { - - /** GetTabletsRequest keyspace */ - keyspace?: (string|null); - - /** GetTabletsRequest shard */ - shard?: (string|null); - - /** GetTabletsRequest cells */ - cells?: (string[]|null); - - /** GetTabletsRequest strict */ - strict?: (boolean|null); - - /** GetTabletsRequest tablet_aliases */ - tablet_aliases?: (topodata.ITabletAlias[]|null); - } - - /** Represents a GetTabletsRequest. */ - class GetTabletsRequest implements IGetTabletsRequest { - - /** - * Constructs a new GetTabletsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetTabletsRequest); - - /** GetTabletsRequest keyspace. */ - public keyspace: string; - - /** GetTabletsRequest shard. */ - public shard: string; - - /** GetTabletsRequest cells. */ - public cells: string[]; - - /** GetTabletsRequest strict. */ - public strict: boolean; - - /** GetTabletsRequest tablet_aliases. */ - public tablet_aliases: topodata.ITabletAlias[]; - - /** - * Creates a new GetTabletsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletsRequest instance - */ - public static create(properties?: vtctldata.IGetTabletsRequest): vtctldata.GetTabletsRequest; - - /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletsRequest; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletsRequest; - - /** - * Verifies a GetTabletsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletsRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletsRequest; - - /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @param message GetTabletsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetTabletsResponse. */ - interface IGetTabletsResponse { - - /** GetTabletsResponse tablets */ - tablets?: (topodata.ITablet[]|null); - } - - /** Represents a GetTabletsResponse. */ - class GetTabletsResponse implements IGetTabletsResponse { - - /** - * Constructs a new GetTabletsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetTabletsResponse); - - /** GetTabletsResponse tablets. */ - public tablets: topodata.ITablet[]; - - /** - * Creates a new GetTabletsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTabletsResponse instance - */ - public static create(properties?: vtctldata.IGetTabletsResponse): vtctldata.GetTabletsResponse; - - /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetTabletsResponse; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetTabletsResponse; - - /** - * Verifies a GetTabletsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTabletsResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetTabletsResponse; - - /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. - * @param message GetTabletsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTabletsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetVSchemaRequest. */ - interface IGetVSchemaRequest { - - /** GetVSchemaRequest keyspace */ - keyspace?: (string|null); - } - - /** Represents a GetVSchemaRequest. */ - class GetVSchemaRequest implements IGetVSchemaRequest { - - /** - * Constructs a new GetVSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetVSchemaRequest); - - /** GetVSchemaRequest keyspace. */ - public keyspace: string; - - /** - * Creates a new GetVSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVSchemaRequest instance - */ - public static create(properties?: vtctldata.IGetVSchemaRequest): vtctldata.GetVSchemaRequest; - - /** - * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. - * @param message GetVSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. - * @param message GetVSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetVSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVSchemaRequest; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVSchemaRequest; - - /** - * Verifies a GetVSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetVSchemaRequest; - - /** - * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. - * @param message GetVSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetVSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetVSchemaResponse. */ - interface IGetVSchemaResponse { - - /** GetVSchemaResponse v_schema */ - v_schema?: (vschema.IKeyspace|null); - } - - /** Represents a GetVSchemaResponse. */ - class GetVSchemaResponse implements IGetVSchemaResponse { - - /** - * Constructs a new GetVSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetVSchemaResponse); - - /** GetVSchemaResponse v_schema. */ - public v_schema?: (vschema.IKeyspace|null); - - /** - * Creates a new GetVSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVSchemaResponse instance - */ - public static create(properties?: vtctldata.IGetVSchemaResponse): vtctldata.GetVSchemaResponse; - - /** - * Encodes the specified GetVSchemaResponse message. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. - * @param message GetVSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. - * @param message GetVSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetVSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetVSchemaResponse; - - /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetVSchemaResponse; - - /** - * Verifies a GetVSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetVSchemaResponse; - - /** - * Creates a plain object from a GetVSchemaResponse message. Also converts values to other types if specified. - * @param message GetVSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetVSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetWorkflowsRequest. */ - interface IGetWorkflowsRequest { - - /** GetWorkflowsRequest keyspace */ - keyspace?: (string|null); - - /** GetWorkflowsRequest active_only */ - active_only?: (boolean|null); - } - - /** Represents a GetWorkflowsRequest. */ - class GetWorkflowsRequest implements IGetWorkflowsRequest { - - /** - * Constructs a new GetWorkflowsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetWorkflowsRequest); - - /** GetWorkflowsRequest keyspace. */ - public keyspace: string; - - /** GetWorkflowsRequest active_only. */ - public active_only: boolean; - - /** - * Creates a new GetWorkflowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkflowsRequest instance - */ - public static create(properties?: vtctldata.IGetWorkflowsRequest): vtctldata.GetWorkflowsRequest; - - /** - * Encodes the specified GetWorkflowsRequest message. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. - * @param message GetWorkflowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkflowsRequest message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. - * @param message GetWorkflowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetWorkflowsRequest; - - /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetWorkflowsRequest; - - /** - * Verifies a GetWorkflowsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetWorkflowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkflowsRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetWorkflowsRequest; - - /** - * Creates a plain object from a GetWorkflowsRequest message. Also converts values to other types if specified. - * @param message GetWorkflowsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkflowsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GetWorkflowsResponse. */ - interface IGetWorkflowsResponse { - - /** GetWorkflowsResponse workflows */ - workflows?: (vtctldata.IWorkflow[]|null); - } - - /** Represents a GetWorkflowsResponse. */ - class GetWorkflowsResponse implements IGetWorkflowsResponse { - - /** - * Constructs a new GetWorkflowsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IGetWorkflowsResponse); - - /** GetWorkflowsResponse workflows. */ - public workflows: vtctldata.IWorkflow[]; - - /** - * Creates a new GetWorkflowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkflowsResponse instance - */ - public static create(properties?: vtctldata.IGetWorkflowsResponse): vtctldata.GetWorkflowsResponse; - - /** - * Encodes the specified GetWorkflowsResponse message. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. - * @param message GetWorkflowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IGetWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkflowsResponse message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. - * @param message GetWorkflowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IGetWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.GetWorkflowsResponse; - - /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.GetWorkflowsResponse; - - /** - * Verifies a GetWorkflowsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetWorkflowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkflowsResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.GetWorkflowsResponse; - - /** - * Creates a plain object from a GetWorkflowsResponse message. Also converts values to other types if specified. - * @param message GetWorkflowsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.GetWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkflowsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitShardPrimaryRequest. */ - interface IInitShardPrimaryRequest { - - /** InitShardPrimaryRequest keyspace */ - keyspace?: (string|null); - - /** InitShardPrimaryRequest shard */ - shard?: (string|null); - - /** InitShardPrimaryRequest primary_elect_tablet_alias */ - primary_elect_tablet_alias?: (topodata.ITabletAlias|null); - - /** InitShardPrimaryRequest force */ - force?: (boolean|null); - - /** InitShardPrimaryRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); - } - - /** Represents an InitShardPrimaryRequest. */ - class InitShardPrimaryRequest implements IInitShardPrimaryRequest { - - /** - * Constructs a new InitShardPrimaryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IInitShardPrimaryRequest); - - /** InitShardPrimaryRequest keyspace. */ - public keyspace: string; - - /** InitShardPrimaryRequest shard. */ - public shard: string; - - /** InitShardPrimaryRequest primary_elect_tablet_alias. */ - public primary_elect_tablet_alias?: (topodata.ITabletAlias|null); - - /** InitShardPrimaryRequest force. */ - public force: boolean; - - /** InitShardPrimaryRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); - - /** - * Creates a new InitShardPrimaryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns InitShardPrimaryRequest instance - */ - public static create(properties?: vtctldata.IInitShardPrimaryRequest): vtctldata.InitShardPrimaryRequest; - - /** - * Encodes the specified InitShardPrimaryRequest message. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. - * @param message InitShardPrimaryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IInitShardPrimaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitShardPrimaryRequest message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. - * @param message InitShardPrimaryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IInitShardPrimaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitShardPrimaryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.InitShardPrimaryRequest; - - /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitShardPrimaryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.InitShardPrimaryRequest; - - /** - * Verifies an InitShardPrimaryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitShardPrimaryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitShardPrimaryRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.InitShardPrimaryRequest; - - /** - * Creates a plain object from an InitShardPrimaryRequest message. Also converts values to other types if specified. - * @param message InitShardPrimaryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.InitShardPrimaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitShardPrimaryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitShardPrimaryResponse. */ - interface IInitShardPrimaryResponse { - - /** InitShardPrimaryResponse events */ - events?: (logutil.IEvent[]|null); - } - - /** Represents an InitShardPrimaryResponse. */ - class InitShardPrimaryResponse implements IInitShardPrimaryResponse { - - /** - * Constructs a new InitShardPrimaryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IInitShardPrimaryResponse); - - /** InitShardPrimaryResponse events. */ - public events: logutil.IEvent[]; - - /** - * Creates a new InitShardPrimaryResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns InitShardPrimaryResponse instance - */ - public static create(properties?: vtctldata.IInitShardPrimaryResponse): vtctldata.InitShardPrimaryResponse; - - /** - * Encodes the specified InitShardPrimaryResponse message. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. - * @param message InitShardPrimaryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IInitShardPrimaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitShardPrimaryResponse message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. - * @param message InitShardPrimaryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IInitShardPrimaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitShardPrimaryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.InitShardPrimaryResponse; - - /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitShardPrimaryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.InitShardPrimaryResponse; - - /** - * Verifies an InitShardPrimaryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitShardPrimaryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitShardPrimaryResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.InitShardPrimaryResponse; - - /** - * Creates a plain object from an InitShardPrimaryResponse message. Also converts values to other types if specified. - * @param message InitShardPrimaryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.InitShardPrimaryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitShardPrimaryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PlannedReparentShardRequest. */ - interface IPlannedReparentShardRequest { - - /** PlannedReparentShardRequest keyspace */ - keyspace?: (string|null); - - /** PlannedReparentShardRequest shard */ - shard?: (string|null); - - /** PlannedReparentShardRequest new_primary */ - new_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardRequest avoid_primary */ - avoid_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardRequest wait_replicas_timeout */ - wait_replicas_timeout?: (vttime.IDuration|null); - } - - /** Represents a PlannedReparentShardRequest. */ - class PlannedReparentShardRequest implements IPlannedReparentShardRequest { - - /** - * Constructs a new PlannedReparentShardRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IPlannedReparentShardRequest); - - /** PlannedReparentShardRequest keyspace. */ - public keyspace: string; - - /** PlannedReparentShardRequest shard. */ - public shard: string; - - /** PlannedReparentShardRequest new_primary. */ - public new_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardRequest avoid_primary. */ - public avoid_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardRequest wait_replicas_timeout. */ - public wait_replicas_timeout?: (vttime.IDuration|null); - - /** - * Creates a new PlannedReparentShardRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PlannedReparentShardRequest instance - */ - public static create(properties?: vtctldata.IPlannedReparentShardRequest): vtctldata.PlannedReparentShardRequest; - - /** - * Encodes the specified PlannedReparentShardRequest message. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. - * @param message PlannedReparentShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IPlannedReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlannedReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. - * @param message PlannedReparentShardRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IPlannedReparentShardRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlannedReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PlannedReparentShardRequest; - - /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlannedReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PlannedReparentShardRequest; - - /** - * Verifies a PlannedReparentShardRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlannedReparentShardRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlannedReparentShardRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.PlannedReparentShardRequest; - - /** - * Creates a plain object from a PlannedReparentShardRequest message. Also converts values to other types if specified. - * @param message PlannedReparentShardRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.PlannedReparentShardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlannedReparentShardRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PlannedReparentShardResponse. */ - interface IPlannedReparentShardResponse { - - /** PlannedReparentShardResponse keyspace */ - keyspace?: (string|null); - - /** PlannedReparentShardResponse shard */ - shard?: (string|null); - - /** PlannedReparentShardResponse promoted_primary */ - promoted_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardResponse events */ - events?: (logutil.IEvent[]|null); - } - - /** Represents a PlannedReparentShardResponse. */ - class PlannedReparentShardResponse implements IPlannedReparentShardResponse { - - /** - * Constructs a new PlannedReparentShardResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IPlannedReparentShardResponse); - - /** PlannedReparentShardResponse keyspace. */ - public keyspace: string; - - /** PlannedReparentShardResponse shard. */ - public shard: string; - - /** PlannedReparentShardResponse promoted_primary. */ - public promoted_primary?: (topodata.ITabletAlias|null); - - /** PlannedReparentShardResponse events. */ - public events: logutil.IEvent[]; - - /** - * Creates a new PlannedReparentShardResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PlannedReparentShardResponse instance - */ - public static create(properties?: vtctldata.IPlannedReparentShardResponse): vtctldata.PlannedReparentShardResponse; - - /** - * Encodes the specified PlannedReparentShardResponse message. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. - * @param message PlannedReparentShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IPlannedReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlannedReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. - * @param message PlannedReparentShardResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IPlannedReparentShardResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlannedReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.PlannedReparentShardResponse; - - /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlannedReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.PlannedReparentShardResponse; - - /** - * Verifies a PlannedReparentShardResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlannedReparentShardResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlannedReparentShardResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.PlannedReparentShardResponse; - - /** - * Creates a plain object from a PlannedReparentShardResponse message. Also converts values to other types if specified. - * @param message PlannedReparentShardResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.PlannedReparentShardResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlannedReparentShardResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RemoveKeyspaceCellRequest. */ - interface IRemoveKeyspaceCellRequest { - - /** RemoveKeyspaceCellRequest keyspace */ - keyspace?: (string|null); - - /** RemoveKeyspaceCellRequest cell */ - cell?: (string|null); - - /** RemoveKeyspaceCellRequest force */ - force?: (boolean|null); - - /** RemoveKeyspaceCellRequest recursive */ - recursive?: (boolean|null); - } - - /** Represents a RemoveKeyspaceCellRequest. */ - class RemoveKeyspaceCellRequest implements IRemoveKeyspaceCellRequest { - - /** - * Constructs a new RemoveKeyspaceCellRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IRemoveKeyspaceCellRequest); - - /** RemoveKeyspaceCellRequest keyspace. */ - public keyspace: string; - - /** RemoveKeyspaceCellRequest cell. */ - public cell: string; - - /** RemoveKeyspaceCellRequest force. */ - public force: boolean; - - /** RemoveKeyspaceCellRequest recursive. */ - public recursive: boolean; - - /** - * Creates a new RemoveKeyspaceCellRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveKeyspaceCellRequest instance - */ - public static create(properties?: vtctldata.IRemoveKeyspaceCellRequest): vtctldata.RemoveKeyspaceCellRequest; - - /** - * Encodes the specified RemoveKeyspaceCellRequest message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. - * @param message RemoveKeyspaceCellRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IRemoveKeyspaceCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveKeyspaceCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. - * @param message RemoveKeyspaceCellRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IRemoveKeyspaceCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveKeyspaceCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveKeyspaceCellRequest; - - /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveKeyspaceCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveKeyspaceCellRequest; - - /** - * Verifies a RemoveKeyspaceCellRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveKeyspaceCellRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveKeyspaceCellRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveKeyspaceCellRequest; - - /** - * Creates a plain object from a RemoveKeyspaceCellRequest message. Also converts values to other types if specified. - * @param message RemoveKeyspaceCellRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.RemoveKeyspaceCellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveKeyspaceCellRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RemoveKeyspaceCellResponse. */ - interface IRemoveKeyspaceCellResponse { - } - - /** Represents a RemoveKeyspaceCellResponse. */ - class RemoveKeyspaceCellResponse implements IRemoveKeyspaceCellResponse { - - /** - * Constructs a new RemoveKeyspaceCellResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IRemoveKeyspaceCellResponse); - - /** - * Creates a new RemoveKeyspaceCellResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveKeyspaceCellResponse instance - */ - public static create(properties?: vtctldata.IRemoveKeyspaceCellResponse): vtctldata.RemoveKeyspaceCellResponse; - - /** - * Encodes the specified RemoveKeyspaceCellResponse message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. - * @param message RemoveKeyspaceCellResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IRemoveKeyspaceCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveKeyspaceCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. - * @param message RemoveKeyspaceCellResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IRemoveKeyspaceCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveKeyspaceCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveKeyspaceCellResponse; - - /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveKeyspaceCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveKeyspaceCellResponse; - - /** - * Verifies a RemoveKeyspaceCellResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveKeyspaceCellResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveKeyspaceCellResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveKeyspaceCellResponse; - - /** - * Creates a plain object from a RemoveKeyspaceCellResponse message. Also converts values to other types if specified. - * @param message RemoveKeyspaceCellResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.RemoveKeyspaceCellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveKeyspaceCellResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RemoveShardCellRequest. */ - interface IRemoveShardCellRequest { - - /** RemoveShardCellRequest keyspace */ - keyspace?: (string|null); - - /** RemoveShardCellRequest shard_name */ - shard_name?: (string|null); - - /** RemoveShardCellRequest cell */ - cell?: (string|null); - - /** RemoveShardCellRequest force */ - force?: (boolean|null); - - /** RemoveShardCellRequest recursive */ - recursive?: (boolean|null); - } - - /** Represents a RemoveShardCellRequest. */ - class RemoveShardCellRequest implements IRemoveShardCellRequest { - - /** - * Constructs a new RemoveShardCellRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IRemoveShardCellRequest); - - /** RemoveShardCellRequest keyspace. */ - public keyspace: string; - - /** RemoveShardCellRequest shard_name. */ - public shard_name: string; - - /** RemoveShardCellRequest cell. */ - public cell: string; - - /** RemoveShardCellRequest force. */ - public force: boolean; - - /** RemoveShardCellRequest recursive. */ - public recursive: boolean; - - /** - * Creates a new RemoveShardCellRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveShardCellRequest instance - */ - public static create(properties?: vtctldata.IRemoveShardCellRequest): vtctldata.RemoveShardCellRequest; - - /** - * Encodes the specified RemoveShardCellRequest message. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. - * @param message RemoveShardCellRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IRemoveShardCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveShardCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. - * @param message RemoveShardCellRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IRemoveShardCellRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveShardCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveShardCellRequest; - - /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveShardCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveShardCellRequest; - - /** - * Verifies a RemoveShardCellRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveShardCellRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveShardCellRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveShardCellRequest; - - /** - * Creates a plain object from a RemoveShardCellRequest message. Also converts values to other types if specified. - * @param message RemoveShardCellRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.RemoveShardCellRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveShardCellRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RemoveShardCellResponse. */ - interface IRemoveShardCellResponse { - } - - /** Represents a RemoveShardCellResponse. */ - class RemoveShardCellResponse implements IRemoveShardCellResponse { - - /** - * Constructs a new RemoveShardCellResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IRemoveShardCellResponse); - - /** - * Creates a new RemoveShardCellResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveShardCellResponse instance - */ - public static create(properties?: vtctldata.IRemoveShardCellResponse): vtctldata.RemoveShardCellResponse; - - /** - * Encodes the specified RemoveShardCellResponse message. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. - * @param message RemoveShardCellResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IRemoveShardCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveShardCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. - * @param message RemoveShardCellResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IRemoveShardCellResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveShardCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.RemoveShardCellResponse; - - /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveShardCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.RemoveShardCellResponse; - - /** - * Verifies a RemoveShardCellResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveShardCellResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveShardCellResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.RemoveShardCellResponse; - - /** - * Creates a plain object from a RemoveShardCellResponse message. Also converts values to other types if specified. - * @param message RemoveShardCellResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.RemoveShardCellResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveShardCellResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReparentTabletRequest. */ - interface IReparentTabletRequest { - - /** ReparentTabletRequest tablet */ - tablet?: (topodata.ITabletAlias|null); - } - - /** Represents a ReparentTabletRequest. */ - class ReparentTabletRequest implements IReparentTabletRequest { - - /** - * Constructs a new ReparentTabletRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IReparentTabletRequest); - - /** ReparentTabletRequest tablet. */ - public tablet?: (topodata.ITabletAlias|null); - - /** - * Creates a new ReparentTabletRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReparentTabletRequest instance - */ - public static create(properties?: vtctldata.IReparentTabletRequest): vtctldata.ReparentTabletRequest; - - /** - * Encodes the specified ReparentTabletRequest message. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. - * @param message ReparentTabletRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IReparentTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReparentTabletRequest message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. - * @param message ReparentTabletRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IReparentTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReparentTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReparentTabletRequest; - - /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReparentTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReparentTabletRequest; - - /** - * Verifies a ReparentTabletRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReparentTabletRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReparentTabletRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReparentTabletRequest; - - /** - * Creates a plain object from a ReparentTabletRequest message. Also converts values to other types if specified. - * @param message ReparentTabletRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ReparentTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReparentTabletRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReparentTabletResponse. */ - interface IReparentTabletResponse { - - /** ReparentTabletResponse keyspace */ - keyspace?: (string|null); - - /** ReparentTabletResponse shard */ - shard?: (string|null); - - /** ReparentTabletResponse primary */ - primary?: (topodata.ITabletAlias|null); - } - - /** Represents a ReparentTabletResponse. */ - class ReparentTabletResponse implements IReparentTabletResponse { - - /** - * Constructs a new ReparentTabletResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IReparentTabletResponse); - - /** ReparentTabletResponse keyspace. */ - public keyspace: string; - - /** ReparentTabletResponse shard. */ - public shard: string; - - /** ReparentTabletResponse primary. */ - public primary?: (topodata.ITabletAlias|null); - - /** - * Creates a new ReparentTabletResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ReparentTabletResponse instance - */ - public static create(properties?: vtctldata.IReparentTabletResponse): vtctldata.ReparentTabletResponse; - - /** - * Encodes the specified ReparentTabletResponse message. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. - * @param message ReparentTabletResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IReparentTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReparentTabletResponse message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. - * @param message ReparentTabletResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IReparentTabletResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReparentTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ReparentTabletResponse; - - /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReparentTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ReparentTabletResponse; - - /** - * Verifies a ReparentTabletResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReparentTabletResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReparentTabletResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ReparentTabletResponse; - - /** - * Creates a plain object from a ReparentTabletResponse message. Also converts values to other types if specified. - * @param message ReparentTabletResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ReparentTabletResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReparentTabletResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ShardReplicationPositionsRequest. */ - interface IShardReplicationPositionsRequest { - - /** ShardReplicationPositionsRequest keyspace */ - keyspace?: (string|null); - - /** ShardReplicationPositionsRequest shard */ - shard?: (string|null); - } - - /** Represents a ShardReplicationPositionsRequest. */ - class ShardReplicationPositionsRequest implements IShardReplicationPositionsRequest { - - /** - * Constructs a new ShardReplicationPositionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IShardReplicationPositionsRequest); - - /** ShardReplicationPositionsRequest keyspace. */ - public keyspace: string; - - /** ShardReplicationPositionsRequest shard. */ - public shard: string; - - /** - * Creates a new ShardReplicationPositionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardReplicationPositionsRequest instance - */ - public static create(properties?: vtctldata.IShardReplicationPositionsRequest): vtctldata.ShardReplicationPositionsRequest; - - /** - * Encodes the specified ShardReplicationPositionsRequest message. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. - * @param message ShardReplicationPositionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IShardReplicationPositionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardReplicationPositionsRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. - * @param message ShardReplicationPositionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IShardReplicationPositionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardReplicationPositionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationPositionsRequest; - - /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardReplicationPositionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationPositionsRequest; - - /** - * Verifies a ShardReplicationPositionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardReplicationPositionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardReplicationPositionsRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationPositionsRequest; - - /** - * Creates a plain object from a ShardReplicationPositionsRequest message. Also converts values to other types if specified. - * @param message ShardReplicationPositionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ShardReplicationPositionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardReplicationPositionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ShardReplicationPositionsResponse. */ - interface IShardReplicationPositionsResponse { - - /** ShardReplicationPositionsResponse replication_statuses */ - replication_statuses?: ({ [k: string]: replicationdata.IStatus }|null); - - /** ShardReplicationPositionsResponse tablet_map */ - tablet_map?: ({ [k: string]: topodata.ITablet }|null); - } - - /** Represents a ShardReplicationPositionsResponse. */ - class ShardReplicationPositionsResponse implements IShardReplicationPositionsResponse { - - /** - * Constructs a new ShardReplicationPositionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.IShardReplicationPositionsResponse); - - /** ShardReplicationPositionsResponse replication_statuses. */ - public replication_statuses: { [k: string]: replicationdata.IStatus }; - - /** ShardReplicationPositionsResponse tablet_map. */ - public tablet_map: { [k: string]: topodata.ITablet }; - - /** - * Creates a new ShardReplicationPositionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardReplicationPositionsResponse instance - */ - public static create(properties?: vtctldata.IShardReplicationPositionsResponse): vtctldata.ShardReplicationPositionsResponse; - - /** - * Encodes the specified ShardReplicationPositionsResponse message. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. - * @param message ShardReplicationPositionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.IShardReplicationPositionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardReplicationPositionsResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. - * @param message ShardReplicationPositionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.IShardReplicationPositionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardReplicationPositionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.ShardReplicationPositionsResponse; - - /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardReplicationPositionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.ShardReplicationPositionsResponse; - - /** - * Verifies a ShardReplicationPositionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardReplicationPositionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardReplicationPositionsResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.ShardReplicationPositionsResponse; - - /** - * Creates a plain object from a ShardReplicationPositionsResponse message. Also converts values to other types if specified. - * @param message ShardReplicationPositionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.ShardReplicationPositionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardReplicationPositionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TabletExternallyReparentedRequest. */ - interface ITabletExternallyReparentedRequest { - - /** TabletExternallyReparentedRequest tablet */ - tablet?: (topodata.ITabletAlias|null); - } - - /** Represents a TabletExternallyReparentedRequest. */ - class TabletExternallyReparentedRequest implements ITabletExternallyReparentedRequest { - - /** - * Constructs a new TabletExternallyReparentedRequest. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ITabletExternallyReparentedRequest); - - /** TabletExternallyReparentedRequest tablet. */ - public tablet?: (topodata.ITabletAlias|null); - - /** - * Creates a new TabletExternallyReparentedRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TabletExternallyReparentedRequest instance - */ - public static create(properties?: vtctldata.ITabletExternallyReparentedRequest): vtctldata.TabletExternallyReparentedRequest; - - /** - * Encodes the specified TabletExternallyReparentedRequest message. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. - * @param message TabletExternallyReparentedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ITabletExternallyReparentedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TabletExternallyReparentedRequest message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. - * @param message TabletExternallyReparentedRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ITabletExternallyReparentedRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TabletExternallyReparentedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TabletExternallyReparentedRequest; - - /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TabletExternallyReparentedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TabletExternallyReparentedRequest; - - /** - * Verifies a TabletExternallyReparentedRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TabletExternallyReparentedRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TabletExternallyReparentedRequest - */ - public static fromObject(object: { [k: string]: any }): vtctldata.TabletExternallyReparentedRequest; - - /** - * Creates a plain object from a TabletExternallyReparentedRequest message. Also converts values to other types if specified. - * @param message TabletExternallyReparentedRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.TabletExternallyReparentedRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TabletExternallyReparentedRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TabletExternallyReparentedResponse. */ - interface ITabletExternallyReparentedResponse { - - /** TabletExternallyReparentedResponse keyspace */ - keyspace?: (string|null); - - /** TabletExternallyReparentedResponse shard */ - shard?: (string|null); - - /** TabletExternallyReparentedResponse new_primary */ - new_primary?: (topodata.ITabletAlias|null); - - /** TabletExternallyReparentedResponse old_primary */ - old_primary?: (topodata.ITabletAlias|null); - } - - /** Represents a TabletExternallyReparentedResponse. */ - class TabletExternallyReparentedResponse implements ITabletExternallyReparentedResponse { - - /** - * Constructs a new TabletExternallyReparentedResponse. - * @param [properties] Properties to set - */ - constructor(properties?: vtctldata.ITabletExternallyReparentedResponse); - - /** TabletExternallyReparentedResponse keyspace. */ - public keyspace: string; - - /** TabletExternallyReparentedResponse shard. */ - public shard: string; - - /** TabletExternallyReparentedResponse new_primary. */ - public new_primary?: (topodata.ITabletAlias|null); - - /** TabletExternallyReparentedResponse old_primary. */ - public old_primary?: (topodata.ITabletAlias|null); - - /** - * Creates a new TabletExternallyReparentedResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TabletExternallyReparentedResponse instance - */ - public static create(properties?: vtctldata.ITabletExternallyReparentedResponse): vtctldata.TabletExternallyReparentedResponse; - - /** - * Encodes the specified TabletExternallyReparentedResponse message. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. - * @param message TabletExternallyReparentedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: vtctldata.ITabletExternallyReparentedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TabletExternallyReparentedResponse message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. - * @param message TabletExternallyReparentedResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: vtctldata.ITabletExternallyReparentedResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TabletExternallyReparentedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtctldata.TabletExternallyReparentedResponse; - - /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TabletExternallyReparentedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtctldata.TabletExternallyReparentedResponse; - - /** - * Verifies a TabletExternallyReparentedResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TabletExternallyReparentedResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TabletExternallyReparentedResponse - */ - public static fromObject(object: { [k: string]: any }): vtctldata.TabletExternallyReparentedResponse; - - /** - * Creates a plain object from a TabletExternallyReparentedResponse message. Also converts values to other types if specified. - * @param message TabletExternallyReparentedResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: vtctldata.TabletExternallyReparentedResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TabletExternallyReparentedResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } -} - -/** Namespace binlogdata. */ -export namespace binlogdata { - - /** Properties of a Charset. */ - interface ICharset { - - /** Charset client */ - client?: (number|null); - - /** Charset conn */ - conn?: (number|null); - - /** Charset server */ - server?: (number|null); - } - - /** Represents a Charset. */ - class Charset implements ICharset { - - /** - * Constructs a new Charset. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.ICharset); - - /** Charset client. */ - public client: number; - - /** Charset conn. */ - public conn: number; - - /** Charset server. */ - public server: number; - - /** - * Creates a new Charset instance using the specified properties. - * @param [properties] Properties to set - * @returns Charset instance - */ - public static create(properties?: binlogdata.ICharset): binlogdata.Charset; - - /** - * Encodes the specified Charset message. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. - * @param message Charset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.ICharset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Charset message, length delimited. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. - * @param message Charset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.ICharset, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Charset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Charset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Charset; - - /** - * Decodes a Charset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Charset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Charset; - - /** - * Verifies a Charset message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Charset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Charset - */ - public static fromObject(object: { [k: string]: any }): binlogdata.Charset; - - /** - * Creates a plain object from a Charset message. Also converts values to other types if specified. - * @param message Charset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.Charset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Charset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BinlogTransaction. */ - interface IBinlogTransaction { - - /** BinlogTransaction statements */ - statements?: (binlogdata.BinlogTransaction.IStatement[]|null); - - /** BinlogTransaction event_token */ - event_token?: (query.IEventToken|null); - } - - /** Represents a BinlogTransaction. */ - class BinlogTransaction implements IBinlogTransaction { - - /** - * Constructs a new BinlogTransaction. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IBinlogTransaction); - - /** BinlogTransaction statements. */ - public statements: binlogdata.BinlogTransaction.IStatement[]; - - /** BinlogTransaction event_token. */ - public event_token?: (query.IEventToken|null); - - /** - * Creates a new BinlogTransaction instance using the specified properties. - * @param [properties] Properties to set - * @returns BinlogTransaction instance - */ - public static create(properties?: binlogdata.IBinlogTransaction): binlogdata.BinlogTransaction; - - /** - * Encodes the specified BinlogTransaction message. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. - * @param message BinlogTransaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IBinlogTransaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BinlogTransaction message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. - * @param message BinlogTransaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IBinlogTransaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BinlogTransaction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BinlogTransaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogTransaction; - - /** - * Decodes a BinlogTransaction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BinlogTransaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogTransaction; - - /** - * Verifies a BinlogTransaction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BinlogTransaction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BinlogTransaction - */ - public static fromObject(object: { [k: string]: any }): binlogdata.BinlogTransaction; - - /** - * Creates a plain object from a BinlogTransaction message. Also converts values to other types if specified. - * @param message BinlogTransaction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.BinlogTransaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BinlogTransaction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace BinlogTransaction { - - /** Properties of a Statement. */ - interface IStatement { - - /** Statement category */ - category?: (binlogdata.BinlogTransaction.Statement.Category|null); - - /** Statement charset */ - charset?: (binlogdata.ICharset|null); - - /** Statement sql */ - sql?: (Uint8Array|null); - } - - /** Represents a Statement. */ - class Statement implements IStatement { - - /** - * Constructs a new Statement. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.BinlogTransaction.IStatement); - - /** Statement category. */ - public category: binlogdata.BinlogTransaction.Statement.Category; - - /** Statement charset. */ - public charset?: (binlogdata.ICharset|null); - - /** Statement sql. */ - public sql: Uint8Array; - - /** - * Creates a new Statement instance using the specified properties. - * @param [properties] Properties to set - * @returns Statement instance - */ - public static create(properties?: binlogdata.BinlogTransaction.IStatement): binlogdata.BinlogTransaction.Statement; - - /** - * Encodes the specified Statement message. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.BinlogTransaction.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @param message Statement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.BinlogTransaction.IStatement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogTransaction.Statement; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogTransaction.Statement; - - /** - * Verifies a Statement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Statement - */ - public static fromObject(object: { [k: string]: any }): binlogdata.BinlogTransaction.Statement; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @param message Statement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.BinlogTransaction.Statement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Statement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Statement { - - /** Category enum. */ - enum Category { - BL_UNRECOGNIZED = 0, - BL_BEGIN = 1, - BL_COMMIT = 2, - BL_ROLLBACK = 3, - BL_DML_DEPRECATED = 4, - BL_DDL = 5, - BL_SET = 6, - BL_INSERT = 7, - BL_UPDATE = 8, - BL_DELETE = 9 - } - } - } - - /** Properties of a StreamKeyRangeRequest. */ - interface IStreamKeyRangeRequest { - - /** StreamKeyRangeRequest position */ - position?: (string|null); - - /** StreamKeyRangeRequest key_range */ - key_range?: (topodata.IKeyRange|null); - - /** StreamKeyRangeRequest charset */ - charset?: (binlogdata.ICharset|null); - } - - /** Represents a StreamKeyRangeRequest. */ - class StreamKeyRangeRequest implements IStreamKeyRangeRequest { - - /** - * Constructs a new StreamKeyRangeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IStreamKeyRangeRequest); - - /** StreamKeyRangeRequest position. */ - public position: string; - - /** StreamKeyRangeRequest key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** StreamKeyRangeRequest charset. */ - public charset?: (binlogdata.ICharset|null); - - /** - * Creates a new StreamKeyRangeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamKeyRangeRequest instance - */ - public static create(properties?: binlogdata.IStreamKeyRangeRequest): binlogdata.StreamKeyRangeRequest; - - /** - * Encodes the specified StreamKeyRangeRequest message. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. - * @param message StreamKeyRangeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IStreamKeyRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamKeyRangeRequest message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. - * @param message StreamKeyRangeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IStreamKeyRangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamKeyRangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamKeyRangeRequest; - - /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamKeyRangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamKeyRangeRequest; - - /** - * Verifies a StreamKeyRangeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamKeyRangeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamKeyRangeRequest - */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamKeyRangeRequest; - - /** - * Creates a plain object from a StreamKeyRangeRequest message. Also converts values to other types if specified. - * @param message StreamKeyRangeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.StreamKeyRangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamKeyRangeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamKeyRangeResponse. */ - interface IStreamKeyRangeResponse { - - /** StreamKeyRangeResponse binlog_transaction */ - binlog_transaction?: (binlogdata.IBinlogTransaction|null); - } - - /** Represents a StreamKeyRangeResponse. */ - class StreamKeyRangeResponse implements IStreamKeyRangeResponse { - - /** - * Constructs a new StreamKeyRangeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IStreamKeyRangeResponse); - - /** StreamKeyRangeResponse binlog_transaction. */ - public binlog_transaction?: (binlogdata.IBinlogTransaction|null); - - /** - * Creates a new StreamKeyRangeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamKeyRangeResponse instance - */ - public static create(properties?: binlogdata.IStreamKeyRangeResponse): binlogdata.StreamKeyRangeResponse; - - /** - * Encodes the specified StreamKeyRangeResponse message. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. - * @param message StreamKeyRangeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IStreamKeyRangeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamKeyRangeResponse message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. - * @param message StreamKeyRangeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IStreamKeyRangeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamKeyRangeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamKeyRangeResponse; - - /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamKeyRangeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamKeyRangeResponse; - - /** - * Verifies a StreamKeyRangeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamKeyRangeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamKeyRangeResponse - */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamKeyRangeResponse; - - /** - * Creates a plain object from a StreamKeyRangeResponse message. Also converts values to other types if specified. - * @param message StreamKeyRangeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.StreamKeyRangeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamKeyRangeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamTablesRequest. */ - interface IStreamTablesRequest { - - /** StreamTablesRequest position */ - position?: (string|null); - - /** StreamTablesRequest tables */ - tables?: (string[]|null); - - /** StreamTablesRequest charset */ - charset?: (binlogdata.ICharset|null); - } - - /** Represents a StreamTablesRequest. */ - class StreamTablesRequest implements IStreamTablesRequest { - - /** - * Constructs a new StreamTablesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IStreamTablesRequest); - - /** StreamTablesRequest position. */ - public position: string; - - /** StreamTablesRequest tables. */ - public tables: string[]; - - /** StreamTablesRequest charset. */ - public charset?: (binlogdata.ICharset|null); - - /** - * Creates a new StreamTablesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamTablesRequest instance - */ - public static create(properties?: binlogdata.IStreamTablesRequest): binlogdata.StreamTablesRequest; - - /** - * Encodes the specified StreamTablesRequest message. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. - * @param message StreamTablesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IStreamTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamTablesRequest message, length delimited. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. - * @param message StreamTablesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IStreamTablesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamTablesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamTablesRequest; - - /** - * Decodes a StreamTablesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamTablesRequest; - - /** - * Verifies a StreamTablesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamTablesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamTablesRequest - */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamTablesRequest; - - /** - * Creates a plain object from a StreamTablesRequest message. Also converts values to other types if specified. - * @param message StreamTablesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.StreamTablesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamTablesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StreamTablesResponse. */ - interface IStreamTablesResponse { - - /** StreamTablesResponse binlog_transaction */ - binlog_transaction?: (binlogdata.IBinlogTransaction|null); - } - - /** Represents a StreamTablesResponse. */ - class StreamTablesResponse implements IStreamTablesResponse { - - /** - * Constructs a new StreamTablesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IStreamTablesResponse); - - /** StreamTablesResponse binlog_transaction. */ - public binlog_transaction?: (binlogdata.IBinlogTransaction|null); - - /** - * Creates a new StreamTablesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamTablesResponse instance - */ - public static create(properties?: binlogdata.IStreamTablesResponse): binlogdata.StreamTablesResponse; - - /** - * Encodes the specified StreamTablesResponse message. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. - * @param message StreamTablesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IStreamTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamTablesResponse message, length delimited. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. - * @param message StreamTablesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IStreamTablesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamTablesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.StreamTablesResponse; - - /** - * Decodes a StreamTablesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.StreamTablesResponse; - - /** - * Verifies a StreamTablesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamTablesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamTablesResponse - */ - public static fromObject(object: { [k: string]: any }): binlogdata.StreamTablesResponse; - - /** - * Creates a plain object from a StreamTablesResponse message. Also converts values to other types if specified. - * @param message StreamTablesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.StreamTablesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamTablesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Rule. */ - interface IRule { - - /** Rule match */ - match?: (string|null); - - /** Rule filter */ - filter?: (string|null); - } - - /** Represents a Rule. */ - class Rule implements IRule { - - /** - * Constructs a new Rule. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IRule); - - /** Rule match. */ - public match: string; - - /** Rule filter. */ - public filter: string; - - /** - * Creates a new Rule instance using the specified properties. - * @param [properties] Properties to set - * @returns Rule instance - */ - public static create(properties?: binlogdata.IRule): binlogdata.Rule; - - /** - * Encodes the specified Rule message. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. - * @param message Rule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Rule; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Rule; - - /** - * Verifies a Rule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Rule - */ - public static fromObject(object: { [k: string]: any }): binlogdata.Rule; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @param message Rule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.Rule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Rule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter rules */ - rules?: (binlogdata.IRule[]|null); - - /** Filter fieldEventMode */ - fieldEventMode?: (binlogdata.Filter.FieldEventMode|null); - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IFilter); - - /** Filter rules. */ - public rules: binlogdata.IRule[]; - - /** Filter fieldEventMode. */ - public fieldEventMode: binlogdata.Filter.FieldEventMode; - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: binlogdata.IFilter): binlogdata.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Filter; - - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): binlogdata.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Filter { - - /** FieldEventMode enum. */ - enum FieldEventMode { - ERR_ON_MISMATCH = 0, - BEST_EFFORT = 1 - } - } - - /** OnDDLAction enum. */ - enum OnDDLAction { - IGNORE = 0, - STOP = 1, - EXEC = 2, - EXEC_IGNORE = 3 - } - - /** Properties of a BinlogSource. */ - interface IBinlogSource { - - /** BinlogSource keyspace */ - keyspace?: (string|null); - - /** BinlogSource shard */ - shard?: (string|null); - - /** BinlogSource tablet_type */ - tablet_type?: (topodata.TabletType|null); - - /** BinlogSource key_range */ - key_range?: (topodata.IKeyRange|null); - - /** BinlogSource tables */ - tables?: (string[]|null); - - /** BinlogSource filter */ - filter?: (binlogdata.IFilter|null); - - /** BinlogSource on_ddl */ - on_ddl?: (binlogdata.OnDDLAction|null); - - /** BinlogSource external_mysql */ - external_mysql?: (string|null); - - /** BinlogSource stop_after_copy */ - stop_after_copy?: (boolean|null); - - /** BinlogSource external_cluster */ - external_cluster?: (string|null); - } - - /** Represents a BinlogSource. */ - class BinlogSource implements IBinlogSource { - - /** - * Constructs a new BinlogSource. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IBinlogSource); - - /** BinlogSource keyspace. */ - public keyspace: string; - - /** BinlogSource shard. */ - public shard: string; - - /** BinlogSource tablet_type. */ - public tablet_type: topodata.TabletType; - - /** BinlogSource key_range. */ - public key_range?: (topodata.IKeyRange|null); - - /** BinlogSource tables. */ - public tables: string[]; - - /** BinlogSource filter. */ - public filter?: (binlogdata.IFilter|null); - - /** BinlogSource on_ddl. */ - public on_ddl: binlogdata.OnDDLAction; - - /** BinlogSource external_mysql. */ - public external_mysql: string; - - /** BinlogSource stop_after_copy. */ - public stop_after_copy: boolean; - - /** BinlogSource external_cluster. */ - public external_cluster: string; - - /** - * Creates a new BinlogSource instance using the specified properties. - * @param [properties] Properties to set - * @returns BinlogSource instance - */ - public static create(properties?: binlogdata.IBinlogSource): binlogdata.BinlogSource; - - /** - * Encodes the specified BinlogSource message. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. - * @param message BinlogSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IBinlogSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BinlogSource message, length delimited. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. - * @param message BinlogSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IBinlogSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BinlogSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BinlogSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.BinlogSource; - - /** - * Decodes a BinlogSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BinlogSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.BinlogSource; - - /** - * Verifies a BinlogSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BinlogSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BinlogSource - */ - public static fromObject(object: { [k: string]: any }): binlogdata.BinlogSource; - - /** - * Creates a plain object from a BinlogSource message. Also converts values to other types if specified. - * @param message BinlogSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.BinlogSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BinlogSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** VEventType enum. */ - enum VEventType { - UNKNOWN = 0, - GTID = 1, - BEGIN = 2, - COMMIT = 3, - ROLLBACK = 4, - DDL = 5, - INSERT = 6, - REPLACE = 7, - UPDATE = 8, - DELETE = 9, - SET = 10, - OTHER = 11, - ROW = 12, - FIELD = 13, - HEARTBEAT = 14, - VGTID = 15, - JOURNAL = 16, - VERSION = 17, - LASTPK = 18, - SAVEPOINT = 19 - } - - /** Properties of a RowChange. */ - interface IRowChange { - - /** RowChange before */ - before?: (query.IRow|null); - - /** RowChange after */ - after?: (query.IRow|null); - } - - /** Represents a RowChange. */ - class RowChange implements IRowChange { - - /** - * Constructs a new RowChange. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IRowChange); - - /** RowChange before. */ - public before?: (query.IRow|null); - - /** RowChange after. */ - public after?: (query.IRow|null); - - /** - * Creates a new RowChange instance using the specified properties. - * @param [properties] Properties to set - * @returns RowChange instance - */ - public static create(properties?: binlogdata.IRowChange): binlogdata.RowChange; - - /** - * Encodes the specified RowChange message. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. - * @param message RowChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IRowChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RowChange message, length delimited. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. - * @param message RowChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IRowChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RowChange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RowChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.RowChange; - - /** - * Decodes a RowChange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RowChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.RowChange; - - /** - * Verifies a RowChange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RowChange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RowChange - */ - public static fromObject(object: { [k: string]: any }): binlogdata.RowChange; - - /** - * Creates a plain object from a RowChange message. Also converts values to other types if specified. - * @param message RowChange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.RowChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RowChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RowEvent. */ - interface IRowEvent { - - /** RowEvent table_name */ - table_name?: (string|null); - - /** RowEvent row_changes */ - row_changes?: (binlogdata.IRowChange[]|null); - } - - /** Represents a RowEvent. */ - class RowEvent implements IRowEvent { - - /** - * Constructs a new RowEvent. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IRowEvent); - - /** RowEvent table_name. */ - public table_name: string; - - /** RowEvent row_changes. */ - public row_changes: binlogdata.IRowChange[]; - - /** - * Creates a new RowEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns RowEvent instance - */ - public static create(properties?: binlogdata.IRowEvent): binlogdata.RowEvent; - - /** - * Encodes the specified RowEvent message. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. - * @param message RowEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IRowEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RowEvent message, length delimited. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. - * @param message RowEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IRowEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RowEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RowEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.RowEvent; - - /** - * Decodes a RowEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RowEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.RowEvent; - - /** - * Verifies a RowEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RowEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RowEvent - */ - public static fromObject(object: { [k: string]: any }): binlogdata.RowEvent; - - /** - * Creates a plain object from a RowEvent message. Also converts values to other types if specified. - * @param message RowEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.RowEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RowEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldEvent. */ - interface IFieldEvent { - - /** FieldEvent table_name */ - table_name?: (string|null); - - /** FieldEvent fields */ - fields?: (query.IField[]|null); - } - - /** Represents a FieldEvent. */ - class FieldEvent implements IFieldEvent { - - /** - * Constructs a new FieldEvent. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IFieldEvent); - - /** FieldEvent table_name. */ - public table_name: string; - - /** FieldEvent fields. */ - public fields: query.IField[]; - - /** - * Creates a new FieldEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldEvent instance - */ - public static create(properties?: binlogdata.IFieldEvent): binlogdata.FieldEvent; - - /** - * Encodes the specified FieldEvent message. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. - * @param message FieldEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IFieldEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldEvent message, length delimited. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. - * @param message FieldEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IFieldEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.FieldEvent; - - /** - * Decodes a FieldEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.FieldEvent; - - /** - * Verifies a FieldEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldEvent - */ - public static fromObject(object: { [k: string]: any }): binlogdata.FieldEvent; - - /** - * Creates a plain object from a FieldEvent message. Also converts values to other types if specified. - * @param message FieldEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.FieldEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ShardGtid. */ - interface IShardGtid { - - /** ShardGtid keyspace */ - keyspace?: (string|null); - - /** ShardGtid shard */ - shard?: (string|null); - - /** ShardGtid gtid */ - gtid?: (string|null); - - /** ShardGtid table_p_ks */ - table_p_ks?: (binlogdata.ITableLastPK[]|null); - } - - /** Represents a ShardGtid. */ - class ShardGtid implements IShardGtid { - - /** - * Constructs a new ShardGtid. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IShardGtid); - - /** ShardGtid keyspace. */ - public keyspace: string; - - /** ShardGtid shard. */ - public shard: string; - - /** ShardGtid gtid. */ - public gtid: string; - - /** ShardGtid table_p_ks. */ - public table_p_ks: binlogdata.ITableLastPK[]; - - /** - * Creates a new ShardGtid instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGtid instance - */ - public static create(properties?: binlogdata.IShardGtid): binlogdata.ShardGtid; - - /** - * Encodes the specified ShardGtid message. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. - * @param message ShardGtid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IShardGtid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardGtid message, length delimited. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. - * @param message ShardGtid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IShardGtid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardGtid message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.ShardGtid; - - /** - * Decodes a ShardGtid message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.ShardGtid; - - /** - * Verifies a ShardGtid message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ShardGtid message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGtid - */ - public static fromObject(object: { [k: string]: any }): binlogdata.ShardGtid; - - /** - * Creates a plain object from a ShardGtid message. Also converts values to other types if specified. - * @param message ShardGtid - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.ShardGtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardGtid to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VGtid. */ - interface IVGtid { - - /** VGtid shard_gtids */ - shard_gtids?: (binlogdata.IShardGtid[]|null); - } - - /** Represents a VGtid. */ - class VGtid implements IVGtid { - - /** - * Constructs a new VGtid. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IVGtid); - - /** VGtid shard_gtids. */ - public shard_gtids: binlogdata.IShardGtid[]; - - /** - * Creates a new VGtid instance using the specified properties. - * @param [properties] Properties to set - * @returns VGtid instance - */ - public static create(properties?: binlogdata.IVGtid): binlogdata.VGtid; - - /** - * Encodes the specified VGtid message. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. - * @param message VGtid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IVGtid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VGtid message, length delimited. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. - * @param message VGtid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IVGtid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VGtid message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VGtid; - - /** - * Decodes a VGtid message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VGtid; - - /** - * Verifies a VGtid message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VGtid message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VGtid - */ - public static fromObject(object: { [k: string]: any }): binlogdata.VGtid; - - /** - * Creates a plain object from a VGtid message. Also converts values to other types if specified. - * @param message VGtid - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.VGtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VGtid to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a KeyspaceShard. */ - interface IKeyspaceShard { - - /** KeyspaceShard keyspace */ - keyspace?: (string|null); - - /** KeyspaceShard shard */ - shard?: (string|null); - } - - /** Represents a KeyspaceShard. */ - class KeyspaceShard implements IKeyspaceShard { - - /** - * Constructs a new KeyspaceShard. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IKeyspaceShard); - - /** KeyspaceShard keyspace. */ - public keyspace: string; - - /** KeyspaceShard shard. */ - public shard: string; - - /** - * Creates a new KeyspaceShard instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyspaceShard instance - */ - public static create(properties?: binlogdata.IKeyspaceShard): binlogdata.KeyspaceShard; - - /** - * Encodes the specified KeyspaceShard message. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. - * @param message KeyspaceShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IKeyspaceShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyspaceShard message, length delimited. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. - * @param message KeyspaceShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IKeyspaceShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyspaceShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyspaceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.KeyspaceShard; - - /** - * Decodes a KeyspaceShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyspaceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.KeyspaceShard; - - /** - * Verifies a KeyspaceShard message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyspaceShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyspaceShard - */ - public static fromObject(object: { [k: string]: any }): binlogdata.KeyspaceShard; - - /** - * Creates a plain object from a KeyspaceShard message. Also converts values to other types if specified. - * @param message KeyspaceShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.KeyspaceShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyspaceShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** MigrationType enum. */ - enum MigrationType { - TABLES = 0, - SHARDS = 1 - } - - /** Properties of a Journal. */ - interface IJournal { - - /** Journal id */ - id?: (number|Long|null); - - /** Journal migration_type */ - migration_type?: (binlogdata.MigrationType|null); - - /** Journal tables */ - tables?: (string[]|null); - - /** Journal local_position */ - local_position?: (string|null); - - /** Journal shard_gtids */ - shard_gtids?: (binlogdata.IShardGtid[]|null); - - /** Journal participants */ - participants?: (binlogdata.IKeyspaceShard[]|null); - - /** Journal source_workflows */ - source_workflows?: (string[]|null); - } - - /** Represents a Journal. */ - class Journal implements IJournal { - - /** - * Constructs a new Journal. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IJournal); - - /** Journal id. */ - public id: (number|Long); - - /** Journal migration_type. */ - public migration_type: binlogdata.MigrationType; - - /** Journal tables. */ - public tables: string[]; - - /** Journal local_position. */ - public local_position: string; - - /** Journal shard_gtids. */ - public shard_gtids: binlogdata.IShardGtid[]; - - /** Journal participants. */ - public participants: binlogdata.IKeyspaceShard[]; - - /** Journal source_workflows. */ - public source_workflows: string[]; - - /** - * Creates a new Journal instance using the specified properties. - * @param [properties] Properties to set - * @returns Journal instance - */ - public static create(properties?: binlogdata.IJournal): binlogdata.Journal; - - /** - * Encodes the specified Journal message. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. - * @param message Journal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IJournal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Journal message, length delimited. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. - * @param message Journal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IJournal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Journal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Journal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.Journal; - - /** - * Decodes a Journal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Journal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.Journal; - - /** - * Verifies a Journal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Journal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Journal - */ - public static fromObject(object: { [k: string]: any }): binlogdata.Journal; - - /** - * Creates a plain object from a Journal message. Also converts values to other types if specified. - * @param message Journal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.Journal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Journal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VEvent. */ - interface IVEvent { - - /** VEvent type */ - type?: (binlogdata.VEventType|null); - - /** VEvent timestamp */ - timestamp?: (number|Long|null); - - /** VEvent gtid */ - gtid?: (string|null); - - /** VEvent statement */ - statement?: (string|null); - - /** VEvent row_event */ - row_event?: (binlogdata.IRowEvent|null); - - /** VEvent field_event */ - field_event?: (binlogdata.IFieldEvent|null); - - /** VEvent vgtid */ - vgtid?: (binlogdata.IVGtid|null); - - /** VEvent journal */ - journal?: (binlogdata.IJournal|null); - - /** VEvent dml */ - dml?: (string|null); - - /** VEvent current_time */ - current_time?: (number|Long|null); - - /** VEvent last_p_k_event */ - last_p_k_event?: (binlogdata.ILastPKEvent|null); - } - - /** Represents a VEvent. */ - class VEvent implements IVEvent { - - /** - * Constructs a new VEvent. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IVEvent); - - /** VEvent type. */ - public type: binlogdata.VEventType; - - /** VEvent timestamp. */ - public timestamp: (number|Long); - - /** VEvent gtid. */ - public gtid: string; - - /** VEvent statement. */ - public statement: string; - - /** VEvent row_event. */ - public row_event?: (binlogdata.IRowEvent|null); - - /** VEvent field_event. */ - public field_event?: (binlogdata.IFieldEvent|null); - - /** VEvent vgtid. */ - public vgtid?: (binlogdata.IVGtid|null); - - /** VEvent journal. */ - public journal?: (binlogdata.IJournal|null); - - /** VEvent dml. */ - public dml: string; - - /** VEvent current_time. */ - public current_time: (number|Long); - - /** VEvent last_p_k_event. */ - public last_p_k_event?: (binlogdata.ILastPKEvent|null); - - /** - * Creates a new VEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns VEvent instance - */ - public static create(properties?: binlogdata.IVEvent): binlogdata.VEvent; - - /** - * Encodes the specified VEvent message. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. - * @param message VEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IVEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VEvent message, length delimited. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. - * @param message VEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IVEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VEvent; - - /** - * Decodes a VEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VEvent; - - /** - * Verifies a VEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VEvent - */ - public static fromObject(object: { [k: string]: any }): binlogdata.VEvent; - - /** - * Creates a plain object from a VEvent message. Also converts values to other types if specified. - * @param message VEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.VEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MinimalTable. */ - interface IMinimalTable { - - /** MinimalTable name */ - name?: (string|null); - - /** MinimalTable fields */ - fields?: (query.IField[]|null); - - /** MinimalTable p_k_columns */ - p_k_columns?: ((number|Long)[]|null); - } - - /** Represents a MinimalTable. */ - class MinimalTable implements IMinimalTable { - - /** - * Constructs a new MinimalTable. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IMinimalTable); - - /** MinimalTable name. */ - public name: string; - - /** MinimalTable fields. */ - public fields: query.IField[]; - - /** MinimalTable p_k_columns. */ - public p_k_columns: (number|Long)[]; - - /** - * Creates a new MinimalTable instance using the specified properties. - * @param [properties] Properties to set - * @returns MinimalTable instance - */ - public static create(properties?: binlogdata.IMinimalTable): binlogdata.MinimalTable; - - /** - * Encodes the specified MinimalTable message. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. - * @param message MinimalTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IMinimalTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MinimalTable message, length delimited. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. - * @param message MinimalTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IMinimalTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MinimalTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MinimalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.MinimalTable; - - /** - * Decodes a MinimalTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MinimalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.MinimalTable; - - /** - * Verifies a MinimalTable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MinimalTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MinimalTable - */ - public static fromObject(object: { [k: string]: any }): binlogdata.MinimalTable; - - /** - * Creates a plain object from a MinimalTable message. Also converts values to other types if specified. - * @param message MinimalTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.MinimalTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MinimalTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MinimalSchema. */ - interface IMinimalSchema { - - /** MinimalSchema tables */ - tables?: (binlogdata.IMinimalTable[]|null); - } - - /** Represents a MinimalSchema. */ - class MinimalSchema implements IMinimalSchema { - - /** - * Constructs a new MinimalSchema. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IMinimalSchema); - - /** MinimalSchema tables. */ - public tables: binlogdata.IMinimalTable[]; - - /** - * Creates a new MinimalSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns MinimalSchema instance - */ - public static create(properties?: binlogdata.IMinimalSchema): binlogdata.MinimalSchema; - - /** - * Encodes the specified MinimalSchema message. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. - * @param message MinimalSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IMinimalSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MinimalSchema message, length delimited. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. - * @param message MinimalSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IMinimalSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MinimalSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MinimalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.MinimalSchema; - - /** - * Decodes a MinimalSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MinimalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.MinimalSchema; - - /** - * Verifies a MinimalSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MinimalSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MinimalSchema - */ - public static fromObject(object: { [k: string]: any }): binlogdata.MinimalSchema; - - /** - * Creates a plain object from a MinimalSchema message. Also converts values to other types if specified. - * @param message MinimalSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.MinimalSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MinimalSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VStreamRequest. */ - interface IVStreamRequest { - - /** VStreamRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRequest target */ - target?: (query.ITarget|null); - - /** VStreamRequest position */ - position?: (string|null); - - /** VStreamRequest filter */ - filter?: (binlogdata.IFilter|null); - - /** VStreamRequest table_last_p_ks */ - table_last_p_ks?: (binlogdata.ITableLastPK[]|null); - } - - /** Represents a VStreamRequest. */ - class VStreamRequest implements IVStreamRequest { - - /** - * Constructs a new VStreamRequest. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IVStreamRequest); - - /** VStreamRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRequest target. */ - public target?: (query.ITarget|null); - - /** VStreamRequest position. */ - public position: string; - - /** VStreamRequest filter. */ - public filter?: (binlogdata.IFilter|null); - - /** VStreamRequest table_last_p_ks. */ - public table_last_p_ks: binlogdata.ITableLastPK[]; - - /** - * Creates a new VStreamRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VStreamRequest instance - */ - public static create(properties?: binlogdata.IVStreamRequest): binlogdata.VStreamRequest; - - /** - * Encodes the specified VStreamRequest message. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. - * @param message VStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IVStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VStreamRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. - * @param message VStreamRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IVStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VStreamRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRequest; - - /** - * Decodes a VStreamRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRequest; - - /** - * Verifies a VStreamRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VStreamRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VStreamRequest - */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRequest; - - /** - * Creates a plain object from a VStreamRequest message. Also converts values to other types if specified. - * @param message VStreamRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.VStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VStreamRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VStreamResponse. */ - interface IVStreamResponse { - - /** VStreamResponse events */ - events?: (binlogdata.IVEvent[]|null); - } - - /** Represents a VStreamResponse. */ - class VStreamResponse implements IVStreamResponse { - - /** - * Constructs a new VStreamResponse. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IVStreamResponse); - - /** VStreamResponse events. */ - public events: binlogdata.IVEvent[]; - - /** - * Creates a new VStreamResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VStreamResponse instance - */ - public static create(properties?: binlogdata.IVStreamResponse): binlogdata.VStreamResponse; - - /** - * Encodes the specified VStreamResponse message. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. - * @param message VStreamResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IVStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VStreamResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. - * @param message VStreamResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IVStreamResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VStreamResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamResponse; - - /** - * Decodes a VStreamResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamResponse; - - /** - * Verifies a VStreamResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VStreamResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VStreamResponse - */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamResponse; - - /** - * Creates a plain object from a VStreamResponse message. Also converts values to other types if specified. - * @param message VStreamResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.VStreamResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VStreamResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VStreamRowsRequest. */ - interface IVStreamRowsRequest { - - /** VStreamRowsRequest effective_caller_id */ - effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRowsRequest immediate_caller_id */ - immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRowsRequest target */ - target?: (query.ITarget|null); - - /** VStreamRowsRequest query */ - query?: (string|null); - - /** VStreamRowsRequest lastpk */ - lastpk?: (query.IQueryResult|null); - } - - /** Represents a VStreamRowsRequest. */ - class VStreamRowsRequest implements IVStreamRowsRequest { - - /** - * Constructs a new VStreamRowsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IVStreamRowsRequest); - - /** VStreamRowsRequest effective_caller_id. */ - public effective_caller_id?: (vtrpc.ICallerID|null); - - /** VStreamRowsRequest immediate_caller_id. */ - public immediate_caller_id?: (query.IVTGateCallerID|null); - - /** VStreamRowsRequest target. */ - public target?: (query.ITarget|null); - - /** VStreamRowsRequest query. */ - public query: string; - - /** VStreamRowsRequest lastpk. */ - public lastpk?: (query.IQueryResult|null); - - /** - * Creates a new VStreamRowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VStreamRowsRequest instance - */ - public static create(properties?: binlogdata.IVStreamRowsRequest): binlogdata.VStreamRowsRequest; - - /** - * Encodes the specified VStreamRowsRequest message. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. - * @param message VStreamRowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IVStreamRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VStreamRowsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. - * @param message VStreamRowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IVStreamRowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VStreamRowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRowsRequest; - - /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VStreamRowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRowsRequest; - - /** - * Verifies a VStreamRowsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VStreamRowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VStreamRowsRequest - */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRowsRequest; - - /** - * Creates a plain object from a VStreamRowsRequest message. Also converts values to other types if specified. - * @param message VStreamRowsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.VStreamRowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VStreamRowsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VStreamRowsResponse. */ - interface IVStreamRowsResponse { - - /** VStreamRowsResponse fields */ - fields?: (query.IField[]|null); - - /** VStreamRowsResponse pkfields */ - pkfields?: (query.IField[]|null); - - /** VStreamRowsResponse gtid */ - gtid?: (string|null); - - /** VStreamRowsResponse rows */ - rows?: (query.IRow[]|null); - - /** VStreamRowsResponse lastpk */ - lastpk?: (query.IRow|null); - } - - /** Represents a VStreamRowsResponse. */ - class VStreamRowsResponse implements IVStreamRowsResponse { - - /** - * Constructs a new VStreamRowsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.IVStreamRowsResponse); - - /** VStreamRowsResponse fields. */ - public fields: query.IField[]; - - /** VStreamRowsResponse pkfields. */ - public pkfields: query.IField[]; - - /** VStreamRowsResponse gtid. */ - public gtid: string; - - /** VStreamRowsResponse rows. */ - public rows: query.IRow[]; - - /** VStreamRowsResponse lastpk. */ - public lastpk?: (query.IRow|null); - - /** - * Creates a new VStreamRowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VStreamRowsResponse instance - */ - public static create(properties?: binlogdata.IVStreamRowsResponse): binlogdata.VStreamRowsResponse; - - /** - * Encodes the specified VStreamRowsResponse message. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. - * @param message VStreamRowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.IVStreamRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VStreamRowsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. - * @param message VStreamRowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.IVStreamRowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VStreamRowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.VStreamRowsResponse; - - /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VStreamRowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.VStreamRowsResponse; - - /** - * Verifies a VStreamRowsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VStreamRowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VStreamRowsResponse - */ - public static fromObject(object: { [k: string]: any }): binlogdata.VStreamRowsResponse; - - /** - * Creates a plain object from a VStreamRowsResponse message. Also converts values to other types if specified. - * @param message VStreamRowsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.VStreamRowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VStreamRowsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LastPKEvent. */ - interface ILastPKEvent { - - /** LastPKEvent table_last_p_k */ - table_last_p_k?: (binlogdata.ITableLastPK|null); - - /** LastPKEvent completed */ - completed?: (boolean|null); - } - - /** Represents a LastPKEvent. */ - class LastPKEvent implements ILastPKEvent { - - /** - * Constructs a new LastPKEvent. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.ILastPKEvent); - - /** LastPKEvent table_last_p_k. */ - public table_last_p_k?: (binlogdata.ITableLastPK|null); - - /** LastPKEvent completed. */ - public completed: boolean; - - /** - * Creates a new LastPKEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns LastPKEvent instance - */ - public static create(properties?: binlogdata.ILastPKEvent): binlogdata.LastPKEvent; - - /** - * Encodes the specified LastPKEvent message. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. - * @param message LastPKEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.ILastPKEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LastPKEvent message, length delimited. Does not implicitly {@link binlogdata.LastPKEvent.verify|verify} messages. - * @param message LastPKEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.ILastPKEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LastPKEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LastPKEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.LastPKEvent; - - /** - * Decodes a LastPKEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LastPKEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): binlogdata.LastPKEvent; - - /** - * Verifies a LastPKEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LastPKEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LastPKEvent - */ - public static fromObject(object: { [k: string]: any }): binlogdata.LastPKEvent; - - /** - * Creates a plain object from a LastPKEvent message. Also converts values to other types if specified. - * @param message LastPKEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: binlogdata.LastPKEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LastPKEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TableLastPK. */ - interface ITableLastPK { - - /** TableLastPK table_name */ - table_name?: (string|null); - - /** TableLastPK lastpk */ - lastpk?: (query.IQueryResult|null); - } - - /** Represents a TableLastPK. */ - class TableLastPK implements ITableLastPK { - - /** - * Constructs a new TableLastPK. - * @param [properties] Properties to set - */ - constructor(properties?: binlogdata.ITableLastPK); - - /** TableLastPK table_name. */ - public table_name: string; - - /** TableLastPK lastpk. */ - public lastpk?: (query.IQueryResult|null); - - /** - * Creates a new TableLastPK instance using the specified properties. - * @param [properties] Properties to set - * @returns TableLastPK instance - */ - public static create(properties?: binlogdata.ITableLastPK): binlogdata.TableLastPK; - - /** - * Encodes the specified TableLastPK message. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. - * @param message TableLastPK message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: binlogdata.ITableLastPK, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableLastPK message, length delimited. Does not implicitly {@link binlogdata.TableLastPK.verify|verify} messages. - * @param message TableLastPK message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: binlogdata.ITableLastPK, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ServedType. */ + class ServedType implements IServedType { - /** - * Decodes a TableLastPK message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableLastPK - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): binlogdata.TableLastPK; + /** + * Constructs a new ServedType. + * @param [properties] Properties to set + */ + constructor(properties?: topodata.Shard.IServedType); /** ServedType tablet_type. */ public tablet_type: topodata.TabletType; @@ -31167,10 +1420,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.Shard.IServedType, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.Shard.IServedType, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ServedType message from the specified reader or buffer. @@ -31180,7 +1430,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Shard.ServedType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard.ServedType; /** * Decodes a ServedType message from the specified reader or buffer, length delimited. @@ -31189,14 +1439,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Shard.ServedType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard.ServedType; /** * Verifies a ServedType message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a ServedType message from a plain object. Also converts values to their respective internal types. @@ -31211,10 +1461,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.Shard.ServedType, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.Shard.ServedType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ServedType to JSON. @@ -31225,24 +1472,26 @@ export namespace binlogdata { /** Properties of a SourceShard. */ interface ISourceShard { + /** SourceShard uid */ - uid?: number | null; + uid?: (number|null); /** SourceShard keyspace */ - keyspace?: string | null; + keyspace?: (string|null); /** SourceShard shard */ - shard?: string | null; + shard?: (string|null); /** SourceShard key_range */ - key_range?: topodata.IKeyRange | null; + key_range?: (topodata.IKeyRange|null); /** SourceShard tables */ - tables?: string[] | null; + tables?: (string[]|null); } /** Represents a SourceShard. */ class SourceShard implements ISourceShard { + /** * Constructs a new SourceShard. * @param [properties] Properties to set @@ -31259,7 +1508,7 @@ export namespace binlogdata { public shard: string; /** SourceShard key_range. */ - public key_range?: topodata.IKeyRange | null; + public key_range?: (topodata.IKeyRange|null); /** SourceShard tables. */ public tables: string[]; @@ -31285,10 +1534,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.Shard.ISourceShard, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.Shard.ISourceShard, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SourceShard message from the specified reader or buffer. @@ -31298,7 +1544,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Shard.SourceShard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard.SourceShard; /** * Decodes a SourceShard message from the specified reader or buffer, length delimited. @@ -31307,14 +1553,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Shard.SourceShard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard.SourceShard; /** * Verifies a SourceShard message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SourceShard message from a plain object. Also converts values to their respective internal types. @@ -31329,10 +1575,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.Shard.SourceShard, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.Shard.SourceShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SourceShard to JSON. @@ -31343,21 +1586,23 @@ export namespace binlogdata { /** Properties of a TabletControl. */ interface ITabletControl { + /** TabletControl tablet_type */ - tablet_type?: topodata.TabletType | null; + tablet_type?: (topodata.TabletType|null); /** TabletControl cells */ - cells?: string[] | null; + cells?: (string[]|null); /** TabletControl blacklisted_tables */ - blacklisted_tables?: string[] | null; + blacklisted_tables?: (string[]|null); /** TabletControl frozen */ - frozen?: boolean | null; + frozen?: (boolean|null); } /** Represents a TabletControl. */ class TabletControl implements ITabletControl { + /** * Constructs a new TabletControl. * @param [properties] Properties to set @@ -31397,10 +1642,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.Shard.ITabletControl, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.Shard.ITabletControl, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a TabletControl message from the specified reader or buffer. @@ -31410,7 +1652,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Shard.TabletControl; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Shard.TabletControl; /** * Decodes a TabletControl message from the specified reader or buffer, length delimited. @@ -31419,14 +1661,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Shard.TabletControl; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Shard.TabletControl; /** * Verifies a TabletControl message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a TabletControl message from a plain object. Also converts values to their respective internal types. @@ -31441,10 +1683,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.Shard.TabletControl, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.Shard.TabletControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this TabletControl to JSON. @@ -31456,27 +1695,29 @@ export namespace binlogdata { /** Properties of a Keyspace. */ interface IKeyspace { + /** Keyspace sharding_column_name */ - sharding_column_name?: string | null; + sharding_column_name?: (string|null); /** Keyspace sharding_column_type */ - sharding_column_type?: topodata.KeyspaceIdType | null; + sharding_column_type?: (topodata.KeyspaceIdType|null); /** Keyspace served_froms */ - served_froms?: topodata.Keyspace.IServedFrom[] | null; + served_froms?: (topodata.Keyspace.IServedFrom[]|null); /** Keyspace keyspace_type */ - keyspace_type?: topodata.KeyspaceType | null; + keyspace_type?: (topodata.KeyspaceType|null); /** Keyspace base_keyspace */ - base_keyspace?: string | null; + base_keyspace?: (string|null); /** Keyspace snapshot_time */ - snapshot_time?: vttime.ITime | null; + snapshot_time?: (vttime.ITime|null); } /** Represents a Keyspace. */ class Keyspace implements IKeyspace { + /** * Constructs a new Keyspace. * @param [properties] Properties to set @@ -31499,7 +1740,7 @@ export namespace binlogdata { public base_keyspace: string; /** Keyspace snapshot_time. */ - public snapshot_time?: vttime.ITime | null; + public snapshot_time?: (vttime.ITime|null); /** * Creates a new Keyspace instance using the specified properties. @@ -31532,7 +1773,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Keyspace; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Keyspace; /** * Decodes a Keyspace message from the specified reader or buffer, length delimited. @@ -31541,14 +1782,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Keyspace; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Keyspace; /** * Verifies a Keyspace message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. @@ -31563,10 +1804,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.Keyspace, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Keyspace to JSON. @@ -31576,20 +1814,23 @@ export namespace binlogdata { } namespace Keyspace { + /** Properties of a ServedFrom. */ interface IServedFrom { + /** ServedFrom tablet_type */ - tablet_type?: topodata.TabletType | null; + tablet_type?: (topodata.TabletType|null); /** ServedFrom cells */ - cells?: string[] | null; + cells?: (string[]|null); /** ServedFrom keyspace */ - keyspace?: string | null; + keyspace?: (string|null); } /** Represents a ServedFrom. */ class ServedFrom implements IServedFrom { + /** * Constructs a new ServedFrom. * @param [properties] Properties to set @@ -31626,10 +1867,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.Keyspace.IServedFrom, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.Keyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ServedFrom message from the specified reader or buffer. @@ -31639,7 +1877,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.Keyspace.ServedFrom; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.Keyspace.ServedFrom; /** * Decodes a ServedFrom message from the specified reader or buffer, length delimited. @@ -31648,14 +1886,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.Keyspace.ServedFrom; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.Keyspace.ServedFrom; /** * Verifies a ServedFrom message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a ServedFrom message from a plain object. Also converts values to their respective internal types. @@ -31670,10 +1908,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.Keyspace.ServedFrom, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.Keyspace.ServedFrom, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ServedFrom to JSON. @@ -31685,12 +1920,14 @@ export namespace binlogdata { /** Properties of a ShardReplication. */ interface IShardReplication { + /** ShardReplication nodes */ - nodes?: topodata.ShardReplication.INode[] | null; + nodes?: (topodata.ShardReplication.INode[]|null); } /** Represents a ShardReplication. */ class ShardReplication implements IShardReplication { + /** * Constructs a new ShardReplication. * @param [properties] Properties to set @@ -31731,7 +1968,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.ShardReplication; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardReplication; /** * Decodes a ShardReplication message from the specified reader or buffer, length delimited. @@ -31740,14 +1977,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.ShardReplication; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardReplication; /** * Verifies a ShardReplication message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a ShardReplication message from a plain object. Also converts values to their respective internal types. @@ -31762,10 +1999,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.ShardReplication, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.ShardReplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ShardReplication to JSON. @@ -31775,14 +2009,17 @@ export namespace binlogdata { } namespace ShardReplication { + /** Properties of a Node. */ interface INode { + /** Node tablet_alias */ - tablet_alias?: topodata.ITabletAlias | null; + tablet_alias?: (topodata.ITabletAlias|null); } /** Represents a Node. */ class Node implements INode { + /** * Constructs a new Node. * @param [properties] Properties to set @@ -31790,7 +2027,7 @@ export namespace binlogdata { constructor(properties?: topodata.ShardReplication.INode); /** Node tablet_alias. */ - public tablet_alias?: topodata.ITabletAlias | null; + public tablet_alias?: (topodata.ITabletAlias|null); /** * Creates a new Node instance using the specified properties. @@ -31813,10 +2050,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.ShardReplication.INode, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.ShardReplication.INode, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Node message from the specified reader or buffer. @@ -31826,10 +2060,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): topodata.ShardReplication.Node; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardReplication.Node; /** * Decodes a Node message from the specified reader or buffer, length delimited. @@ -31838,14 +2069,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.ShardReplication.Node; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardReplication.Node; /** * Verifies a Node message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Node message from a plain object. Also converts values to their respective internal types. @@ -31860,10 +2091,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.ShardReplication.Node, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.ShardReplication.Node, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Node to JSON. @@ -31875,15 +2103,17 @@ export namespace binlogdata { /** Properties of a ShardReference. */ interface IShardReference { + /** ShardReference name */ - name?: string | null; + name?: (string|null); /** ShardReference key_range */ - key_range?: topodata.IKeyRange | null; + key_range?: (topodata.IKeyRange|null); } /** Represents a ShardReference. */ class ShardReference implements IShardReference { + /** * Constructs a new ShardReference. * @param [properties] Properties to set @@ -31894,7 +2124,7 @@ export namespace binlogdata { public name: string; /** ShardReference key_range. */ - public key_range?: topodata.IKeyRange | null; + public key_range?: (topodata.IKeyRange|null); /** * Creates a new ShardReference instance using the specified properties. @@ -31927,7 +2157,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.ShardReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardReference; /** * Decodes a ShardReference message from the specified reader or buffer, length delimited. @@ -31936,14 +2166,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.ShardReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardReference; /** * Verifies a ShardReference message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a ShardReference message from a plain object. Also converts values to their respective internal types. @@ -31958,10 +2188,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.ShardReference, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.ShardReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ShardReference to JSON. @@ -31972,18 +2199,20 @@ export namespace binlogdata { /** Properties of a ShardTabletControl. */ interface IShardTabletControl { + /** ShardTabletControl name */ - name?: string | null; + name?: (string|null); /** ShardTabletControl key_range */ - key_range?: topodata.IKeyRange | null; + key_range?: (topodata.IKeyRange|null); /** ShardTabletControl query_service_disabled */ - query_service_disabled?: boolean | null; + query_service_disabled?: (boolean|null); } /** Represents a ShardTabletControl. */ class ShardTabletControl implements IShardTabletControl { + /** * Constructs a new ShardTabletControl. * @param [properties] Properties to set @@ -31994,7 +2223,7 @@ export namespace binlogdata { public name: string; /** ShardTabletControl key_range. */ - public key_range?: topodata.IKeyRange | null; + public key_range?: (topodata.IKeyRange|null); /** ShardTabletControl query_service_disabled. */ public query_service_disabled: boolean; @@ -32020,10 +2249,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.IShardTabletControl, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.IShardTabletControl, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ShardTabletControl message from the specified reader or buffer. @@ -32033,7 +2259,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.ShardTabletControl; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.ShardTabletControl; /** * Decodes a ShardTabletControl message from the specified reader or buffer, length delimited. @@ -32042,14 +2268,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.ShardTabletControl; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.ShardTabletControl; /** * Verifies a ShardTabletControl message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a ShardTabletControl message from a plain object. Also converts values to their respective internal types. @@ -32064,10 +2290,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.ShardTabletControl, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.ShardTabletControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ShardTabletControl to JSON. @@ -32078,21 +2301,23 @@ export namespace binlogdata { /** Properties of a SrvKeyspace. */ interface ISrvKeyspace { + /** SrvKeyspace partitions */ - partitions?: topodata.SrvKeyspace.IKeyspacePartition[] | null; + partitions?: (topodata.SrvKeyspace.IKeyspacePartition[]|null); /** SrvKeyspace sharding_column_name */ - sharding_column_name?: string | null; + sharding_column_name?: (string|null); /** SrvKeyspace sharding_column_type */ - sharding_column_type?: topodata.KeyspaceIdType | null; + sharding_column_type?: (topodata.KeyspaceIdType|null); /** SrvKeyspace served_from */ - served_from?: topodata.SrvKeyspace.IServedFrom[] | null; + served_from?: (topodata.SrvKeyspace.IServedFrom[]|null); } /** Represents a SrvKeyspace. */ class SrvKeyspace implements ISrvKeyspace { + /** * Constructs a new SrvKeyspace. * @param [properties] Properties to set @@ -32142,7 +2367,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.SrvKeyspace; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.SrvKeyspace; /** * Decodes a SrvKeyspace message from the specified reader or buffer, length delimited. @@ -32151,14 +2376,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.SrvKeyspace; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.SrvKeyspace; /** * Verifies a SrvKeyspace message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SrvKeyspace message from a plain object. Also converts values to their respective internal types. @@ -32173,10 +2398,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.SrvKeyspace, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.SrvKeyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SrvKeyspace to JSON. @@ -32186,20 +2408,23 @@ export namespace binlogdata { } namespace SrvKeyspace { + /** Properties of a KeyspacePartition. */ interface IKeyspacePartition { + /** KeyspacePartition served_type */ - served_type?: topodata.TabletType | null; + served_type?: (topodata.TabletType|null); /** KeyspacePartition shard_references */ - shard_references?: topodata.IShardReference[] | null; + shard_references?: (topodata.IShardReference[]|null); /** KeyspacePartition shard_tablet_controls */ - shard_tablet_controls?: topodata.IShardTabletControl[] | null; + shard_tablet_controls?: (topodata.IShardTabletControl[]|null); } /** Represents a KeyspacePartition. */ class KeyspacePartition implements IKeyspacePartition { + /** * Constructs a new KeyspacePartition. * @param [properties] Properties to set @@ -32220,9 +2445,7 @@ export namespace binlogdata { * @param [properties] Properties to set * @returns KeyspacePartition instance */ - public static create( - properties?: topodata.SrvKeyspace.IKeyspacePartition - ): topodata.SrvKeyspace.KeyspacePartition; + public static create(properties?: topodata.SrvKeyspace.IKeyspacePartition): topodata.SrvKeyspace.KeyspacePartition; /** * Encodes the specified KeyspacePartition message. Does not implicitly {@link topodata.SrvKeyspace.KeyspacePartition.verify|verify} messages. @@ -32230,10 +2453,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: topodata.SrvKeyspace.IKeyspacePartition, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encode(message: topodata.SrvKeyspace.IKeyspacePartition, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified KeyspacePartition message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.KeyspacePartition.verify|verify} messages. @@ -32241,10 +2461,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.SrvKeyspace.IKeyspacePartition, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.SrvKeyspace.IKeyspacePartition, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a KeyspacePartition message from the specified reader or buffer. @@ -32254,10 +2471,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): topodata.SrvKeyspace.KeyspacePartition; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.SrvKeyspace.KeyspacePartition; /** * Decodes a KeyspacePartition message from the specified reader or buffer, length delimited. @@ -32266,16 +2480,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array - ): topodata.SrvKeyspace.KeyspacePartition; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.SrvKeyspace.KeyspacePartition; /** * Verifies a KeyspacePartition message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a KeyspacePartition message from a plain object. Also converts values to their respective internal types. @@ -32290,10 +2502,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.SrvKeyspace.KeyspacePartition, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.SrvKeyspace.KeyspacePartition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this KeyspacePartition to JSON. @@ -32304,15 +2513,17 @@ export namespace binlogdata { /** Properties of a ServedFrom. */ interface IServedFrom { + /** ServedFrom tablet_type */ - tablet_type?: topodata.TabletType | null; + tablet_type?: (topodata.TabletType|null); /** ServedFrom keyspace */ - keyspace?: string | null; + keyspace?: (string|null); } /** Represents a ServedFrom. */ class ServedFrom implements IServedFrom { + /** * Constructs a new ServedFrom. * @param [properties] Properties to set @@ -32338,10 +2549,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encode( - message: topodata.SrvKeyspace.IServedFrom, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encode(message: topodata.SrvKeyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified ServedFrom message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.ServedFrom.verify|verify} messages. @@ -32349,10 +2557,7 @@ export namespace binlogdata { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited( - message: topodata.SrvKeyspace.IServedFrom, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: topodata.SrvKeyspace.IServedFrom, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ServedFrom message from the specified reader or buffer. @@ -32362,10 +2567,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number - ): topodata.SrvKeyspace.ServedFrom; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.SrvKeyspace.ServedFrom; /** * Decodes a ServedFrom message from the specified reader or buffer, length delimited. @@ -32374,14 +2576,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.SrvKeyspace.ServedFrom; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.SrvKeyspace.ServedFrom; /** * Verifies a ServedFrom message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a ServedFrom message from a plain object. Also converts values to their respective internal types. @@ -32396,10 +2598,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.SrvKeyspace.ServedFrom, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.SrvKeyspace.ServedFrom, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ServedFrom to JSON. @@ -32411,15 +2610,17 @@ export namespace binlogdata { /** Properties of a CellInfo. */ interface ICellInfo { + /** CellInfo server_address */ - server_address?: string | null; + server_address?: (string|null); /** CellInfo root */ - root?: string | null; + root?: (string|null); } /** Represents a CellInfo. */ class CellInfo implements ICellInfo { + /** * Constructs a new CellInfo. * @param [properties] Properties to set @@ -32463,7 +2664,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.CellInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.CellInfo; /** * Decodes a CellInfo message from the specified reader or buffer, length delimited. @@ -32472,14 +2673,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.CellInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.CellInfo; /** * Verifies a CellInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a CellInfo message from a plain object. Also converts values to their respective internal types. @@ -32494,10 +2695,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.CellInfo, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.CellInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CellInfo to JSON. @@ -32508,12 +2706,14 @@ export namespace binlogdata { /** Properties of a CellsAlias. */ interface ICellsAlias { + /** CellsAlias cells */ - cells?: string[] | null; + cells?: (string[]|null); } /** Represents a CellsAlias. */ class CellsAlias implements ICellsAlias { + /** * Constructs a new CellsAlias. * @param [properties] Properties to set @@ -32554,7 +2754,7 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): topodata.CellsAlias; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): topodata.CellsAlias; /** * Decodes a CellsAlias message from the specified reader or buffer, length delimited. @@ -32563,14 +2763,14 @@ export namespace binlogdata { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): topodata.CellsAlias; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): topodata.CellsAlias; /** * Verifies a CellsAlias message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a CellsAlias message from a plain object. Also converts values to their respective internal types. @@ -32585,10 +2785,7 @@ export namespace binlogdata { * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.CellsAlias, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: topodata.CellsAlias, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CellsAlias to JSON. @@ -32600,17 +2797,20 @@ export namespace binlogdata { /** Namespace vttime. */ export namespace vttime { + /** Properties of a Time. */ interface ITime { + /** Time seconds */ - seconds?: number | Long | null; + seconds?: (number|Long|null); /** Time nanoseconds */ - nanoseconds?: number | null; + nanoseconds?: (number|null); } /** Represents a Time. */ class Time implements ITime { + /** * Constructs a new Time. * @param [properties] Properties to set @@ -32618,7 +2818,7 @@ export namespace vttime { constructor(properties?: vttime.ITime); /** Time seconds. */ - public seconds: number | Long; + public seconds: (number|Long); /** Time nanoseconds. */ public nanoseconds: number; @@ -32654,7 +2854,7 @@ export namespace vttime { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): vttime.Time; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vttime.Time; /** * Decodes a Time message from the specified reader or buffer, length delimited. @@ -32663,14 +2863,14 @@ export namespace vttime { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): vttime.Time; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vttime.Time; /** * Verifies a Time message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ - public static verify(message: { [k: string]: any }): string | null; + public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Time message from a plain object. Also converts values to their respective internal types. @@ -32693,4 +2893,100 @@ export namespace vttime { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: vttime.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: vttime.IDuration): vttime.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link vttime.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vttime.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link vttime.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vttime.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vttime.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vttime.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): vttime.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vttime.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 42be5303476..319b629ba4d 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -1,17 +1,16 @@ /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -'use strict'; +"use strict"; -var $protobuf = require('protobufjs/minimal'); +var $protobuf = require("protobufjs/minimal"); // Common aliases -var $Reader = $protobuf.Reader, - $Writer = $protobuf.Writer, - $util = $protobuf.util; +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace -var $root = $protobuf.roots['default'] || ($protobuf.roots['default'] = {}); +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.vtadmin = (function() { -$root.vtadmin = (function () { /** * Namespace vtadmin. * @exports vtadmin @@ -19,7 +18,8 @@ $root.vtadmin = (function () { */ var vtadmin = {}; - vtadmin.VTAdmin = (function () { + vtadmin.VTAdmin = (function() { + /** * Constructs a new VTAdmin service. * @memberof vtadmin @@ -69,19 +69,9 @@ $root.vtadmin = (function () { * @returns {undefined} * @variation 1 */ - Object.defineProperty( - (VTAdmin.prototype.getGates = function getGates(request, callback) { - return this.rpcCall( - getGates, - $root.vtadmin.GetGatesRequest, - $root.vtadmin.GetGatesResponse, - request, - callback - ); - }), - 'name', - { value: 'GetGates' } - ); + Object.defineProperty(VTAdmin.prototype.getGates = function getGates(request, callback) { + return this.rpcCall(getGates, $root.vtadmin.GetGatesRequest, $root.vtadmin.GetGatesResponse, request, callback); + }, "name", { value: "GetGates" }); /** * Calls GetGates. @@ -112,13 +102,9 @@ $root.vtadmin = (function () { * @returns {undefined} * @variation 1 */ - Object.defineProperty( - (VTAdmin.prototype.getTablet = function getTablet(request, callback) { - return this.rpcCall(getTablet, $root.vtadmin.GetTabletRequest, $root.vtadmin.Tablet, request, callback); - }), - 'name', - { value: 'GetTablet' } - ); + Object.defineProperty(VTAdmin.prototype.getTablet = function getTablet(request, callback) { + return this.rpcCall(getTablet, $root.vtadmin.GetTabletRequest, $root.vtadmin.Tablet, request, callback); + }, "name", { value: "GetTablet" }); /** * Calls GetTablet. @@ -149,19 +135,9 @@ $root.vtadmin = (function () { * @returns {undefined} * @variation 1 */ - Object.defineProperty( - (VTAdmin.prototype.getTablets = function getTablets(request, callback) { - return this.rpcCall( - getTablets, - $root.vtadmin.GetTabletsRequest, - $root.vtadmin.GetTabletsResponse, - request, - callback - ); - }), - 'name', - { value: 'GetTablets' } - ); + Object.defineProperty(VTAdmin.prototype.getTablets = function getTablets(request, callback) { + return this.rpcCall(getTablets, $root.vtadmin.GetTabletsRequest, $root.vtadmin.GetTabletsResponse, request, callback); + }, "name", { value: "GetTablets" }); /** * Calls GetTablets. @@ -176,7 +152,8 @@ $root.vtadmin = (function () { return VTAdmin; })(); - vtadmin.Cluster = (function () { + vtadmin.Cluster = (function() { + /** * Properties of a Cluster. * @memberof vtadmin @@ -196,7 +173,8 @@ $root.vtadmin = (function () { function Cluster(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -205,7 +183,7 @@ $root.vtadmin = (function () { * @memberof vtadmin.Cluster * @instance */ - Cluster.prototype.id = ''; + Cluster.prototype.id = ""; /** * Cluster name. @@ -213,7 +191,7 @@ $root.vtadmin = (function () { * @memberof vtadmin.Cluster * @instance */ - Cluster.prototype.name = ''; + Cluster.prototype.name = ""; /** * Creates a new Cluster instance using the specified properties. @@ -237,11 +215,12 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ Cluster.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, 'id')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, 'name')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); return writer; }; @@ -270,21 +249,21 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Cluster.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.Cluster(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.Cluster(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.id = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -301,7 +280,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Cluster.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -314,11 +294,14 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Cluster.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.id != null && message.hasOwnProperty('id')) - if (!$util.isString(message.id)) return 'id: string expected'; - if (message.name != null && message.hasOwnProperty('name')) - if (!$util.isString(message.name)) return 'name: string expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; @@ -331,10 +314,13 @@ $root.vtadmin = (function () { * @returns {vtadmin.Cluster} Cluster */ Cluster.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.Cluster) return object; + if (object instanceof $root.vtadmin.Cluster) + return object; var message = new $root.vtadmin.Cluster(); - if (object.id != null) message.id = String(object.id); - if (object.name != null) message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); return message; }; @@ -348,14 +334,17 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ Cluster.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.id = ''; - object.name = ''; + object.id = ""; + object.name = ""; } - if (message.id != null && message.hasOwnProperty('id')) object.id = message.id; - if (message.name != null && message.hasOwnProperty('name')) object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -373,7 +362,8 @@ $root.vtadmin = (function () { return Cluster; })(); - vtadmin.Tablet = (function () { + vtadmin.Tablet = (function() { + /** * Properties of a Tablet. * @memberof vtadmin @@ -394,7 +384,8 @@ $root.vtadmin = (function () { function Tablet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -443,16 +434,14 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ Tablet.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.cluster != null && Object.hasOwnProperty.call(message, 'cluster')) - $root.vtadmin.Cluster.encode( - message.cluster, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); - if (message.tablet != null && Object.hasOwnProperty.call(message, 'tablet')) - $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, 'state')) - writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.state); + if (!writer) + writer = $Writer.create(); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.vtadmin.Cluster.encode(message.cluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) + $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); return writer; }; @@ -481,24 +470,24 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Tablet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.Tablet(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.Tablet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cluster = $root.vtadmin.Cluster.decode(reader, reader.uint32()); - break; - case 2: - message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); - break; - case 3: - message.state = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.cluster = $root.vtadmin.Cluster.decode(reader, reader.uint32()); + break; + case 2: + message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); + break; + case 3: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -515,7 +504,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Tablet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -528,23 +518,26 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Tablet.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.cluster != null && message.hasOwnProperty('cluster')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) { var error = $root.vtadmin.Cluster.verify(message.cluster); - if (error) return 'cluster.' + error; + if (error) + return "cluster." + error; } - if (message.tablet != null && message.hasOwnProperty('tablet')) { + if (message.tablet != null && message.hasOwnProperty("tablet")) { var error = $root.topodata.Tablet.verify(message.tablet); - if (error) return 'tablet.' + error; + if (error) + return "tablet." + error; } - if (message.state != null && message.hasOwnProperty('state')) + if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { - default: - return 'state: enum value expected'; - case 0: - case 1: - case 2: - break; + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; } return null; }; @@ -558,29 +551,32 @@ $root.vtadmin = (function () { * @returns {vtadmin.Tablet} Tablet */ Tablet.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.Tablet) return object; + if (object instanceof $root.vtadmin.Tablet) + return object; var message = new $root.vtadmin.Tablet(); if (object.cluster != null) { - if (typeof object.cluster !== 'object') throw TypeError('.vtadmin.Tablet.cluster: object expected'); + if (typeof object.cluster !== "object") + throw TypeError(".vtadmin.Tablet.cluster: object expected"); message.cluster = $root.vtadmin.Cluster.fromObject(object.cluster); } if (object.tablet != null) { - if (typeof object.tablet !== 'object') throw TypeError('.vtadmin.Tablet.tablet: object expected'); + if (typeof object.tablet !== "object") + throw TypeError(".vtadmin.Tablet.tablet: object expected"); message.tablet = $root.topodata.Tablet.fromObject(object.tablet); } switch (object.state) { - case 'UNKNOWN': - case 0: - message.state = 0; - break; - case 'SERVING': - case 1: - message.state = 1; - break; - case 'NOT_SERVING': - case 2: - message.state = 2; - break; + case "UNKNOWN": + case 0: + message.state = 0; + break; + case "SERVING": + case 1: + message.state = 1; + break; + case "NOT_SERVING": + case 2: + message.state = 2; + break; } return message; }; @@ -595,20 +591,20 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ Tablet.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { object.cluster = null; object.tablet = null; - object.state = options.enums === String ? 'UNKNOWN' : 0; + object.state = options.enums === String ? "UNKNOWN" : 0; } - if (message.cluster != null && message.hasOwnProperty('cluster')) + if (message.cluster != null && message.hasOwnProperty("cluster")) object.cluster = $root.vtadmin.Cluster.toObject(message.cluster, options); - if (message.tablet != null && message.hasOwnProperty('tablet')) + if (message.tablet != null && message.hasOwnProperty("tablet")) object.tablet = $root.topodata.Tablet.toObject(message.tablet, options); - if (message.state != null && message.hasOwnProperty('state')) - object.state = - options.enums === String ? $root.vtadmin.Tablet.ServingState[message.state] : message.state; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.vtadmin.Tablet.ServingState[message.state] : message.state; return object; }; @@ -631,19 +627,19 @@ $root.vtadmin = (function () { * @property {number} SERVING=1 SERVING value * @property {number} NOT_SERVING=2 NOT_SERVING value */ - Tablet.ServingState = (function () { - var valuesById = {}, - values = Object.create(valuesById); - values[(valuesById[0] = 'UNKNOWN')] = 0; - values[(valuesById[1] = 'SERVING')] = 1; - values[(valuesById[2] = 'NOT_SERVING')] = 2; + Tablet.ServingState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "SERVING"] = 1; + values[valuesById[2] = "NOT_SERVING"] = 2; return values; })(); return Tablet; })(); - vtadmin.VTGate = (function () { + vtadmin.VTGate = (function() { + /** * Properties of a VTGate. * @memberof vtadmin @@ -651,7 +647,7 @@ $root.vtadmin = (function () { * @property {string|null} [hostname] VTGate hostname * @property {string|null} [pool] VTGate pool * @property {string|null} [cell] VTGate cell - * @property {string|null} [cluster] VTGate cluster + * @property {vtadmin.ICluster|null} [cluster] VTGate cluster * @property {Array.|null} [keyspaces] VTGate keyspaces */ @@ -667,7 +663,8 @@ $root.vtadmin = (function () { this.keyspaces = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -676,7 +673,7 @@ $root.vtadmin = (function () { * @memberof vtadmin.VTGate * @instance */ - VTGate.prototype.hostname = ''; + VTGate.prototype.hostname = ""; /** * VTGate pool. @@ -684,7 +681,7 @@ $root.vtadmin = (function () { * @memberof vtadmin.VTGate * @instance */ - VTGate.prototype.pool = ''; + VTGate.prototype.pool = ""; /** * VTGate cell. @@ -692,15 +689,15 @@ $root.vtadmin = (function () { * @memberof vtadmin.VTGate * @instance */ - VTGate.prototype.cell = ''; + VTGate.prototype.cell = ""; /** * VTGate cluster. - * @member {string} cluster + * @member {vtadmin.ICluster|null|undefined} cluster * @memberof vtadmin.VTGate * @instance */ - VTGate.prototype.cluster = ''; + VTGate.prototype.cluster = null; /** * VTGate keyspaces. @@ -732,18 +729,19 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ VTGate.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, 'hostname')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.hostname); - if (message.pool != null && Object.hasOwnProperty.call(message, 'pool')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.pool); - if (message.cell != null && Object.hasOwnProperty.call(message, 'cell')) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.cell); - if (message.cluster != null && Object.hasOwnProperty.call(message, 'cluster')) - writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.cluster); + if (!writer) + writer = $Writer.create(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); + if (message.pool != null && Object.hasOwnProperty.call(message, "pool")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pool); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cell); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.vtadmin.Cluster.encode(message.cluster, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.keyspaces != null && message.keyspaces.length) for (var i = 0; i < message.keyspaces.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.keyspaces[i]); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.keyspaces[i]); return writer; }; @@ -772,31 +770,32 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ VTGate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.VTGate(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.VTGate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hostname = reader.string(); - break; - case 2: - message.pool = reader.string(); - break; - case 3: - message.cell = reader.string(); - break; - case 4: - message.cluster = reader.string(); - break; - case 5: - if (!(message.keyspaces && message.keyspaces.length)) message.keyspaces = []; - message.keyspaces.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hostname = reader.string(); + break; + case 2: + message.pool = reader.string(); + break; + case 3: + message.cell = reader.string(); + break; + case 4: + message.cluster = $root.vtadmin.Cluster.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.keyspaces && message.keyspaces.length)) + message.keyspaces = []; + message.keyspaces.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -813,7 +812,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ VTGate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -826,19 +826,28 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ VTGate.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.hostname != null && message.hasOwnProperty('hostname')) - if (!$util.isString(message.hostname)) return 'hostname: string expected'; - if (message.pool != null && message.hasOwnProperty('pool')) - if (!$util.isString(message.pool)) return 'pool: string expected'; - if (message.cell != null && message.hasOwnProperty('cell')) - if (!$util.isString(message.cell)) return 'cell: string expected'; - if (message.cluster != null && message.hasOwnProperty('cluster')) - if (!$util.isString(message.cluster)) return 'cluster: string expected'; - if (message.keyspaces != null && message.hasOwnProperty('keyspaces')) { - if (!Array.isArray(message.keyspaces)) return 'keyspaces: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.pool != null && message.hasOwnProperty("pool")) + if (!$util.isString(message.pool)) + return "pool: string expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + var error = $root.vtadmin.Cluster.verify(message.cluster); + if (error) + return "cluster." + error; + } + if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { + if (!Array.isArray(message.keyspaces)) + return "keyspaces: array expected"; for (var i = 0; i < message.keyspaces.length; ++i) - if (!$util.isString(message.keyspaces[i])) return 'keyspaces: string[] expected'; + if (!$util.isString(message.keyspaces[i])) + return "keyspaces: string[] expected"; } return null; }; @@ -852,16 +861,26 @@ $root.vtadmin = (function () { * @returns {vtadmin.VTGate} VTGate */ VTGate.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.VTGate) return object; + if (object instanceof $root.vtadmin.VTGate) + return object; var message = new $root.vtadmin.VTGate(); - if (object.hostname != null) message.hostname = String(object.hostname); - if (object.pool != null) message.pool = String(object.pool); - if (object.cell != null) message.cell = String(object.cell); - if (object.cluster != null) message.cluster = String(object.cluster); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.pool != null) + message.pool = String(object.pool); + if (object.cell != null) + message.cell = String(object.cell); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".vtadmin.VTGate.cluster: object expected"); + message.cluster = $root.vtadmin.Cluster.fromObject(object.cluster); + } if (object.keyspaces) { - if (!Array.isArray(object.keyspaces)) throw TypeError('.vtadmin.VTGate.keyspaces: array expected'); + if (!Array.isArray(object.keyspaces)) + throw TypeError(".vtadmin.VTGate.keyspaces: array expected"); message.keyspaces = []; - for (var i = 0; i < object.keyspaces.length; ++i) message.keyspaces[i] = String(object.keyspaces[i]); + for (var i = 0; i < object.keyspaces.length; ++i) + message.keyspaces[i] = String(object.keyspaces[i]); } return message; }; @@ -876,22 +895,29 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ VTGate.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.keyspaces = []; + if (options.arrays || options.defaults) + object.keyspaces = []; if (options.defaults) { - object.hostname = ''; - object.pool = ''; - object.cell = ''; - object.cluster = ''; + object.hostname = ""; + object.pool = ""; + object.cell = ""; + object.cluster = null; } - if (message.hostname != null && message.hasOwnProperty('hostname')) object.hostname = message.hostname; - if (message.pool != null && message.hasOwnProperty('pool')) object.pool = message.pool; - if (message.cell != null && message.hasOwnProperty('cell')) object.cell = message.cell; - if (message.cluster != null && message.hasOwnProperty('cluster')) object.cluster = message.cluster; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.pool != null && message.hasOwnProperty("pool")) + object.pool = message.pool; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.vtadmin.Cluster.toObject(message.cluster, options); if (message.keyspaces && message.keyspaces.length) { object.keyspaces = []; - for (var j = 0; j < message.keyspaces.length; ++j) object.keyspaces[j] = message.keyspaces[j]; + for (var j = 0; j < message.keyspaces.length; ++j) + object.keyspaces[j] = message.keyspaces[j]; } return object; }; @@ -910,7 +936,8 @@ $root.vtadmin = (function () { return VTGate; })(); - vtadmin.GetGatesRequest = (function () { + vtadmin.GetGatesRequest = (function() { + /** * Properties of a GetGatesRequest. * @memberof vtadmin @@ -930,7 +957,8 @@ $root.vtadmin = (function () { this.cluster_ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -963,10 +991,11 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ GetGatesRequest.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); + if (!writer) + writer = $Writer.create(); if (message.cluster_ids != null && message.cluster_ids.length) for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.cluster_ids[i]); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_ids[i]); return writer; }; @@ -995,19 +1024,20 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetGatesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.GetGatesRequest(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetGatesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.cluster_ids && message.cluster_ids.length)) message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + if (!(message.cluster_ids && message.cluster_ids.length)) + message.cluster_ids = []; + message.cluster_ids.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1024,7 +1054,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetGatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -1037,11 +1068,14 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GetGatesRequest.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.cluster_ids != null && message.hasOwnProperty('cluster_ids')) { - if (!Array.isArray(message.cluster_ids)) return 'cluster_ids: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { + if (!Array.isArray(message.cluster_ids)) + return "cluster_ids: array expected"; for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) return 'cluster_ids: string[] expected'; + if (!$util.isString(message.cluster_ids[i])) + return "cluster_ids: string[] expected"; } return null; }; @@ -1055,11 +1089,12 @@ $root.vtadmin = (function () { * @returns {vtadmin.GetGatesRequest} GetGatesRequest */ GetGatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetGatesRequest) return object; + if (object instanceof $root.vtadmin.GetGatesRequest) + return object; var message = new $root.vtadmin.GetGatesRequest(); if (object.cluster_ids) { if (!Array.isArray(object.cluster_ids)) - throw TypeError('.vtadmin.GetGatesRequest.cluster_ids: array expected'); + throw TypeError(".vtadmin.GetGatesRequest.cluster_ids: array expected"); message.cluster_ids = []; for (var i = 0; i < object.cluster_ids.length; ++i) message.cluster_ids[i] = String(object.cluster_ids[i]); @@ -1077,12 +1112,15 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ GetGatesRequest.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.cluster_ids = []; + if (options.arrays || options.defaults) + object.cluster_ids = []; if (message.cluster_ids && message.cluster_ids.length) { object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) object.cluster_ids[j] = message.cluster_ids[j]; + for (var j = 0; j < message.cluster_ids.length; ++j) + object.cluster_ids[j] = message.cluster_ids[j]; } return object; }; @@ -1101,7 +1139,8 @@ $root.vtadmin = (function () { return GetGatesRequest; })(); - vtadmin.GetGatesResponse = (function () { + vtadmin.GetGatesResponse = (function() { + /** * Properties of a GetGatesResponse. * @memberof vtadmin @@ -1121,7 +1160,8 @@ $root.vtadmin = (function () { this.gates = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1154,13 +1194,11 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ GetGatesResponse.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); + if (!writer) + writer = $Writer.create(); if (message.gates != null && message.gates.length) for (var i = 0; i < message.gates.length; ++i) - $root.vtadmin.VTGate.encode( - message.gates[i], - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); + $root.vtadmin.VTGate.encode(message.gates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -1189,19 +1227,20 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetGatesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.GetGatesResponse(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetGatesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.gates && message.gates.length)) message.gates = []; - message.gates.push($root.vtadmin.VTGate.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + if (!(message.gates && message.gates.length)) + message.gates = []; + message.gates.push($root.vtadmin.VTGate.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1218,7 +1257,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetGatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -1231,12 +1271,15 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GetGatesResponse.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.gates != null && message.hasOwnProperty('gates')) { - if (!Array.isArray(message.gates)) return 'gates: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gates != null && message.hasOwnProperty("gates")) { + if (!Array.isArray(message.gates)) + return "gates: array expected"; for (var i = 0; i < message.gates.length; ++i) { var error = $root.vtadmin.VTGate.verify(message.gates[i]); - if (error) return 'gates.' + error; + if (error) + return "gates." + error; } } return null; @@ -1251,14 +1294,16 @@ $root.vtadmin = (function () { * @returns {vtadmin.GetGatesResponse} GetGatesResponse */ GetGatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetGatesResponse) return object; + if (object instanceof $root.vtadmin.GetGatesResponse) + return object; var message = new $root.vtadmin.GetGatesResponse(); if (object.gates) { - if (!Array.isArray(object.gates)) throw TypeError('.vtadmin.GetGatesResponse.gates: array expected'); + if (!Array.isArray(object.gates)) + throw TypeError(".vtadmin.GetGatesResponse.gates: array expected"); message.gates = []; for (var i = 0; i < object.gates.length; ++i) { - if (typeof object.gates[i] !== 'object') - throw TypeError('.vtadmin.GetGatesResponse.gates: object expected'); + if (typeof object.gates[i] !== "object") + throw TypeError(".vtadmin.GetGatesResponse.gates: object expected"); message.gates[i] = $root.vtadmin.VTGate.fromObject(object.gates[i]); } } @@ -1275,9 +1320,11 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ GetGatesResponse.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.gates = []; + if (options.arrays || options.defaults) + object.gates = []; if (message.gates && message.gates.length) { object.gates = []; for (var j = 0; j < message.gates.length; ++j) @@ -1300,7 +1347,8 @@ $root.vtadmin = (function () { return GetGatesResponse; })(); - vtadmin.GetTabletRequest = (function () { + vtadmin.GetTabletRequest = (function() { + /** * Properties of a GetTabletRequest. * @memberof vtadmin @@ -1321,7 +1369,8 @@ $root.vtadmin = (function () { this.cluster_ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1330,7 +1379,7 @@ $root.vtadmin = (function () { * @memberof vtadmin.GetTabletRequest * @instance */ - GetTabletRequest.prototype.hostname = ''; + GetTabletRequest.prototype.hostname = ""; /** * GetTabletRequest cluster_ids. @@ -1362,12 +1411,13 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ GetTabletRequest.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, 'hostname')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.hostname); + if (!writer) + writer = $Writer.create(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); if (message.cluster_ids != null && message.cluster_ids.length) for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.cluster_ids[i]); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cluster_ids[i]); return writer; }; @@ -1396,22 +1446,23 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetTabletRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.GetTabletRequest(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetTabletRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.hostname = reader.string(); - break; - case 2: - if (!(message.cluster_ids && message.cluster_ids.length)) message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.hostname = reader.string(); + break; + case 2: + if (!(message.cluster_ids && message.cluster_ids.length)) + message.cluster_ids = []; + message.cluster_ids.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1428,7 +1479,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -1441,13 +1493,17 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GetTabletRequest.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.hostname != null && message.hasOwnProperty('hostname')) - if (!$util.isString(message.hostname)) return 'hostname: string expected'; - if (message.cluster_ids != null && message.hasOwnProperty('cluster_ids')) { - if (!Array.isArray(message.cluster_ids)) return 'cluster_ids: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { + if (!Array.isArray(message.cluster_ids)) + return "cluster_ids: array expected"; for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) return 'cluster_ids: string[] expected'; + if (!$util.isString(message.cluster_ids[i])) + return "cluster_ids: string[] expected"; } return null; }; @@ -1461,12 +1517,14 @@ $root.vtadmin = (function () { * @returns {vtadmin.GetTabletRequest} GetTabletRequest */ GetTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetTabletRequest) return object; + if (object instanceof $root.vtadmin.GetTabletRequest) + return object; var message = new $root.vtadmin.GetTabletRequest(); - if (object.hostname != null) message.hostname = String(object.hostname); + if (object.hostname != null) + message.hostname = String(object.hostname); if (object.cluster_ids) { if (!Array.isArray(object.cluster_ids)) - throw TypeError('.vtadmin.GetTabletRequest.cluster_ids: array expected'); + throw TypeError(".vtadmin.GetTabletRequest.cluster_ids: array expected"); message.cluster_ids = []; for (var i = 0; i < object.cluster_ids.length; ++i) message.cluster_ids[i] = String(object.cluster_ids[i]); @@ -1484,14 +1542,19 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ GetTabletRequest.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.cluster_ids = []; - if (options.defaults) object.hostname = ''; - if (message.hostname != null && message.hasOwnProperty('hostname')) object.hostname = message.hostname; + if (options.arrays || options.defaults) + object.cluster_ids = []; + if (options.defaults) + object.hostname = ""; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; if (message.cluster_ids && message.cluster_ids.length) { object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) object.cluster_ids[j] = message.cluster_ids[j]; + for (var j = 0; j < message.cluster_ids.length; ++j) + object.cluster_ids[j] = message.cluster_ids[j]; } return object; }; @@ -1510,7 +1573,8 @@ $root.vtadmin = (function () { return GetTabletRequest; })(); - vtadmin.GetTabletsRequest = (function () { + vtadmin.GetTabletsRequest = (function() { + /** * Properties of a GetTabletsRequest. * @memberof vtadmin @@ -1530,7 +1594,8 @@ $root.vtadmin = (function () { this.cluster_ids = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1563,10 +1628,11 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ GetTabletsRequest.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); + if (!writer) + writer = $Writer.create(); if (message.cluster_ids != null && message.cluster_ids.length) for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.cluster_ids[i]); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_ids[i]); return writer; }; @@ -1595,19 +1661,20 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetTabletsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.GetTabletsRequest(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetTabletsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.cluster_ids && message.cluster_ids.length)) message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + if (!(message.cluster_ids && message.cluster_ids.length)) + message.cluster_ids = []; + message.cluster_ids.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1624,7 +1691,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -1637,11 +1705,14 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GetTabletsRequest.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.cluster_ids != null && message.hasOwnProperty('cluster_ids')) { - if (!Array.isArray(message.cluster_ids)) return 'cluster_ids: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { + if (!Array.isArray(message.cluster_ids)) + return "cluster_ids: array expected"; for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) return 'cluster_ids: string[] expected'; + if (!$util.isString(message.cluster_ids[i])) + return "cluster_ids: string[] expected"; } return null; }; @@ -1655,11 +1726,12 @@ $root.vtadmin = (function () { * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest */ GetTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetTabletsRequest) return object; + if (object instanceof $root.vtadmin.GetTabletsRequest) + return object; var message = new $root.vtadmin.GetTabletsRequest(); if (object.cluster_ids) { if (!Array.isArray(object.cluster_ids)) - throw TypeError('.vtadmin.GetTabletsRequest.cluster_ids: array expected'); + throw TypeError(".vtadmin.GetTabletsRequest.cluster_ids: array expected"); message.cluster_ids = []; for (var i = 0; i < object.cluster_ids.length; ++i) message.cluster_ids[i] = String(object.cluster_ids[i]); @@ -1677,12 +1749,15 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ GetTabletsRequest.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.cluster_ids = []; + if (options.arrays || options.defaults) + object.cluster_ids = []; if (message.cluster_ids && message.cluster_ids.length) { object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) object.cluster_ids[j] = message.cluster_ids[j]; + for (var j = 0; j < message.cluster_ids.length; ++j) + object.cluster_ids[j] = message.cluster_ids[j]; } return object; }; @@ -1701,7 +1776,8 @@ $root.vtadmin = (function () { return GetTabletsRequest; })(); - vtadmin.GetTabletsResponse = (function () { + vtadmin.GetTabletsResponse = (function() { + /** * Properties of a GetTabletsResponse. * @memberof vtadmin @@ -1721,7 +1797,8 @@ $root.vtadmin = (function () { this.tablets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1754,13 +1831,11 @@ $root.vtadmin = (function () { * @returns {$protobuf.Writer} Writer */ GetTabletsResponse.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); + if (!writer) + writer = $Writer.create(); if (message.tablets != null && message.tablets.length) for (var i = 0; i < message.tablets.length; ++i) - $root.vtadmin.Tablet.encode( - message.tablets[i], - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); + $root.vtadmin.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -1789,19 +1864,20 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetTabletsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vtadmin.GetTabletsResponse(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetTabletsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.tablets && message.tablets.length)) message.tablets = []; - message.tablets.push($root.vtadmin.Tablet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + if (!(message.tablets && message.tablets.length)) + message.tablets = []; + message.tablets.push($root.vtadmin.Tablet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -1818,7 +1894,8 @@ $root.vtadmin = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -1831,12 +1908,15 @@ $root.vtadmin = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GetTabletsResponse.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.tablets != null && message.hasOwnProperty('tablets')) { - if (!Array.isArray(message.tablets)) return 'tablets: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablets != null && message.hasOwnProperty("tablets")) { + if (!Array.isArray(message.tablets)) + return "tablets: array expected"; for (var i = 0; i < message.tablets.length; ++i) { var error = $root.vtadmin.Tablet.verify(message.tablets[i]); - if (error) return 'tablets.' + error; + if (error) + return "tablets." + error; } } return null; @@ -1851,15 +1931,16 @@ $root.vtadmin = (function () { * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse */ GetTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetTabletsResponse) return object; + if (object instanceof $root.vtadmin.GetTabletsResponse) + return object; var message = new $root.vtadmin.GetTabletsResponse(); if (object.tablets) { if (!Array.isArray(object.tablets)) - throw TypeError('.vtadmin.GetTabletsResponse.tablets: array expected'); + throw TypeError(".vtadmin.GetTabletsResponse.tablets: array expected"); message.tablets = []; for (var i = 0; i < object.tablets.length; ++i) { - if (typeof object.tablets[i] !== 'object') - throw TypeError('.vtadmin.GetTabletsResponse.tablets: object expected'); + if (typeof object.tablets[i] !== "object") + throw TypeError(".vtadmin.GetTabletsResponse.tablets: object expected"); message.tablets[i] = $root.vtadmin.Tablet.fromObject(object.tablets[i]); } } @@ -1876,9 +1957,11 @@ $root.vtadmin = (function () { * @returns {Object.} Plain object */ GetTabletsResponse.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.tablets = []; + if (options.arrays || options.defaults) + object.tablets = []; if (message.tablets && message.tablets.length) { object.tablets = []; for (var j = 0; j < message.tablets.length; ++j) @@ -1904,7 +1987,8 @@ $root.vtadmin = (function () { return vtadmin; })(); -$root.topodata = (function () { +$root.topodata = (function() { + /** * Namespace topodata. * @exports topodata @@ -1912,7 +1996,8 @@ $root.topodata = (function () { */ var topodata = {}; - topodata.KeyRange = (function () { + topodata.KeyRange = (function() { + /** * Properties of a KeyRange. * @memberof topodata @@ -1932,7 +2017,8 @@ $root.topodata = (function () { function KeyRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -1973,11 +2059,12 @@ $root.topodata = (function () { * @returns {$protobuf.Writer} Writer */ KeyRange.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, 'start')) - writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, 'end')) - writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.end); + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.end); return writer; }; @@ -2006,21 +2093,21 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ KeyRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.KeyRange(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.KeyRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.bytes(); - break; - case 2: - message.end = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.start = reader.bytes(); + break; + case 2: + message.end = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2037,7 +2124,8 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ KeyRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -2050,13 +2138,14 @@ $root.topodata = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ KeyRange.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.start != null && message.hasOwnProperty('start')) - if (!((message.start && typeof message.start.length === 'number') || $util.isString(message.start))) - return 'start: buffer expected'; - if (message.end != null && message.hasOwnProperty('end')) - if (!((message.end && typeof message.end.length === 'number') || $util.isString(message.end))) - return 'end: buffer expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!(message.start && typeof message.start.length === "number" || $util.isString(message.start))) + return "start: buffer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!(message.end && typeof message.end.length === "number" || $util.isString(message.end))) + return "end: buffer expected"; return null; }; @@ -2069,24 +2158,19 @@ $root.topodata = (function () { * @returns {topodata.KeyRange} KeyRange */ KeyRange.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.KeyRange) return object; + if (object instanceof $root.topodata.KeyRange) + return object; var message = new $root.topodata.KeyRange(); if (object.start != null) - if (typeof object.start === 'string') - $util.base64.decode( - object.start, - (message.start = $util.newBuffer($util.base64.length(object.start))), - 0 - ); - else if (object.start.length) message.start = object.start; + if (typeof object.start === "string") + $util.base64.decode(object.start, message.start = $util.newBuffer($util.base64.length(object.start)), 0); + else if (object.start.length) + message.start = object.start; if (object.end != null) - if (typeof object.end === 'string') - $util.base64.decode( - object.end, - (message.end = $util.newBuffer($util.base64.length(object.end))), - 0 - ); - else if (object.end.length) message.end = object.end; + if (typeof object.end === "string") + $util.base64.decode(object.end, message.end = $util.newBuffer($util.base64.length(object.end)), 0); + else if (object.end.length) + message.end = object.end; return message; }; @@ -2100,34 +2184,29 @@ $root.topodata = (function () { * @returns {Object.} Plain object */ KeyRange.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { - if (options.bytes === String) object.start = ''; + if (options.bytes === String) + object.start = ""; else { object.start = []; - if (options.bytes !== Array) object.start = $util.newBuffer(object.start); + if (options.bytes !== Array) + object.start = $util.newBuffer(object.start); } - if (options.bytes === String) object.end = ''; + if (options.bytes === String) + object.end = ""; else { object.end = []; - if (options.bytes !== Array) object.end = $util.newBuffer(object.end); + if (options.bytes !== Array) + object.end = $util.newBuffer(object.end); } } - if (message.start != null && message.hasOwnProperty('start')) - object.start = - options.bytes === String - ? $util.base64.encode(message.start, 0, message.start.length) - : options.bytes === Array - ? Array.prototype.slice.call(message.start) - : message.start; - if (message.end != null && message.hasOwnProperty('end')) - object.end = - options.bytes === String - ? $util.base64.encode(message.end, 0, message.end.length) - : options.bytes === Array - ? Array.prototype.slice.call(message.end) - : message.end; + if (message.start != null && message.hasOwnProperty("start")) + object.start = options.bytes === String ? $util.base64.encode(message.start, 0, message.start.length) : options.bytes === Array ? Array.prototype.slice.call(message.start) : message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = options.bytes === String ? $util.base64.encode(message.end, 0, message.end.length) : options.bytes === Array ? Array.prototype.slice.call(message.end) : message.end; return object; }; @@ -2152,11 +2231,10 @@ $root.topodata = (function () { * @property {number} NORMAL=0 NORMAL value * @property {number} SNAPSHOT=1 SNAPSHOT value */ - topodata.KeyspaceType = (function () { - var valuesById = {}, - values = Object.create(valuesById); - values[(valuesById[0] = 'NORMAL')] = 0; - values[(valuesById[1] = 'SNAPSHOT')] = 1; + topodata.KeyspaceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NORMAL"] = 0; + values[valuesById[1] = "SNAPSHOT"] = 1; return values; })(); @@ -2168,16 +2246,16 @@ $root.topodata = (function () { * @property {number} UINT64=1 UINT64 value * @property {number} BYTES=2 BYTES value */ - topodata.KeyspaceIdType = (function () { - var valuesById = {}, - values = Object.create(valuesById); - values[(valuesById[0] = 'UNSET')] = 0; - values[(valuesById[1] = 'UINT64')] = 1; - values[(valuesById[2] = 'BYTES')] = 2; + topodata.KeyspaceIdType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSET"] = 0; + values[valuesById[1] = "UINT64"] = 1; + values[valuesById[2] = "BYTES"] = 2; return values; })(); - topodata.TabletAlias = (function () { + topodata.TabletAlias = (function() { + /** * Properties of a TabletAlias. * @memberof topodata @@ -2197,7 +2275,8 @@ $root.topodata = (function () { function TabletAlias(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -2206,7 +2285,7 @@ $root.topodata = (function () { * @memberof topodata.TabletAlias * @instance */ - TabletAlias.prototype.cell = ''; + TabletAlias.prototype.cell = ""; /** * TabletAlias uid. @@ -2238,11 +2317,12 @@ $root.topodata = (function () { * @returns {$protobuf.Writer} Writer */ TabletAlias.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, 'cell')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.cell); - if (message.uid != null && Object.hasOwnProperty.call(message, 'uid')) - writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.uid); + if (!writer) + writer = $Writer.create(); + if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.uid); return writer; }; @@ -2271,21 +2351,21 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TabletAlias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.TabletAlias(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.TabletAlias(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cell = reader.string(); - break; - case 2: - message.uid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.cell = reader.string(); + break; + case 2: + message.uid = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2302,8 +2382,9 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TabletAlias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** @@ -2315,11 +2396,14 @@ $root.topodata = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TabletAlias.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.cell != null && message.hasOwnProperty('cell')) - if (!$util.isString(message.cell)) return 'cell: string expected'; - if (message.uid != null && message.hasOwnProperty('uid')) - if (!$util.isInteger(message.uid)) return 'uid: integer expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cell != null && message.hasOwnProperty("cell")) + if (!$util.isString(message.cell)) + return "cell: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isInteger(message.uid)) + return "uid: integer expected"; return null; }; @@ -2332,10 +2416,13 @@ $root.topodata = (function () { * @returns {topodata.TabletAlias} TabletAlias */ TabletAlias.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.TabletAlias) return object; + if (object instanceof $root.topodata.TabletAlias) + return object; var message = new $root.topodata.TabletAlias(); - if (object.cell != null) message.cell = String(object.cell); - if (object.uid != null) message.uid = object.uid >>> 0; + if (object.cell != null) + message.cell = String(object.cell); + if (object.uid != null) + message.uid = object.uid >>> 0; return message; }; @@ -2349,14 +2436,17 @@ $root.topodata = (function () { * @returns {Object.} Plain object */ TabletAlias.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.cell = ''; + object.cell = ""; object.uid = 0; } - if (message.cell != null && message.hasOwnProperty('cell')) object.cell = message.cell; - if (message.uid != null && message.hasOwnProperty('uid')) object.uid = message.uid; + if (message.cell != null && message.hasOwnProperty("cell")) + object.cell = message.cell; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; return object; }; @@ -2389,23 +2479,23 @@ $root.topodata = (function () { * @property {number} RESTORE=7 RESTORE value * @property {number} DRAINED=8 DRAINED value */ - topodata.TabletType = (function () { - var valuesById = {}, - values = Object.create(valuesById); - values[(valuesById[0] = 'UNKNOWN')] = 0; - values[(valuesById[1] = 'MASTER')] = 1; - values[(valuesById[2] = 'REPLICA')] = 2; - values[(valuesById[3] = 'RDONLY')] = 3; - values['BATCH'] = 3; - values[(valuesById[4] = 'SPARE')] = 4; - values[(valuesById[5] = 'EXPERIMENTAL')] = 5; - values[(valuesById[6] = 'BACKUP')] = 6; - values[(valuesById[7] = 'RESTORE')] = 7; - values[(valuesById[8] = 'DRAINED')] = 8; + topodata.TabletType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "MASTER"] = 1; + values[valuesById[2] = "REPLICA"] = 2; + values[valuesById[3] = "RDONLY"] = 3; + values["BATCH"] = 3; + values[valuesById[4] = "SPARE"] = 4; + values[valuesById[5] = "EXPERIMENTAL"] = 5; + values[valuesById[6] = "BACKUP"] = 6; + values[valuesById[7] = "RESTORE"] = 7; + values[valuesById[8] = "DRAINED"] = 8; return values; })(); - topodata.Tablet = (function () { + topodata.Tablet = (function() { + /** * Properties of a Tablet. * @memberof topodata @@ -2437,7 +2527,8 @@ $root.topodata = (function () { this.tags = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -2454,7 +2545,7 @@ $root.topodata = (function () { * @memberof topodata.Tablet * @instance */ - Tablet.prototype.hostname = ''; + Tablet.prototype.hostname = ""; /** * Tablet port_map. @@ -2470,7 +2561,7 @@ $root.topodata = (function () { * @memberof topodata.Tablet * @instance */ - Tablet.prototype.keyspace = ''; + Tablet.prototype.keyspace = ""; /** * Tablet shard. @@ -2478,7 +2569,7 @@ $root.topodata = (function () { * @memberof topodata.Tablet * @instance */ - Tablet.prototype.shard = ''; + Tablet.prototype.shard = ""; /** * Tablet key_range. @@ -2502,7 +2593,7 @@ $root.topodata = (function () { * @memberof topodata.Tablet * @instance */ - Tablet.prototype.db_name_override = ''; + Tablet.prototype.db_name_override = ""; /** * Tablet tags. @@ -2518,7 +2609,7 @@ $root.topodata = (function () { * @memberof topodata.Tablet * @instance */ - Tablet.prototype.mysql_hostname = ''; + Tablet.prototype.mysql_hostname = ""; /** * Tablet mysql_port. @@ -2558,56 +2649,34 @@ $root.topodata = (function () { * @returns {$protobuf.Writer} Writer */ Tablet.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.alias != null && Object.hasOwnProperty.call(message, 'alias')) - $root.topodata.TabletAlias.encode( - message.alias, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, 'hostname')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.hostname); - if (message.port_map != null && Object.hasOwnProperty.call(message, 'port_map')) + if (!writer) + writer = $Writer.create(); + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) + $root.topodata.TabletAlias.encode(message.alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); + if (message.port_map != null && Object.hasOwnProperty.call(message, "port_map")) for (var keys = Object.keys(message.port_map), i = 0; i < keys.length; ++i) - writer - .uint32(/* id 4, wireType 2 =*/ 34) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - .uint32(/* id 2, wireType 0 =*/ 16) - .int32(message.port_map[keys[i]]) - .ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, 'keyspace')) - writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, 'shard')) - writer.uint32(/* id 6, wireType 2 =*/ 50).string(message.shard); - if (message.key_range != null && Object.hasOwnProperty.call(message, 'key_range')) - $root.topodata.KeyRange.encode( - message.key_range, - writer.uint32(/* id 7, wireType 2 =*/ 58).fork() - ).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, 'type')) - writer.uint32(/* id 8, wireType 0 =*/ 64).int32(message.type); - if (message.db_name_override != null && Object.hasOwnProperty.call(message, 'db_name_override')) - writer.uint32(/* id 9, wireType 2 =*/ 74).string(message.db_name_override); - if (message.tags != null && Object.hasOwnProperty.call(message, 'tags')) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.port_map[keys[i]]).ldelim(); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.shard); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.type); + if (message.db_name_override != null && Object.hasOwnProperty.call(message, "db_name_override")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.db_name_override); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer - .uint32(/* id 10, wireType 2 =*/ 82) - .fork() - .uint32(/* id 1, wireType 2 =*/ 10) - .string(keys[i]) - .uint32(/* id 2, wireType 2 =*/ 18) - .string(message.tags[keys[i]]) - .ldelim(); - if (message.mysql_hostname != null && Object.hasOwnProperty.call(message, 'mysql_hostname')) - writer.uint32(/* id 12, wireType 2 =*/ 98).string(message.mysql_hostname); - if (message.mysql_port != null && Object.hasOwnProperty.call(message, 'mysql_port')) - writer.uint32(/* id 13, wireType 0 =*/ 104).int32(message.mysql_port); - if (message.master_term_start_time != null && Object.hasOwnProperty.call(message, 'master_term_start_time')) - $root.vttime.Time.encode( - message.master_term_start_time, - writer.uint32(/* id 14, wireType 2 =*/ 114).fork() - ).ldelim(); + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); + if (message.mysql_hostname != null && Object.hasOwnProperty.call(message, "mysql_hostname")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.mysql_hostname); + if (message.mysql_port != null && Object.hasOwnProperty.call(message, "mysql_port")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.mysql_port); + if (message.master_term_start_time != null && Object.hasOwnProperty.call(message, "master_term_start_time")) + $root.vttime.Time.encode(message.master_term_start_time, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -2636,89 +2705,89 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Tablet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Tablet(), - key, - value; + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Tablet(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.hostname = reader.string(); - break; - case 4: - if (message.port_map === $util.emptyObject) message.port_map = {}; - var end2 = reader.uint32() + reader.pos; - key = ''; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } + case 1: + message.alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 2: + message.hostname = reader.string(); + break; + case 4: + if (message.port_map === $util.emptyObject) + message.port_map = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; } - message.port_map[key] = value; - break; - case 5: - message.keyspace = reader.string(); - break; - case 6: - message.shard = reader.string(); - break; - case 7: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 8: - message.type = reader.int32(); - break; - case 9: - message.db_name_override = reader.string(); - break; - case 10: - if (message.tags === $util.emptyObject) message.tags = {}; - var end2 = reader.uint32() + reader.pos; - key = ''; - value = ''; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } + } + message.port_map[key] = value; + break; + case 5: + message.keyspace = reader.string(); + break; + case 6: + message.shard = reader.string(); + break; + case 7: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + case 8: + message.type = reader.int32(); + break; + case 9: + message.db_name_override = reader.string(); + break; + case 10: + if (message.tags === $util.emptyObject) + message.tags = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; } - message.tags[key] = value; - break; - case 12: - message.mysql_hostname = reader.string(); - break; - case 13: - message.mysql_port = reader.int32(); - break; - case 14: - message.master_term_start_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + } + message.tags[key] = value; + break; + case 12: + message.mysql_hostname = reader.string(); + break; + case 13: + message.mysql_port = reader.int32(); + break; + case 14: + message.master_term_start_time = $root.vttime.Time.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -2735,7 +2804,8 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Tablet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -2748,58 +2818,72 @@ $root.topodata = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Tablet.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.alias != null && message.hasOwnProperty('alias')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alias != null && message.hasOwnProperty("alias")) { var error = $root.topodata.TabletAlias.verify(message.alias); - if (error) return 'alias.' + error; + if (error) + return "alias." + error; } - if (message.hostname != null && message.hasOwnProperty('hostname')) - if (!$util.isString(message.hostname)) return 'hostname: string expected'; - if (message.port_map != null && message.hasOwnProperty('port_map')) { - if (!$util.isObject(message.port_map)) return 'port_map: object expected'; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.port_map != null && message.hasOwnProperty("port_map")) { + if (!$util.isObject(message.port_map)) + return "port_map: object expected"; var key = Object.keys(message.port_map); for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.port_map[key[i]])) return 'port_map: integer{k:string} expected'; + if (!$util.isInteger(message.port_map[key[i]])) + return "port_map: integer{k:string} expected"; } - if (message.keyspace != null && message.hasOwnProperty('keyspace')) - if (!$util.isString(message.keyspace)) return 'keyspace: string expected'; - if (message.shard != null && message.hasOwnProperty('shard')) - if (!$util.isString(message.shard)) return 'shard: string expected'; - if (message.key_range != null && message.hasOwnProperty('key_range')) { + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.key_range != null && message.hasOwnProperty("key_range")) { var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) return 'key_range.' + error; + if (error) + return "key_range." + error; } - if (message.type != null && message.hasOwnProperty('type')) + if (message.type != null && message.hasOwnProperty("type")) switch (message.type) { - default: - return 'type: enum value expected'; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - if (message.db_name_override != null && message.hasOwnProperty('db_name_override')) - if (!$util.isString(message.db_name_override)) return 'db_name_override: string expected'; - if (message.tags != null && message.hasOwnProperty('tags')) { - if (!$util.isObject(message.tags)) return 'tags: object expected'; + if (message.db_name_override != null && message.hasOwnProperty("db_name_override")) + if (!$util.isString(message.db_name_override)) + return "db_name_override: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; var key = Object.keys(message.tags); for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) return 'tags: string{k:string} expected'; + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; } - if (message.mysql_hostname != null && message.hasOwnProperty('mysql_hostname')) - if (!$util.isString(message.mysql_hostname)) return 'mysql_hostname: string expected'; - if (message.mysql_port != null && message.hasOwnProperty('mysql_port')) - if (!$util.isInteger(message.mysql_port)) return 'mysql_port: integer expected'; - if (message.master_term_start_time != null && message.hasOwnProperty('master_term_start_time')) { + if (message.mysql_hostname != null && message.hasOwnProperty("mysql_hostname")) + if (!$util.isString(message.mysql_hostname)) + return "mysql_hostname: string expected"; + if (message.mysql_port != null && message.hasOwnProperty("mysql_port")) + if (!$util.isInteger(message.mysql_port)) + return "mysql_port: integer expected"; + if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) { var error = $root.vttime.Time.verify(message.master_term_start_time); - if (error) return 'master_term_start_time.' + error; + if (error) + return "master_term_start_time." + error; } return null; }; @@ -2813,80 +2897,90 @@ $root.topodata = (function () { * @returns {topodata.Tablet} Tablet */ Tablet.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Tablet) return object; + if (object instanceof $root.topodata.Tablet) + return object; var message = new $root.topodata.Tablet(); if (object.alias != null) { - if (typeof object.alias !== 'object') throw TypeError('.topodata.Tablet.alias: object expected'); + if (typeof object.alias !== "object") + throw TypeError(".topodata.Tablet.alias: object expected"); message.alias = $root.topodata.TabletAlias.fromObject(object.alias); } - if (object.hostname != null) message.hostname = String(object.hostname); + if (object.hostname != null) + message.hostname = String(object.hostname); if (object.port_map) { - if (typeof object.port_map !== 'object') throw TypeError('.topodata.Tablet.port_map: object expected'); + if (typeof object.port_map !== "object") + throw TypeError(".topodata.Tablet.port_map: object expected"); message.port_map = {}; for (var keys = Object.keys(object.port_map), i = 0; i < keys.length; ++i) message.port_map[keys[i]] = object.port_map[keys[i]] | 0; } - if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard != null) message.shard = String(object.shard); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); if (object.key_range != null) { - if (typeof object.key_range !== 'object') - throw TypeError('.topodata.Tablet.key_range: object expected'); + if (typeof object.key_range !== "object") + throw TypeError(".topodata.Tablet.key_range: object expected"); message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } switch (object.type) { - case 'UNKNOWN': - case 0: - message.type = 0; - break; - case 'MASTER': - case 1: - message.type = 1; - break; - case 'REPLICA': - case 2: - message.type = 2; - break; - case 'RDONLY': - case 3: - message.type = 3; - break; - case 'BATCH': - case 3: - message.type = 3; - break; - case 'SPARE': - case 4: - message.type = 4; - break; - case 'EXPERIMENTAL': - case 5: - message.type = 5; - break; - case 'BACKUP': - case 6: - message.type = 6; - break; - case 'RESTORE': - case 7: - message.type = 7; - break; - case 'DRAINED': - case 8: - message.type = 8; - break; + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "MASTER": + case 1: + message.type = 1; + break; + case "REPLICA": + case 2: + message.type = 2; + break; + case "RDONLY": + case 3: + message.type = 3; + break; + case "BATCH": + case 3: + message.type = 3; + break; + case "SPARE": + case 4: + message.type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.type = 5; + break; + case "BACKUP": + case 6: + message.type = 6; + break; + case "RESTORE": + case 7: + message.type = 7; + break; + case "DRAINED": + case 8: + message.type = 8; + break; } - if (object.db_name_override != null) message.db_name_override = String(object.db_name_override); + if (object.db_name_override != null) + message.db_name_override = String(object.db_name_override); if (object.tags) { - if (typeof object.tags !== 'object') throw TypeError('.topodata.Tablet.tags: object expected'); + if (typeof object.tags !== "object") + throw TypeError(".topodata.Tablet.tags: object expected"); message.tags = {}; for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) message.tags[keys[i]] = String(object.tags[keys[i]]); } - if (object.mysql_hostname != null) message.mysql_hostname = String(object.mysql_hostname); - if (object.mysql_port != null) message.mysql_port = object.mysql_port | 0; + if (object.mysql_hostname != null) + message.mysql_hostname = String(object.mysql_hostname); + if (object.mysql_port != null) + message.mysql_port = object.mysql_port | 0; if (object.master_term_start_time != null) { - if (typeof object.master_term_start_time !== 'object') - throw TypeError('.topodata.Tablet.master_term_start_time: object expected'); + if (typeof object.master_term_start_time !== "object") + throw TypeError(".topodata.Tablet.master_term_start_time: object expected"); message.master_term_start_time = $root.vttime.Time.fromObject(object.master_term_start_time); } return message; @@ -2902,7 +2996,8 @@ $root.topodata = (function () { * @returns {Object.} Plain object */ Tablet.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.objects || options.defaults) { object.port_map = {}; @@ -2910,41 +3005,46 @@ $root.topodata = (function () { } if (options.defaults) { object.alias = null; - object.hostname = ''; - object.keyspace = ''; - object.shard = ''; + object.hostname = ""; + object.keyspace = ""; + object.shard = ""; object.key_range = null; - object.type = options.enums === String ? 'UNKNOWN' : 0; - object.db_name_override = ''; - object.mysql_hostname = ''; + object.type = options.enums === String ? "UNKNOWN" : 0; + object.db_name_override = ""; + object.mysql_hostname = ""; object.mysql_port = 0; object.master_term_start_time = null; } - if (message.alias != null && message.hasOwnProperty('alias')) + if (message.alias != null && message.hasOwnProperty("alias")) object.alias = $root.topodata.TabletAlias.toObject(message.alias, options); - if (message.hostname != null && message.hasOwnProperty('hostname')) object.hostname = message.hostname; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; var keys2; if (message.port_map && (keys2 = Object.keys(message.port_map)).length) { object.port_map = {}; - for (var j = 0; j < keys2.length; ++j) object.port_map[keys2[j]] = message.port_map[keys2[j]]; + for (var j = 0; j < keys2.length; ++j) + object.port_map[keys2[j]] = message.port_map[keys2[j]]; } - if (message.keyspace != null && message.hasOwnProperty('keyspace')) object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty('shard')) object.shard = message.shard; - if (message.key_range != null && message.hasOwnProperty('key_range')) + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.key_range != null && message.hasOwnProperty("key_range")) object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.type != null && message.hasOwnProperty('type')) + if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.topodata.TabletType[message.type] : message.type; - if (message.db_name_override != null && message.hasOwnProperty('db_name_override')) + if (message.db_name_override != null && message.hasOwnProperty("db_name_override")) object.db_name_override = message.db_name_override; if (message.tags && (keys2 = Object.keys(message.tags)).length) { object.tags = {}; - for (var j = 0; j < keys2.length; ++j) object.tags[keys2[j]] = message.tags[keys2[j]]; + for (var j = 0; j < keys2.length; ++j) + object.tags[keys2[j]] = message.tags[keys2[j]]; } - if (message.mysql_hostname != null && message.hasOwnProperty('mysql_hostname')) + if (message.mysql_hostname != null && message.hasOwnProperty("mysql_hostname")) object.mysql_hostname = message.mysql_hostname; - if (message.mysql_port != null && message.hasOwnProperty('mysql_port')) + if (message.mysql_port != null && message.hasOwnProperty("mysql_port")) object.mysql_port = message.mysql_port; - if (message.master_term_start_time != null && message.hasOwnProperty('master_term_start_time')) + if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) object.master_term_start_time = $root.vttime.Time.toObject(message.master_term_start_time, options); return object; }; @@ -2963,7 +3063,8 @@ $root.topodata = (function () { return Tablet; })(); - topodata.Shard = (function () { + topodata.Shard = (function() { + /** * Properties of a Shard. * @memberof topodata @@ -2991,7 +3092,8 @@ $root.topodata = (function () { this.tablet_controls = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3072,42 +3174,25 @@ $root.topodata = (function () { * @returns {$protobuf.Writer} Writer */ Shard.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.master_alias != null && Object.hasOwnProperty.call(message, 'master_alias')) - $root.topodata.TabletAlias.encode( - message.master_alias, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); - if (message.key_range != null && Object.hasOwnProperty.call(message, 'key_range')) - $root.topodata.KeyRange.encode( - message.key_range, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim(); + if (!writer) + writer = $Writer.create(); + if (message.master_alias != null && Object.hasOwnProperty.call(message, "master_alias")) + $root.topodata.TabletAlias.encode(message.master_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.served_types != null && message.served_types.length) for (var i = 0; i < message.served_types.length; ++i) - $root.topodata.Shard.ServedType.encode( - message.served_types[i], - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim(); + $root.topodata.Shard.ServedType.encode(message.served_types[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.source_shards != null && message.source_shards.length) for (var i = 0; i < message.source_shards.length; ++i) - $root.topodata.Shard.SourceShard.encode( - message.source_shards[i], - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim(); + $root.topodata.Shard.SourceShard.encode(message.source_shards[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.tablet_controls != null && message.tablet_controls.length) for (var i = 0; i < message.tablet_controls.length; ++i) - $root.topodata.Shard.TabletControl.encode( - message.tablet_controls[i], - writer.uint32(/* id 6, wireType 2 =*/ 50).fork() - ).ldelim(); - if (message.is_master_serving != null && Object.hasOwnProperty.call(message, 'is_master_serving')) - writer.uint32(/* id 7, wireType 0 =*/ 56).bool(message.is_master_serving); - if (message.master_term_start_time != null && Object.hasOwnProperty.call(message, 'master_term_start_time')) - $root.vttime.Time.encode( - message.master_term_start_time, - writer.uint32(/* id 8, wireType 2 =*/ 66).fork() - ).ldelim(); + $root.topodata.Shard.TabletControl.encode(message.tablet_controls[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.is_master_serving != null && Object.hasOwnProperty.call(message, "is_master_serving")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_master_serving); + if (message.master_term_start_time != null && Object.hasOwnProperty.call(message, "master_term_start_time")) + $root.vttime.Time.encode(message.master_term_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -3136,41 +3221,42 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Shard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Shard(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.master_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 8: - message.master_term_start_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.served_types && message.served_types.length)) message.served_types = []; - message.served_types.push($root.topodata.Shard.ServedType.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.source_shards && message.source_shards.length)) message.source_shards = []; - message.source_shards.push($root.topodata.Shard.SourceShard.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.tablet_controls && message.tablet_controls.length)) message.tablet_controls = []; - message.tablet_controls.push( - $root.topodata.Shard.TabletControl.decode(reader, reader.uint32()) - ); - break; - case 7: - message.is_master_serving = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.master_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + case 8: + message.master_term_start_time = $root.vttime.Time.decode(reader, reader.uint32()); + break; + case 2: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.served_types && message.served_types.length)) + message.served_types = []; + message.served_types.push($root.topodata.Shard.ServedType.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.source_shards && message.source_shards.length)) + message.source_shards = []; + message.source_shards.push($root.topodata.Shard.SourceShard.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.tablet_controls && message.tablet_controls.length)) + message.tablet_controls = []; + message.tablet_controls.push($root.topodata.Shard.TabletControl.decode(reader, reader.uint32())); + break; + case 7: + message.is_master_serving = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3187,7 +3273,8 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Shard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -3200,42 +3287,53 @@ $root.topodata = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Shard.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.master_alias != null && message.hasOwnProperty('master_alias')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.master_alias != null && message.hasOwnProperty("master_alias")) { var error = $root.topodata.TabletAlias.verify(message.master_alias); - if (error) return 'master_alias.' + error; + if (error) + return "master_alias." + error; } - if (message.master_term_start_time != null && message.hasOwnProperty('master_term_start_time')) { + if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) { var error = $root.vttime.Time.verify(message.master_term_start_time); - if (error) return 'master_term_start_time.' + error; + if (error) + return "master_term_start_time." + error; } - if (message.key_range != null && message.hasOwnProperty('key_range')) { + if (message.key_range != null && message.hasOwnProperty("key_range")) { var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) return 'key_range.' + error; + if (error) + return "key_range." + error; } - if (message.served_types != null && message.hasOwnProperty('served_types')) { - if (!Array.isArray(message.served_types)) return 'served_types: array expected'; + if (message.served_types != null && message.hasOwnProperty("served_types")) { + if (!Array.isArray(message.served_types)) + return "served_types: array expected"; for (var i = 0; i < message.served_types.length; ++i) { var error = $root.topodata.Shard.ServedType.verify(message.served_types[i]); - if (error) return 'served_types.' + error; + if (error) + return "served_types." + error; } } - if (message.source_shards != null && message.hasOwnProperty('source_shards')) { - if (!Array.isArray(message.source_shards)) return 'source_shards: array expected'; + if (message.source_shards != null && message.hasOwnProperty("source_shards")) { + if (!Array.isArray(message.source_shards)) + return "source_shards: array expected"; for (var i = 0; i < message.source_shards.length; ++i) { var error = $root.topodata.Shard.SourceShard.verify(message.source_shards[i]); - if (error) return 'source_shards.' + error; + if (error) + return "source_shards." + error; } } - if (message.tablet_controls != null && message.hasOwnProperty('tablet_controls')) { - if (!Array.isArray(message.tablet_controls)) return 'tablet_controls: array expected'; + if (message.tablet_controls != null && message.hasOwnProperty("tablet_controls")) { + if (!Array.isArray(message.tablet_controls)) + return "tablet_controls: array expected"; for (var i = 0; i < message.tablet_controls.length; ++i) { var error = $root.topodata.Shard.TabletControl.verify(message.tablet_controls[i]); - if (error) return 'tablet_controls.' + error; + if (error) + return "tablet_controls." + error; } } - if (message.is_master_serving != null && message.hasOwnProperty('is_master_serving')) - if (typeof message.is_master_serving !== 'boolean') return 'is_master_serving: boolean expected'; + if (message.is_master_serving != null && message.hasOwnProperty("is_master_serving")) + if (typeof message.is_master_serving !== "boolean") + return "is_master_serving: boolean expected"; return null; }; @@ -3248,55 +3346,56 @@ $root.topodata = (function () { * @returns {topodata.Shard} Shard */ Shard.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard) return object; + if (object instanceof $root.topodata.Shard) + return object; var message = new $root.topodata.Shard(); if (object.master_alias != null) { - if (typeof object.master_alias !== 'object') - throw TypeError('.topodata.Shard.master_alias: object expected'); + if (typeof object.master_alias !== "object") + throw TypeError(".topodata.Shard.master_alias: object expected"); message.master_alias = $root.topodata.TabletAlias.fromObject(object.master_alias); } if (object.master_term_start_time != null) { - if (typeof object.master_term_start_time !== 'object') - throw TypeError('.topodata.Shard.master_term_start_time: object expected'); + if (typeof object.master_term_start_time !== "object") + throw TypeError(".topodata.Shard.master_term_start_time: object expected"); message.master_term_start_time = $root.vttime.Time.fromObject(object.master_term_start_time); } if (object.key_range != null) { - if (typeof object.key_range !== 'object') throw TypeError('.topodata.Shard.key_range: object expected'); + if (typeof object.key_range !== "object") + throw TypeError(".topodata.Shard.key_range: object expected"); message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } if (object.served_types) { if (!Array.isArray(object.served_types)) - throw TypeError('.topodata.Shard.served_types: array expected'); + throw TypeError(".topodata.Shard.served_types: array expected"); message.served_types = []; for (var i = 0; i < object.served_types.length; ++i) { - if (typeof object.served_types[i] !== 'object') - throw TypeError('.topodata.Shard.served_types: object expected'); + if (typeof object.served_types[i] !== "object") + throw TypeError(".topodata.Shard.served_types: object expected"); message.served_types[i] = $root.topodata.Shard.ServedType.fromObject(object.served_types[i]); } } if (object.source_shards) { if (!Array.isArray(object.source_shards)) - throw TypeError('.topodata.Shard.source_shards: array expected'); + throw TypeError(".topodata.Shard.source_shards: array expected"); message.source_shards = []; for (var i = 0; i < object.source_shards.length; ++i) { - if (typeof object.source_shards[i] !== 'object') - throw TypeError('.topodata.Shard.source_shards: object expected'); + if (typeof object.source_shards[i] !== "object") + throw TypeError(".topodata.Shard.source_shards: object expected"); message.source_shards[i] = $root.topodata.Shard.SourceShard.fromObject(object.source_shards[i]); } } if (object.tablet_controls) { if (!Array.isArray(object.tablet_controls)) - throw TypeError('.topodata.Shard.tablet_controls: array expected'); + throw TypeError(".topodata.Shard.tablet_controls: array expected"); message.tablet_controls = []; for (var i = 0; i < object.tablet_controls.length; ++i) { - if (typeof object.tablet_controls[i] !== 'object') - throw TypeError('.topodata.Shard.tablet_controls: object expected'); - message.tablet_controls[i] = $root.topodata.Shard.TabletControl.fromObject( - object.tablet_controls[i] - ); + if (typeof object.tablet_controls[i] !== "object") + throw TypeError(".topodata.Shard.tablet_controls: object expected"); + message.tablet_controls[i] = $root.topodata.Shard.TabletControl.fromObject(object.tablet_controls[i]); } } - if (object.is_master_serving != null) message.is_master_serving = Boolean(object.is_master_serving); + if (object.is_master_serving != null) + message.is_master_serving = Boolean(object.is_master_serving); return message; }; @@ -3310,7 +3409,8 @@ $root.topodata = (function () { * @returns {Object.} Plain object */ Shard.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.arrays || options.defaults) { object.served_types = []; @@ -3323,9 +3423,9 @@ $root.topodata = (function () { object.is_master_serving = false; object.master_term_start_time = null; } - if (message.master_alias != null && message.hasOwnProperty('master_alias')) + if (message.master_alias != null && message.hasOwnProperty("master_alias")) object.master_alias = $root.topodata.TabletAlias.toObject(message.master_alias, options); - if (message.key_range != null && message.hasOwnProperty('key_range')) + if (message.key_range != null && message.hasOwnProperty("key_range")) object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); if (message.served_types && message.served_types.length) { object.served_types = []; @@ -3335,22 +3435,16 @@ $root.topodata = (function () { if (message.source_shards && message.source_shards.length) { object.source_shards = []; for (var j = 0; j < message.source_shards.length; ++j) - object.source_shards[j] = $root.topodata.Shard.SourceShard.toObject( - message.source_shards[j], - options - ); + object.source_shards[j] = $root.topodata.Shard.SourceShard.toObject(message.source_shards[j], options); } if (message.tablet_controls && message.tablet_controls.length) { object.tablet_controls = []; for (var j = 0; j < message.tablet_controls.length; ++j) - object.tablet_controls[j] = $root.topodata.Shard.TabletControl.toObject( - message.tablet_controls[j], - options - ); + object.tablet_controls[j] = $root.topodata.Shard.TabletControl.toObject(message.tablet_controls[j], options); } - if (message.is_master_serving != null && message.hasOwnProperty('is_master_serving')) + if (message.is_master_serving != null && message.hasOwnProperty("is_master_serving")) object.is_master_serving = message.is_master_serving; - if (message.master_term_start_time != null && message.hasOwnProperty('master_term_start_time')) + if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) object.master_term_start_time = $root.vttime.Time.toObject(message.master_term_start_time, options); return object; }; @@ -3366,7 +3460,8 @@ $root.topodata = (function () { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Shard.ServedType = (function () { + Shard.ServedType = (function() { + /** * Properties of a ServedType. * @memberof topodata.Shard @@ -3387,7 +3482,8 @@ $root.topodata = (function () { this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3428,12 +3524,13 @@ $root.topodata = (function () { * @returns {$protobuf.Writer} Writer */ ServedType.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, 'tablet_type')) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.tablet_type); + if (!writer) + writer = $Writer.create(); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); if (message.cells != null && message.cells.length) for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.cells[i]); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; @@ -3462,22 +3559,23 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServedType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Shard.ServedType(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard.ServedType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - if (!(message.cells && message.cells.length)) message.cells = []; - message.cells.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tablet_type = reader.int32(); + break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3494,7 +3592,8 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServedType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -3507,27 +3606,30 @@ $root.topodata = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ServedType.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) switch (message.tablet_type) { - default: - return 'tablet_type: enum value expected'; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - if (message.cells != null && message.hasOwnProperty('cells')) { - if (!Array.isArray(message.cells)) return 'cells: array expected'; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) return 'cells: string[] expected'; + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } return null; }; @@ -3541,55 +3643,57 @@ $root.topodata = (function () { * @returns {topodata.Shard.ServedType} ServedType */ ServedType.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard.ServedType) return object; + if (object instanceof $root.topodata.Shard.ServedType) + return object; var message = new $root.topodata.Shard.ServedType(); switch (object.tablet_type) { - case 'UNKNOWN': - case 0: - message.tablet_type = 0; - break; - case 'MASTER': - case 1: - message.tablet_type = 1; - break; - case 'REPLICA': - case 2: - message.tablet_type = 2; - break; - case 'RDONLY': - case 3: - message.tablet_type = 3; - break; - case 'BATCH': - case 3: - message.tablet_type = 3; - break; - case 'SPARE': - case 4: - message.tablet_type = 4; - break; - case 'EXPERIMENTAL': - case 5: - message.tablet_type = 5; - break; - case 'BACKUP': - case 6: - message.tablet_type = 6; - break; - case 'RESTORE': - case 7: - message.tablet_type = 7; - break; - case 'DRAINED': - case 8: - message.tablet_type = 8; - break; + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; } if (object.cells) { if (!Array.isArray(object.cells)) - throw TypeError('.topodata.Shard.ServedType.cells: array expected'); + throw TypeError(".topodata.Shard.ServedType.cells: array expected"); message.cells = []; - for (var i = 0; i < object.cells.length; ++i) message.cells[i] = String(object.cells[i]); + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } return message; }; @@ -3604,16 +3708,19 @@ $root.topodata = (function () { * @returns {Object.} Plain object */ ServedType.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.cells = []; - if (options.defaults) object.tablet_type = options.enums === String ? 'UNKNOWN' : 0; - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) - object.tablet_type = - options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (options.arrays || options.defaults) + object.cells = []; + if (options.defaults) + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; if (message.cells && message.cells.length) { object.cells = []; - for (var j = 0; j < message.cells.length; ++j) object.cells[j] = message.cells[j]; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } return object; }; @@ -3632,7 +3739,8 @@ $root.topodata = (function () { return ServedType; })(); - Shard.SourceShard = (function () { + Shard.SourceShard = (function() { + /** * Properties of a SourceShard. * @memberof topodata.Shard @@ -3656,7 +3764,8 @@ $root.topodata = (function () { this.tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -3673,7 +3782,7 @@ $root.topodata = (function () { * @memberof topodata.Shard.SourceShard * @instance */ - SourceShard.prototype.keyspace = ''; + SourceShard.prototype.keyspace = ""; /** * SourceShard shard. @@ -3681,7 +3790,7 @@ $root.topodata = (function () { * @memberof topodata.Shard.SourceShard * @instance */ - SourceShard.prototype.shard = ''; + SourceShard.prototype.shard = ""; /** * SourceShard key_range. @@ -3721,21 +3830,19 @@ $root.topodata = (function () { * @returns {$protobuf.Writer} Writer */ SourceShard.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.uid != null && Object.hasOwnProperty.call(message, 'uid')) - writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.uid); - if (message.keyspace != null && Object.hasOwnProperty.call(message, 'keyspace')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, 'shard')) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.shard); - if (message.key_range != null && Object.hasOwnProperty.call(message, 'key_range')) - $root.topodata.KeyRange.encode( - message.key_range, - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim(); + if (!writer) + writer = $Writer.create(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.uid); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); + if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.tables != null && message.tables.length) for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.tables[i]); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tables[i]); return writer; }; @@ -3764,31 +3871,32 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SourceShard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Shard.SourceShard(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard.SourceShard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.uid = reader.uint32(); - break; - case 2: - message.keyspace = reader.string(); - break; - case 3: - message.shard = reader.string(); - break; - case 4: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.tables && message.tables.length)) message.tables = []; - message.tables.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.uid = reader.uint32(); + break; + case 2: + message.keyspace = reader.string(); + break; + case 3: + message.shard = reader.string(); + break; + case 4: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -3805,7 +3913,8 @@ $root.topodata = (function () { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SourceShard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -3818,21 +3927,28 @@ $root.topodata = (function () { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SourceShard.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.uid != null && message.hasOwnProperty('uid')) - if (!$util.isInteger(message.uid)) return 'uid: integer expected'; - if (message.keyspace != null && message.hasOwnProperty('keyspace')) - if (!$util.isString(message.keyspace)) return 'keyspace: string expected'; - if (message.shard != null && message.hasOwnProperty('shard')) - if (!$util.isString(message.shard)) return 'shard: string expected'; - if (message.key_range != null && message.hasOwnProperty('key_range')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isInteger(message.uid)) + return "uid: integer expected"; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; + if (message.shard != null && message.hasOwnProperty("shard")) + if (!$util.isString(message.shard)) + return "shard: string expected"; + if (message.key_range != null && message.hasOwnProperty("key_range")) { var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) return 'key_range.' + error; + if (error) + return "key_range." + error; } - if (message.tables != null && message.hasOwnProperty('tables')) { - if (!Array.isArray(message.tables)) return 'tables: array expected'; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) return 'tables: string[] expected'; + if (!$util.isString(message.tables[i])) + return "tables: string[] expected"; } return null; }; @@ -3846,21 +3962,26 @@ $root.topodata = (function () { * @returns {topodata.Shard.SourceShard} SourceShard */ SourceShard.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard.SourceShard) return object; + if (object instanceof $root.topodata.Shard.SourceShard) + return object; var message = new $root.topodata.Shard.SourceShard(); - if (object.uid != null) message.uid = object.uid >>> 0; - if (object.keyspace != null) message.keyspace = String(object.keyspace); - if (object.shard != null) message.shard = String(object.shard); + if (object.uid != null) + message.uid = object.uid >>> 0; + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.shard != null) + message.shard = String(object.shard); if (object.key_range != null) { - if (typeof object.key_range !== 'object') - throw TypeError('.topodata.Shard.SourceShard.key_range: object expected'); + if (typeof object.key_range !== "object") + throw TypeError(".topodata.Shard.SourceShard.key_range: object expected"); message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } if (object.tables) { if (!Array.isArray(object.tables)) - throw TypeError('.topodata.Shard.SourceShard.tables: array expected'); + throw TypeError(".topodata.Shard.SourceShard.tables: array expected"); message.tables = []; - for (var i = 0; i < object.tables.length; ++i) message.tables[i] = String(object.tables[i]); + for (var i = 0; i < object.tables.length; ++i) + message.tables[i] = String(object.tables[i]); } return message; }; @@ -3875,23 +3996,29 @@ $root.topodata = (function () { * @returns {Object.} Plain object */ SourceShard.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.tables = []; + if (options.arrays || options.defaults) + object.tables = []; if (options.defaults) { object.uid = 0; - object.keyspace = ''; - object.shard = ''; + object.keyspace = ""; + object.shard = ""; object.key_range = null; } - if (message.uid != null && message.hasOwnProperty('uid')) object.uid = message.uid; - if (message.keyspace != null && message.hasOwnProperty('keyspace')) object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty('shard')) object.shard = message.shard; - if (message.key_range != null && message.hasOwnProperty('key_range')) + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + if (message.shard != null && message.hasOwnProperty("shard")) + object.shard = message.shard; + if (message.key_range != null && message.hasOwnProperty("key_range")) object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); if (message.tables && message.tables.length) { object.tables = []; - for (var j = 0; j < message.tables.length; ++j) object.tables[j] = message.tables[j]; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = message.tables[j]; } return object; }; @@ -3910,7 +4037,8 @@ $root.topodata = (function () { return SourceShard; })(); - Shard.TabletControl = (function () { + Shard.TabletControl = (function() { + /** * Properties of a TabletControl. * @memberof topodata.Shard @@ -3934,71101 +4062,41 @@ $root.topodata = (function () { this.blacklisted_tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - /** - * GetSchemaRequest table. - * @member {string} table - * @memberof vtadmin.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table = ""; + /** + * TabletControl tablet_type. + * @member {topodata.TabletType} tablet_type + * @memberof topodata.Shard.TabletControl + * @instance + */ + TabletControl.prototype.tablet_type = 0; - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @function create - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {vtadmin.IGetSchemaRequest=} [properties] Properties to set - * @returns {vtadmin.GetSchemaRequest} GetSchemaRequest instance - */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); - }; + /** + * TabletControl cells. + * @member {Array.} cells + * @memberof topodata.Shard.TabletControl + * @instance + */ + TabletControl.prototype.cells = $util.emptyArray; - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtadmin.GetSchemaRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {vtadmin.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cluster_id != null && Object.hasOwnProperty.call(message, "cluster_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_id); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.table); - return writer; - }; + /** + * TabletControl blacklisted_tables. + * @member {Array.} blacklisted_tables + * @memberof topodata.Shard.TabletControl + * @instance + */ + TabletControl.prototype.blacklisted_tables = $util.emptyArray; - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtadmin.GetSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {vtadmin.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cluster_id = reader.string(); - break; - case 2: - message.keyspace = reader.string(); - break; - case 3: - message.table = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaRequest message. - * @function verify - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) - if (!$util.isString(message.cluster_id)) - return "cluster_id: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetSchemaRequest} GetSchemaRequest - */ - GetSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetSchemaRequest) - return object; - var message = new $root.vtadmin.GetSchemaRequest(); - if (object.cluster_id != null) - message.cluster_id = String(object.cluster_id); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.table != null) - message.table = String(object.table); - return message; - }; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetSchemaRequest - * @static - * @param {vtadmin.GetSchemaRequest} message GetSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cluster_id = ""; - object.keyspace = ""; - object.table = ""; - } - if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) - object.cluster_id = message.cluster_id; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - return object; - }; - - /** - * Converts this GetSchemaRequest to JSON. - * @function toJSON - * @memberof vtadmin.GetSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemaRequest; - })(); - - vtadmin.GetSchemasRequest = (function() { - - /** - * Properties of a GetSchemasRequest. - * @memberof vtadmin - * @interface IGetSchemasRequest - * @property {Array.|null} [cluster_ids] GetSchemasRequest cluster_ids - */ - - /** - * Constructs a new GetSchemasRequest. - * @memberof vtadmin - * @classdesc Represents a GetSchemasRequest. - * @implements IGetSchemasRequest - * @constructor - * @param {vtadmin.IGetSchemasRequest=} [properties] Properties to set - */ - function GetSchemasRequest(properties) { - this.cluster_ids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemasRequest cluster_ids. - * @member {Array.} cluster_ids - * @memberof vtadmin.GetSchemasRequest - * @instance - */ - GetSchemasRequest.prototype.cluster_ids = $util.emptyArray; - - /** - * Creates a new GetSchemasRequest instance using the specified properties. - * @function create - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {vtadmin.IGetSchemasRequest=} [properties] Properties to set - * @returns {vtadmin.GetSchemasRequest} GetSchemasRequest instance - */ - GetSchemasRequest.create = function create(properties) { - return new GetSchemasRequest(properties); - }; - - /** - * Encodes the specified GetSchemasRequest message. Does not implicitly {@link vtadmin.GetSchemasRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {vtadmin.IGetSchemasRequest} message GetSchemasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemasRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cluster_ids != null && message.cluster_ids.length) - for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_ids[i]); - return writer; - }; - - /** - * Encodes the specified GetSchemasRequest message, length delimited. Does not implicitly {@link vtadmin.GetSchemasRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {vtadmin.IGetSchemasRequest} message GetSchemasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemasRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetSchemasRequest} GetSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemasRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetSchemasRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.cluster_ids && message.cluster_ids.length)) - message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemasRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetSchemasRequest} GetSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemasRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemasRequest message. - * @function verify - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemasRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { - if (!Array.isArray(message.cluster_ids)) - return "cluster_ids: array expected"; - for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) - return "cluster_ids: string[] expected"; - } - return null; - }; - - /** - * Creates a GetSchemasRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetSchemasRequest} GetSchemasRequest - */ - GetSchemasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetSchemasRequest) - return object; - var message = new $root.vtadmin.GetSchemasRequest(); - if (object.cluster_ids) { - if (!Array.isArray(object.cluster_ids)) - throw TypeError(".vtadmin.GetSchemasRequest.cluster_ids: array expected"); - message.cluster_ids = []; - for (var i = 0; i < object.cluster_ids.length; ++i) - message.cluster_ids[i] = String(object.cluster_ids[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetSchemasRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetSchemasRequest - * @static - * @param {vtadmin.GetSchemasRequest} message GetSchemasRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemasRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cluster_ids = []; - if (message.cluster_ids && message.cluster_ids.length) { - object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) - object.cluster_ids[j] = message.cluster_ids[j]; - } - return object; - }; - - /** - * Converts this GetSchemasRequest to JSON. - * @function toJSON - * @memberof vtadmin.GetSchemasRequest - * @instance - * @returns {Object.} JSON object - */ - GetSchemasRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemasRequest; - })(); - - vtadmin.GetSchemasResponse = (function() { - - /** - * Properties of a GetSchemasResponse. - * @memberof vtadmin - * @interface IGetSchemasResponse - * @property {Array.|null} [schemas] GetSchemasResponse schemas - */ - - /** - * Constructs a new GetSchemasResponse. - * @memberof vtadmin - * @classdesc Represents a GetSchemasResponse. - * @implements IGetSchemasResponse - * @constructor - * @param {vtadmin.IGetSchemasResponse=} [properties] Properties to set - */ - function GetSchemasResponse(properties) { - this.schemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemasResponse schemas. - * @member {Array.} schemas - * @memberof vtadmin.GetSchemasResponse - * @instance - */ - GetSchemasResponse.prototype.schemas = $util.emptyArray; - - /** - * Creates a new GetSchemasResponse instance using the specified properties. - * @function create - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {vtadmin.IGetSchemasResponse=} [properties] Properties to set - * @returns {vtadmin.GetSchemasResponse} GetSchemasResponse instance - */ - GetSchemasResponse.create = function create(properties) { - return new GetSchemasResponse(properties); - }; - - /** - * Encodes the specified GetSchemasResponse message. Does not implicitly {@link vtadmin.GetSchemasResponse.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {vtadmin.IGetSchemasResponse} message GetSchemasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemasResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schemas != null && message.schemas.length) - for (var i = 0; i < message.schemas.length; ++i) - $root.vtadmin.Schema.encode(message.schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetSchemasResponse message, length delimited. Does not implicitly {@link vtadmin.GetSchemasResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {vtadmin.IGetSchemasResponse} message GetSchemasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemasResponse message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetSchemasResponse} GetSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemasResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetSchemasResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.schemas && message.schemas.length)) - message.schemas = []; - message.schemas.push($root.vtadmin.Schema.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemasResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetSchemasResponse} GetSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemasResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemasResponse message. - * @function verify - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemasResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schemas != null && message.hasOwnProperty("schemas")) { - if (!Array.isArray(message.schemas)) - return "schemas: array expected"; - for (var i = 0; i < message.schemas.length; ++i) { - var error = $root.vtadmin.Schema.verify(message.schemas[i]); - if (error) - return "schemas." + error; - } - } - return null; - }; - - /** - * Creates a GetSchemasResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetSchemasResponse} GetSchemasResponse - */ - GetSchemasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetSchemasResponse) - return object; - var message = new $root.vtadmin.GetSchemasResponse(); - if (object.schemas) { - if (!Array.isArray(object.schemas)) - throw TypeError(".vtadmin.GetSchemasResponse.schemas: array expected"); - message.schemas = []; - for (var i = 0; i < object.schemas.length; ++i) { - if (typeof object.schemas[i] !== "object") - throw TypeError(".vtadmin.GetSchemasResponse.schemas: object expected"); - message.schemas[i] = $root.vtadmin.Schema.fromObject(object.schemas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetSchemasResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetSchemasResponse - * @static - * @param {vtadmin.GetSchemasResponse} message GetSchemasResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemasResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.schemas = []; - if (message.schemas && message.schemas.length) { - object.schemas = []; - for (var j = 0; j < message.schemas.length; ++j) - object.schemas[j] = $root.vtadmin.Schema.toObject(message.schemas[j], options); - } - return object; - }; - - /** - * Converts this GetSchemasResponse to JSON. - * @function toJSON - * @memberof vtadmin.GetSchemasResponse - * @instance - * @returns {Object.} JSON object - */ - GetSchemasResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemasResponse; - })(); - - vtadmin.GetTabletRequest = (function() { - - /** - * Properties of a GetTabletRequest. - * @memberof vtadmin - * @interface IGetTabletRequest - * @property {string|null} [hostname] GetTabletRequest hostname - * @property {Array.|null} [cluster_ids] GetTabletRequest cluster_ids - */ - - /** - * Constructs a new GetTabletRequest. - * @memberof vtadmin - * @classdesc Represents a GetTabletRequest. - * @implements IGetTabletRequest - * @constructor - * @param {vtadmin.IGetTabletRequest=} [properties] Properties to set - */ - function GetTabletRequest(properties) { - this.cluster_ids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletRequest hostname. - * @member {string} hostname - * @memberof vtadmin.GetTabletRequest - * @instance - */ - GetTabletRequest.prototype.hostname = ""; - - /** - * GetTabletRequest cluster_ids. - * @member {Array.} cluster_ids - * @memberof vtadmin.GetTabletRequest - * @instance - */ - GetTabletRequest.prototype.cluster_ids = $util.emptyArray; - - /** - * Creates a new GetTabletRequest instance using the specified properties. - * @function create - * @memberof vtadmin.GetTabletRequest - * @static - * @param {vtadmin.IGetTabletRequest=} [properties] Properties to set - * @returns {vtadmin.GetTabletRequest} GetTabletRequest instance - */ - GetTabletRequest.create = function create(properties) { - return new GetTabletRequest(properties); - }; - - /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetTabletRequest - * @static - * @param {vtadmin.IGetTabletRequest} message GetTabletRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.cluster_ids != null && message.cluster_ids.length) - for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cluster_ids[i]); - return writer; - }; - - /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetTabletRequest - * @static - * @param {vtadmin.IGetTabletRequest} message GetTabletRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetTabletRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetTabletRequest} GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetTabletRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hostname = reader.string(); - break; - case 2: - if (!(message.cluster_ids && message.cluster_ids.length)) - message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetTabletRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetTabletRequest} GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletRequest message. - * @function verify - * @memberof vtadmin.GetTabletRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { - if (!Array.isArray(message.cluster_ids)) - return "cluster_ids: array expected"; - for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) - return "cluster_ids: string[] expected"; - } - return null; - }; - - /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetTabletRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetTabletRequest} GetTabletRequest - */ - GetTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetTabletRequest) - return object; - var message = new $root.vtadmin.GetTabletRequest(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.cluster_ids) { - if (!Array.isArray(object.cluster_ids)) - throw TypeError(".vtadmin.GetTabletRequest.cluster_ids: array expected"); - message.cluster_ids = []; - for (var i = 0; i < object.cluster_ids.length; ++i) - message.cluster_ids[i] = String(object.cluster_ids[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetTabletRequest - * @static - * @param {vtadmin.GetTabletRequest} message GetTabletRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cluster_ids = []; - if (options.defaults) - object.hostname = ""; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.cluster_ids && message.cluster_ids.length) { - object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) - object.cluster_ids[j] = message.cluster_ids[j]; - } - return object; - }; - - /** - * Converts this GetTabletRequest to JSON. - * @function toJSON - * @memberof vtadmin.GetTabletRequest - * @instance - * @returns {Object.} JSON object - */ - GetTabletRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletRequest; - })(); - - vtadmin.GetTabletsRequest = (function() { - - /** - * Properties of a GetTabletsRequest. - * @memberof vtadmin - * @interface IGetTabletsRequest - * @property {Array.|null} [cluster_ids] GetTabletsRequest cluster_ids - */ - - /** - * Constructs a new GetTabletsRequest. - * @memberof vtadmin - * @classdesc Represents a GetTabletsRequest. - * @implements IGetTabletsRequest - * @constructor - * @param {vtadmin.IGetTabletsRequest=} [properties] Properties to set - */ - function GetTabletsRequest(properties) { - this.cluster_ids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletsRequest cluster_ids. - * @member {Array.} cluster_ids - * @memberof vtadmin.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.cluster_ids = $util.emptyArray; - - /** - * Creates a new GetTabletsRequest instance using the specified properties. - * @function create - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {vtadmin.IGetTabletsRequest=} [properties] Properties to set - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest instance - */ - GetTabletsRequest.create = function create(properties) { - return new GetTabletsRequest(properties); - }; - - /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {vtadmin.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cluster_ids != null && message.cluster_ids.length) - for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_ids[i]); - return writer; - }; - - /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {vtadmin.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetTabletsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.cluster_ids && message.cluster_ids.length)) - message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletsRequest message. - * @function verify - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { - if (!Array.isArray(message.cluster_ids)) - return "cluster_ids: array expected"; - for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) - return "cluster_ids: string[] expected"; - } - return null; - }; - - /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest - */ - GetTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetTabletsRequest) - return object; - var message = new $root.vtadmin.GetTabletsRequest(); - if (object.cluster_ids) { - if (!Array.isArray(object.cluster_ids)) - throw TypeError(".vtadmin.GetTabletsRequest.cluster_ids: array expected"); - message.cluster_ids = []; - for (var i = 0; i < object.cluster_ids.length; ++i) - message.cluster_ids[i] = String(object.cluster_ids[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetTabletsRequest - * @static - * @param {vtadmin.GetTabletsRequest} message GetTabletsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cluster_ids = []; - if (message.cluster_ids && message.cluster_ids.length) { - object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) - object.cluster_ids[j] = message.cluster_ids[j]; - } - return object; - }; - - /** - * Converts this GetTabletsRequest to JSON. - * @function toJSON - * @memberof vtadmin.GetTabletsRequest - * @instance - * @returns {Object.} JSON object - */ - GetTabletsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletsRequest; - })(); - - vtadmin.GetTabletsResponse = (function() { - - /** - * Properties of a GetTabletsResponse. - * @memberof vtadmin - * @interface IGetTabletsResponse - * @property {Array.|null} [tablets] GetTabletsResponse tablets - */ - - /** - * Constructs a new GetTabletsResponse. - * @memberof vtadmin - * @classdesc Represents a GetTabletsResponse. - * @implements IGetTabletsResponse - * @constructor - * @param {vtadmin.IGetTabletsResponse=} [properties] Properties to set - */ - function GetTabletsResponse(properties) { - this.tablets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletsResponse tablets. - * @member {Array.} tablets - * @memberof vtadmin.GetTabletsResponse - * @instance - */ - GetTabletsResponse.prototype.tablets = $util.emptyArray; - - /** - * Creates a new GetTabletsResponse instance using the specified properties. - * @function create - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {vtadmin.IGetTabletsResponse=} [properties] Properties to set - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse instance - */ - GetTabletsResponse.create = function create(properties) { - return new GetTabletsResponse(properties); - }; - - /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtadmin.GetTabletsResponse.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {vtadmin.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablets != null && message.tablets.length) - for (var i = 0; i < message.tablets.length; ++i) - $root.vtadmin.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtadmin.GetTabletsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {vtadmin.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetTabletsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.tablets && message.tablets.length)) - message.tablets = []; - message.tablets.push($root.vtadmin.Tablet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletsResponse message. - * @function verify - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablets != null && message.hasOwnProperty("tablets")) { - if (!Array.isArray(message.tablets)) - return "tablets: array expected"; - for (var i = 0; i < message.tablets.length; ++i) { - var error = $root.vtadmin.Tablet.verify(message.tablets[i]); - if (error) - return "tablets." + error; - } - } - return null; - }; - - /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse - */ - GetTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetTabletsResponse) - return object; - var message = new $root.vtadmin.GetTabletsResponse(); - if (object.tablets) { - if (!Array.isArray(object.tablets)) - throw TypeError(".vtadmin.GetTabletsResponse.tablets: array expected"); - message.tablets = []; - for (var i = 0; i < object.tablets.length; ++i) { - if (typeof object.tablets[i] !== "object") - throw TypeError(".vtadmin.GetTabletsResponse.tablets: object expected"); - message.tablets[i] = $root.vtadmin.Tablet.fromObject(object.tablets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetTabletsResponse - * @static - * @param {vtadmin.GetTabletsResponse} message GetTabletsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tablets = []; - if (message.tablets && message.tablets.length) { - object.tablets = []; - for (var j = 0; j < message.tablets.length; ++j) - object.tablets[j] = $root.vtadmin.Tablet.toObject(message.tablets[j], options); - } - return object; - }; - - /** - * Converts this GetTabletsResponse to JSON. - * @function toJSON - * @memberof vtadmin.GetTabletsResponse - * @instance - * @returns {Object.} JSON object - */ - GetTabletsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletsResponse; - })(); - - vtadmin.GetVSchemaRequest = (function() { - - /** - * Properties of a GetVSchemaRequest. - * @memberof vtadmin - * @interface IGetVSchemaRequest - * @property {string|null} [cluster_id] GetVSchemaRequest cluster_id - * @property {string|null} [keyspace] GetVSchemaRequest keyspace - */ - - /** - * Constructs a new GetVSchemaRequest. - * @memberof vtadmin - * @classdesc Represents a GetVSchemaRequest. - * @implements IGetVSchemaRequest - * @constructor - * @param {vtadmin.IGetVSchemaRequest=} [properties] Properties to set - */ - function GetVSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVSchemaRequest cluster_id. - * @member {string} cluster_id - * @memberof vtadmin.GetVSchemaRequest - * @instance - */ - GetVSchemaRequest.prototype.cluster_id = ""; - - /** - * GetVSchemaRequest keyspace. - * @member {string} keyspace - * @memberof vtadmin.GetVSchemaRequest - * @instance - */ - GetVSchemaRequest.prototype.keyspace = ""; - - /** - * Creates a new GetVSchemaRequest instance using the specified properties. - * @function create - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {vtadmin.IGetVSchemaRequest=} [properties] Properties to set - * @returns {vtadmin.GetVSchemaRequest} GetVSchemaRequest instance - */ - GetVSchemaRequest.create = function create(properties) { - return new GetVSchemaRequest(properties); - }; - - /** - * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtadmin.GetVSchemaRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {vtadmin.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cluster_id != null && Object.hasOwnProperty.call(message, "cluster_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_id); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtadmin.GetVSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {vtadmin.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetVSchemaRequest} GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetVSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cluster_id = reader.string(); - break; - case 2: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetVSchemaRequest} GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVSchemaRequest message. - * @function verify - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) - if (!$util.isString(message.cluster_id)) - return "cluster_id: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetVSchemaRequest} GetVSchemaRequest - */ - GetVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetVSchemaRequest) - return object; - var message = new $root.vtadmin.GetVSchemaRequest(); - if (object.cluster_id != null) - message.cluster_id = String(object.cluster_id); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetVSchemaRequest - * @static - * @param {vtadmin.GetVSchemaRequest} message GetVSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cluster_id = ""; - object.keyspace = ""; - } - if (message.cluster_id != null && message.hasOwnProperty("cluster_id")) - object.cluster_id = message.cluster_id; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this GetVSchemaRequest to JSON. - * @function toJSON - * @memberof vtadmin.GetVSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetVSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetVSchemaRequest; - })(); - - vtadmin.GetVSchemasRequest = (function() { - - /** - * Properties of a GetVSchemasRequest. - * @memberof vtadmin - * @interface IGetVSchemasRequest - * @property {Array.|null} [cluster_ids] GetVSchemasRequest cluster_ids - */ - - /** - * Constructs a new GetVSchemasRequest. - * @memberof vtadmin - * @classdesc Represents a GetVSchemasRequest. - * @implements IGetVSchemasRequest - * @constructor - * @param {vtadmin.IGetVSchemasRequest=} [properties] Properties to set - */ - function GetVSchemasRequest(properties) { - this.cluster_ids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVSchemasRequest cluster_ids. - * @member {Array.} cluster_ids - * @memberof vtadmin.GetVSchemasRequest - * @instance - */ - GetVSchemasRequest.prototype.cluster_ids = $util.emptyArray; - - /** - * Creates a new GetVSchemasRequest instance using the specified properties. - * @function create - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {vtadmin.IGetVSchemasRequest=} [properties] Properties to set - * @returns {vtadmin.GetVSchemasRequest} GetVSchemasRequest instance - */ - GetVSchemasRequest.create = function create(properties) { - return new GetVSchemasRequest(properties); - }; - - /** - * Encodes the specified GetVSchemasRequest message. Does not implicitly {@link vtadmin.GetVSchemasRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {vtadmin.IGetVSchemasRequest} message GetVSchemasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemasRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cluster_ids != null && message.cluster_ids.length) - for (var i = 0; i < message.cluster_ids.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster_ids[i]); - return writer; - }; - - /** - * Encodes the specified GetVSchemasRequest message, length delimited. Does not implicitly {@link vtadmin.GetVSchemasRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {vtadmin.IGetVSchemasRequest} message GetVSchemasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVSchemasRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetVSchemasRequest} GetVSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemasRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetVSchemasRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.cluster_ids && message.cluster_ids.length)) - message.cluster_ids = []; - message.cluster_ids.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVSchemasRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetVSchemasRequest} GetVSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemasRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVSchemasRequest message. - * @function verify - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVSchemasRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster_ids != null && message.hasOwnProperty("cluster_ids")) { - if (!Array.isArray(message.cluster_ids)) - return "cluster_ids: array expected"; - for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) - return "cluster_ids: string[] expected"; - } - return null; - }; - - /** - * Creates a GetVSchemasRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetVSchemasRequest} GetVSchemasRequest - */ - GetVSchemasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetVSchemasRequest) - return object; - var message = new $root.vtadmin.GetVSchemasRequest(); - if (object.cluster_ids) { - if (!Array.isArray(object.cluster_ids)) - throw TypeError(".vtadmin.GetVSchemasRequest.cluster_ids: array expected"); - message.cluster_ids = []; - for (var i = 0; i < object.cluster_ids.length; ++i) - message.cluster_ids[i] = String(object.cluster_ids[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetVSchemasRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetVSchemasRequest - * @static - * @param {vtadmin.GetVSchemasRequest} message GetVSchemasRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVSchemasRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cluster_ids = []; - if (message.cluster_ids && message.cluster_ids.length) { - object.cluster_ids = []; - for (var j = 0; j < message.cluster_ids.length; ++j) - object.cluster_ids[j] = message.cluster_ids[j]; - } - return object; - }; - - /** - * Converts this GetVSchemasRequest to JSON. - * @function toJSON - * @memberof vtadmin.GetVSchemasRequest - * @instance - * @returns {Object.} JSON object - */ - GetVSchemasRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetVSchemasRequest; - })(); - - vtadmin.GetVSchemasResponse = (function() { - - /** - * Properties of a GetVSchemasResponse. - * @memberof vtadmin - * @interface IGetVSchemasResponse - * @property {Array.|null} [v_schemas] GetVSchemasResponse v_schemas - */ - - /** - * Constructs a new GetVSchemasResponse. - * @memberof vtadmin - * @classdesc Represents a GetVSchemasResponse. - * @implements IGetVSchemasResponse - * @constructor - * @param {vtadmin.IGetVSchemasResponse=} [properties] Properties to set - */ - function GetVSchemasResponse(properties) { - this.v_schemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVSchemasResponse v_schemas. - * @member {Array.} v_schemas - * @memberof vtadmin.GetVSchemasResponse - * @instance - */ - GetVSchemasResponse.prototype.v_schemas = $util.emptyArray; - - /** - * Creates a new GetVSchemasResponse instance using the specified properties. - * @function create - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {vtadmin.IGetVSchemasResponse=} [properties] Properties to set - * @returns {vtadmin.GetVSchemasResponse} GetVSchemasResponse instance - */ - GetVSchemasResponse.create = function create(properties) { - return new GetVSchemasResponse(properties); - }; - - /** - * Encodes the specified GetVSchemasResponse message. Does not implicitly {@link vtadmin.GetVSchemasResponse.verify|verify} messages. - * @function encode - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {vtadmin.IGetVSchemasResponse} message GetVSchemasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemasResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.v_schemas != null && message.v_schemas.length) - for (var i = 0; i < message.v_schemas.length; ++i) - $root.vtadmin.VSchema.encode(message.v_schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetVSchemasResponse message, length delimited. Does not implicitly {@link vtadmin.GetVSchemasResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {vtadmin.IGetVSchemasResponse} message GetVSchemasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVSchemasResponse message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetVSchemasResponse} GetVSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemasResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.GetVSchemasResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.v_schemas && message.v_schemas.length)) - message.v_schemas = []; - message.v_schemas.push($root.vtadmin.VSchema.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVSchemasResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetVSchemasResponse} GetVSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemasResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVSchemasResponse message. - * @function verify - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVSchemasResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.v_schemas != null && message.hasOwnProperty("v_schemas")) { - if (!Array.isArray(message.v_schemas)) - return "v_schemas: array expected"; - for (var i = 0; i < message.v_schemas.length; ++i) { - var error = $root.vtadmin.VSchema.verify(message.v_schemas[i]); - if (error) - return "v_schemas." + error; - } - } - return null; - }; - - /** - * Creates a GetVSchemasResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.GetVSchemasResponse} GetVSchemasResponse - */ - GetVSchemasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.GetVSchemasResponse) - return object; - var message = new $root.vtadmin.GetVSchemasResponse(); - if (object.v_schemas) { - if (!Array.isArray(object.v_schemas)) - throw TypeError(".vtadmin.GetVSchemasResponse.v_schemas: array expected"); - message.v_schemas = []; - for (var i = 0; i < object.v_schemas.length; ++i) { - if (typeof object.v_schemas[i] !== "object") - throw TypeError(".vtadmin.GetVSchemasResponse.v_schemas: object expected"); - message.v_schemas[i] = $root.vtadmin.VSchema.fromObject(object.v_schemas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetVSchemasResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.GetVSchemasResponse - * @static - * @param {vtadmin.GetVSchemasResponse} message GetVSchemasResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVSchemasResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.v_schemas = []; - if (message.v_schemas && message.v_schemas.length) { - object.v_schemas = []; - for (var j = 0; j < message.v_schemas.length; ++j) - object.v_schemas[j] = $root.vtadmin.VSchema.toObject(message.v_schemas[j], options); - } - return object; - }; - - /** - * Converts this GetVSchemasResponse to JSON. - * @function toJSON - * @memberof vtadmin.GetVSchemasResponse - * @instance - * @returns {Object.} JSON object - */ - GetVSchemasResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetVSchemasResponse; - })(); - - vtadmin.VTExplainRequest = (function() { - - /** - * Properties of a VTExplainRequest. - * @memberof vtadmin - * @interface IVTExplainRequest - * @property {string|null} [cluster] VTExplainRequest cluster - * @property {string|null} [keyspace] VTExplainRequest keyspace - * @property {string|null} [sql] VTExplainRequest sql - */ - - /** - * Constructs a new VTExplainRequest. - * @memberof vtadmin - * @classdesc Represents a VTExplainRequest. - * @implements IVTExplainRequest - * @constructor - * @param {vtadmin.IVTExplainRequest=} [properties] Properties to set - */ - function VTExplainRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VTExplainRequest cluster. - * @member {string} cluster - * @memberof vtadmin.VTExplainRequest - * @instance - */ - VTExplainRequest.prototype.cluster = ""; - - /** - * VTExplainRequest keyspace. - * @member {string} keyspace - * @memberof vtadmin.VTExplainRequest - * @instance - */ - VTExplainRequest.prototype.keyspace = ""; - - /** - * VTExplainRequest sql. - * @member {string} sql - * @memberof vtadmin.VTExplainRequest - * @instance - */ - VTExplainRequest.prototype.sql = ""; - - /** - * Creates a new VTExplainRequest instance using the specified properties. - * @function create - * @memberof vtadmin.VTExplainRequest - * @static - * @param {vtadmin.IVTExplainRequest=} [properties] Properties to set - * @returns {vtadmin.VTExplainRequest} VTExplainRequest instance - */ - VTExplainRequest.create = function create(properties) { - return new VTExplainRequest(properties); - }; - - /** - * Encodes the specified VTExplainRequest message. Does not implicitly {@link vtadmin.VTExplainRequest.verify|verify} messages. - * @function encode - * @memberof vtadmin.VTExplainRequest - * @static - * @param {vtadmin.IVTExplainRequest} message VTExplainRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VTExplainRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sql); - return writer; - }; - - /** - * Encodes the specified VTExplainRequest message, length delimited. Does not implicitly {@link vtadmin.VTExplainRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.VTExplainRequest - * @static - * @param {vtadmin.IVTExplainRequest} message VTExplainRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VTExplainRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VTExplainRequest message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.VTExplainRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.VTExplainRequest} VTExplainRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VTExplainRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.VTExplainRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cluster = reader.string(); - break; - case 2: - message.keyspace = reader.string(); - break; - case 3: - message.sql = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VTExplainRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.VTExplainRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.VTExplainRequest} VTExplainRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VTExplainRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VTExplainRequest message. - * @function verify - * @memberof vtadmin.VTExplainRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VTExplainRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) - if (!$util.isString(message.cluster)) - return "cluster: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; - return null; - }; - - /** - * Creates a VTExplainRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.VTExplainRequest - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.VTExplainRequest} VTExplainRequest - */ - VTExplainRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.VTExplainRequest) - return object; - var message = new $root.vtadmin.VTExplainRequest(); - if (object.cluster != null) - message.cluster = String(object.cluster); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.sql != null) - message.sql = String(object.sql); - return message; - }; - - /** - * Creates a plain object from a VTExplainRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.VTExplainRequest - * @static - * @param {vtadmin.VTExplainRequest} message VTExplainRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VTExplainRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cluster = ""; - object.keyspace = ""; - object.sql = ""; - } - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = message.cluster; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; - return object; - }; - - /** - * Converts this VTExplainRequest to JSON. - * @function toJSON - * @memberof vtadmin.VTExplainRequest - * @instance - * @returns {Object.} JSON object - */ - VTExplainRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VTExplainRequest; - })(); - - vtadmin.VTExplainResponse = (function() { - - /** - * Properties of a VTExplainResponse. - * @memberof vtadmin - * @interface IVTExplainResponse - * @property {string|null} [response] VTExplainResponse response - */ - - /** - * Constructs a new VTExplainResponse. - * @memberof vtadmin - * @classdesc Represents a VTExplainResponse. - * @implements IVTExplainResponse - * @constructor - * @param {vtadmin.IVTExplainResponse=} [properties] Properties to set - */ - function VTExplainResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VTExplainResponse response. - * @member {string} response - * @memberof vtadmin.VTExplainResponse - * @instance - */ - VTExplainResponse.prototype.response = ""; - - /** - * Creates a new VTExplainResponse instance using the specified properties. - * @function create - * @memberof vtadmin.VTExplainResponse - * @static - * @param {vtadmin.IVTExplainResponse=} [properties] Properties to set - * @returns {vtadmin.VTExplainResponse} VTExplainResponse instance - */ - VTExplainResponse.create = function create(properties) { - return new VTExplainResponse(properties); - }; - - /** - * Encodes the specified VTExplainResponse message. Does not implicitly {@link vtadmin.VTExplainResponse.verify|verify} messages. - * @function encode - * @memberof vtadmin.VTExplainResponse - * @static - * @param {vtadmin.IVTExplainResponse} message VTExplainResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VTExplainResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.response); - return writer; - }; - - /** - * Encodes the specified VTExplainResponse message, length delimited. Does not implicitly {@link vtadmin.VTExplainResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtadmin.VTExplainResponse - * @static - * @param {vtadmin.IVTExplainResponse} message VTExplainResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VTExplainResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VTExplainResponse message from the specified reader or buffer. - * @function decode - * @memberof vtadmin.VTExplainResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.VTExplainResponse} VTExplainResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VTExplainResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtadmin.VTExplainResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.response = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VTExplainResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtadmin.VTExplainResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.VTExplainResponse} VTExplainResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VTExplainResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VTExplainResponse message. - * @function verify - * @memberof vtadmin.VTExplainResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VTExplainResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.response != null && message.hasOwnProperty("response")) - if (!$util.isString(message.response)) - return "response: string expected"; - return null; - }; - - /** - * Creates a VTExplainResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtadmin.VTExplainResponse - * @static - * @param {Object.} object Plain object - * @returns {vtadmin.VTExplainResponse} VTExplainResponse - */ - VTExplainResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.VTExplainResponse) - return object; - var message = new $root.vtadmin.VTExplainResponse(); - if (object.response != null) - message.response = String(object.response); - return message; - }; - - /** - * Creates a plain object from a VTExplainResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtadmin.VTExplainResponse - * @static - * @param {vtadmin.VTExplainResponse} message VTExplainResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VTExplainResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.response = ""; - if (message.response != null && message.hasOwnProperty("response")) - object.response = message.response; - return object; - }; - - /** - * Converts this VTExplainResponse to JSON. - * @function toJSON - * @memberof vtadmin.VTExplainResponse - * @instance - * @returns {Object.} JSON object - */ - VTExplainResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VTExplainResponse; - })(); - - return vtadmin; -})(); - -$root.tabletmanagerdata = (function() { - - /** - * Namespace tabletmanagerdata. - * @exports tabletmanagerdata - * @namespace - */ - var tabletmanagerdata = {}; - - tabletmanagerdata.TableDefinition = (function() { - - /** - * Properties of a TableDefinition. - * @memberof tabletmanagerdata - * @interface ITableDefinition - * @property {string|null} [name] TableDefinition name - * @property {string|null} [schema] TableDefinition schema - * @property {Array.|null} [columns] TableDefinition columns - * @property {Array.|null} [primary_key_columns] TableDefinition primary_key_columns - * @property {string|null} [type] TableDefinition type - * @property {number|Long|null} [data_length] TableDefinition data_length - * @property {number|Long|null} [row_count] TableDefinition row_count - * @property {Array.|null} [fields] TableDefinition fields - */ - - /** - * Constructs a new TableDefinition. - * @memberof tabletmanagerdata - * @classdesc Represents a TableDefinition. - * @implements ITableDefinition - * @constructor - * @param {tabletmanagerdata.ITableDefinition=} [properties] Properties to set - */ - function TableDefinition(properties) { - this.columns = []; - this.primary_key_columns = []; - this.fields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TableDefinition name. - * @member {string} name - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.name = ""; - - /** - * TableDefinition schema. - * @member {string} schema - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.schema = ""; - - /** - * TableDefinition columns. - * @member {Array.} columns - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.columns = $util.emptyArray; - - /** - * TableDefinition primary_key_columns. - * @member {Array.} primary_key_columns - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.primary_key_columns = $util.emptyArray; - - /** - * TableDefinition type. - * @member {string} type - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.type = ""; - - /** - * TableDefinition data_length. - * @member {number|Long} data_length - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.data_length = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * TableDefinition row_count. - * @member {number|Long} row_count - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.row_count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * TableDefinition fields. - * @member {Array.} fields - * @memberof tabletmanagerdata.TableDefinition - * @instance - */ - TableDefinition.prototype.fields = $util.emptyArray; - - /** - * Creates a new TableDefinition instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {tabletmanagerdata.ITableDefinition=} [properties] Properties to set - * @returns {tabletmanagerdata.TableDefinition} TableDefinition instance - */ - TableDefinition.create = function create(properties) { - return new TableDefinition(properties); - }; - - /** - * Encodes the specified TableDefinition message. Does not implicitly {@link tabletmanagerdata.TableDefinition.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {tabletmanagerdata.ITableDefinition} message TableDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableDefinition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.columns[i]); - if (message.primary_key_columns != null && message.primary_key_columns.length) - for (var i = 0; i < message.primary_key_columns.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.primary_key_columns[i]); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.type); - if (message.data_length != null && Object.hasOwnProperty.call(message, "data_length")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.data_length); - if (message.row_count != null && Object.hasOwnProperty.call(message, "row_count")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.row_count); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TableDefinition message, length delimited. Does not implicitly {@link tabletmanagerdata.TableDefinition.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {tabletmanagerdata.ITableDefinition} message TableDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TableDefinition message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.TableDefinition} TableDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableDefinition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.TableDefinition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.schema = reader.string(); - break; - case 3: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push(reader.string()); - break; - case 4: - if (!(message.primary_key_columns && message.primary_key_columns.length)) - message.primary_key_columns = []; - message.primary_key_columns.push(reader.string()); - break; - case 5: - message.type = reader.string(); - break; - case 6: - message.data_length = reader.uint64(); - break; - case 7: - message.row_count = reader.uint64(); - break; - case 8: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TableDefinition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.TableDefinition} TableDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableDefinition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TableDefinition message. - * @function verify - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableDefinition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) - if (!$util.isString(message.columns[i])) - return "columns: string[] expected"; - } - if (message.primary_key_columns != null && message.hasOwnProperty("primary_key_columns")) { - if (!Array.isArray(message.primary_key_columns)) - return "primary_key_columns: array expected"; - for (var i = 0; i < message.primary_key_columns.length; ++i) - if (!$util.isString(message.primary_key_columns[i])) - return "primary_key_columns: string[] expected"; - } - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.data_length != null && message.hasOwnProperty("data_length")) - if (!$util.isInteger(message.data_length) && !(message.data_length && $util.isInteger(message.data_length.low) && $util.isInteger(message.data_length.high))) - return "data_length: integer|Long expected"; - if (message.row_count != null && message.hasOwnProperty("row_count")) - if (!$util.isInteger(message.row_count) && !(message.row_count && $util.isInteger(message.row_count.low) && $util.isInteger(message.row_count.high))) - return "row_count: integer|Long expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a TableDefinition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.TableDefinition} TableDefinition - */ - TableDefinition.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.TableDefinition) - return object; - var message = new $root.tabletmanagerdata.TableDefinition(); - if (object.name != null) - message.name = String(object.name); - if (object.schema != null) - message.schema = String(object.schema); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".tabletmanagerdata.TableDefinition.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) - message.columns[i] = String(object.columns[i]); - } - if (object.primary_key_columns) { - if (!Array.isArray(object.primary_key_columns)) - throw TypeError(".tabletmanagerdata.TableDefinition.primary_key_columns: array expected"); - message.primary_key_columns = []; - for (var i = 0; i < object.primary_key_columns.length; ++i) - message.primary_key_columns[i] = String(object.primary_key_columns[i]); - } - if (object.type != null) - message.type = String(object.type); - if (object.data_length != null) - if ($util.Long) - (message.data_length = $util.Long.fromValue(object.data_length)).unsigned = true; - else if (typeof object.data_length === "string") - message.data_length = parseInt(object.data_length, 10); - else if (typeof object.data_length === "number") - message.data_length = object.data_length; - else if (typeof object.data_length === "object") - message.data_length = new $util.LongBits(object.data_length.low >>> 0, object.data_length.high >>> 0).toNumber(true); - if (object.row_count != null) - if ($util.Long) - (message.row_count = $util.Long.fromValue(object.row_count)).unsigned = true; - else if (typeof object.row_count === "string") - message.row_count = parseInt(object.row_count, 10); - else if (typeof object.row_count === "number") - message.row_count = object.row_count; - else if (typeof object.row_count === "object") - message.row_count = new $util.LongBits(object.row_count.low >>> 0, object.row_count.high >>> 0).toNumber(true); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".tabletmanagerdata.TableDefinition.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".tabletmanagerdata.TableDefinition.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TableDefinition message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.TableDefinition - * @static - * @param {tabletmanagerdata.TableDefinition} message TableDefinition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableDefinition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.columns = []; - object.primary_key_columns = []; - object.fields = []; - } - if (options.defaults) { - object.name = ""; - object.schema = ""; - object.type = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.data_length = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.data_length = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.row_count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.row_count = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = message.columns[j]; - } - if (message.primary_key_columns && message.primary_key_columns.length) { - object.primary_key_columns = []; - for (var j = 0; j < message.primary_key_columns.length; ++j) - object.primary_key_columns[j] = message.primary_key_columns[j]; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.data_length != null && message.hasOwnProperty("data_length")) - if (typeof message.data_length === "number") - object.data_length = options.longs === String ? String(message.data_length) : message.data_length; - else - object.data_length = options.longs === String ? $util.Long.prototype.toString.call(message.data_length) : options.longs === Number ? new $util.LongBits(message.data_length.low >>> 0, message.data_length.high >>> 0).toNumber(true) : message.data_length; - if (message.row_count != null && message.hasOwnProperty("row_count")) - if (typeof message.row_count === "number") - object.row_count = options.longs === String ? String(message.row_count) : message.row_count; - else - object.row_count = options.longs === String ? $util.Long.prototype.toString.call(message.row_count) : options.longs === Number ? new $util.LongBits(message.row_count.low >>> 0, message.row_count.high >>> 0).toNumber(true) : message.row_count; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - return object; - }; - - /** - * Converts this TableDefinition to JSON. - * @function toJSON - * @memberof tabletmanagerdata.TableDefinition - * @instance - * @returns {Object.} JSON object - */ - TableDefinition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TableDefinition; - })(); - - tabletmanagerdata.SchemaDefinition = (function() { - - /** - * Properties of a SchemaDefinition. - * @memberof tabletmanagerdata - * @interface ISchemaDefinition - * @property {string|null} [database_schema] SchemaDefinition database_schema - * @property {Array.|null} [table_definitions] SchemaDefinition table_definitions - * @property {string|null} [version] SchemaDefinition version - */ - - /** - * Constructs a new SchemaDefinition. - * @memberof tabletmanagerdata - * @classdesc Represents a SchemaDefinition. - * @implements ISchemaDefinition - * @constructor - * @param {tabletmanagerdata.ISchemaDefinition=} [properties] Properties to set - */ - function SchemaDefinition(properties) { - this.table_definitions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchemaDefinition database_schema. - * @member {string} database_schema - * @memberof tabletmanagerdata.SchemaDefinition - * @instance - */ - SchemaDefinition.prototype.database_schema = ""; - - /** - * SchemaDefinition table_definitions. - * @member {Array.} table_definitions - * @memberof tabletmanagerdata.SchemaDefinition - * @instance - */ - SchemaDefinition.prototype.table_definitions = $util.emptyArray; - - /** - * SchemaDefinition version. - * @member {string} version - * @memberof tabletmanagerdata.SchemaDefinition - * @instance - */ - SchemaDefinition.prototype.version = ""; - - /** - * Creates a new SchemaDefinition instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {tabletmanagerdata.ISchemaDefinition=} [properties] Properties to set - * @returns {tabletmanagerdata.SchemaDefinition} SchemaDefinition instance - */ - SchemaDefinition.create = function create(properties) { - return new SchemaDefinition(properties); - }; - - /** - * Encodes the specified SchemaDefinition message. Does not implicitly {@link tabletmanagerdata.SchemaDefinition.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {tabletmanagerdata.ISchemaDefinition} message SchemaDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaDefinition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.database_schema != null && Object.hasOwnProperty.call(message, "database_schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.database_schema); - if (message.table_definitions != null && message.table_definitions.length) - for (var i = 0; i < message.table_definitions.length; ++i) - $root.tabletmanagerdata.TableDefinition.encode(message.table_definitions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); - return writer; - }; - - /** - * Encodes the specified SchemaDefinition message, length delimited. Does not implicitly {@link tabletmanagerdata.SchemaDefinition.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {tabletmanagerdata.ISchemaDefinition} message SchemaDefinition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaDefinition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchemaDefinition message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SchemaDefinition} SchemaDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaDefinition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SchemaDefinition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.database_schema = reader.string(); - break; - case 2: - if (!(message.table_definitions && message.table_definitions.length)) - message.table_definitions = []; - message.table_definitions.push($root.tabletmanagerdata.TableDefinition.decode(reader, reader.uint32())); - break; - case 3: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaDefinition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SchemaDefinition} SchemaDefinition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaDefinition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaDefinition message. - * @function verify - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaDefinition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.database_schema != null && message.hasOwnProperty("database_schema")) - if (!$util.isString(message.database_schema)) - return "database_schema: string expected"; - if (message.table_definitions != null && message.hasOwnProperty("table_definitions")) { - if (!Array.isArray(message.table_definitions)) - return "table_definitions: array expected"; - for (var i = 0; i < message.table_definitions.length; ++i) { - var error = $root.tabletmanagerdata.TableDefinition.verify(message.table_definitions[i]); - if (error) - return "table_definitions." + error; - } - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a SchemaDefinition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SchemaDefinition} SchemaDefinition - */ - SchemaDefinition.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SchemaDefinition) - return object; - var message = new $root.tabletmanagerdata.SchemaDefinition(); - if (object.database_schema != null) - message.database_schema = String(object.database_schema); - if (object.table_definitions) { - if (!Array.isArray(object.table_definitions)) - throw TypeError(".tabletmanagerdata.SchemaDefinition.table_definitions: array expected"); - message.table_definitions = []; - for (var i = 0; i < object.table_definitions.length; ++i) { - if (typeof object.table_definitions[i] !== "object") - throw TypeError(".tabletmanagerdata.SchemaDefinition.table_definitions: object expected"); - message.table_definitions[i] = $root.tabletmanagerdata.TableDefinition.fromObject(object.table_definitions[i]); - } - } - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a SchemaDefinition message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SchemaDefinition - * @static - * @param {tabletmanagerdata.SchemaDefinition} message SchemaDefinition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaDefinition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.table_definitions = []; - if (options.defaults) { - object.database_schema = ""; - object.version = ""; - } - if (message.database_schema != null && message.hasOwnProperty("database_schema")) - object.database_schema = message.database_schema; - if (message.table_definitions && message.table_definitions.length) { - object.table_definitions = []; - for (var j = 0; j < message.table_definitions.length; ++j) - object.table_definitions[j] = $root.tabletmanagerdata.TableDefinition.toObject(message.table_definitions[j], options); - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this SchemaDefinition to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SchemaDefinition - * @instance - * @returns {Object.} JSON object - */ - SchemaDefinition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SchemaDefinition; - })(); - - tabletmanagerdata.SchemaChangeResult = (function() { - - /** - * Properties of a SchemaChangeResult. - * @memberof tabletmanagerdata - * @interface ISchemaChangeResult - * @property {tabletmanagerdata.ISchemaDefinition|null} [before_schema] SchemaChangeResult before_schema - * @property {tabletmanagerdata.ISchemaDefinition|null} [after_schema] SchemaChangeResult after_schema - */ - - /** - * Constructs a new SchemaChangeResult. - * @memberof tabletmanagerdata - * @classdesc Represents a SchemaChangeResult. - * @implements ISchemaChangeResult - * @constructor - * @param {tabletmanagerdata.ISchemaChangeResult=} [properties] Properties to set - */ - function SchemaChangeResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchemaChangeResult before_schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} before_schema - * @memberof tabletmanagerdata.SchemaChangeResult - * @instance - */ - SchemaChangeResult.prototype.before_schema = null; - - /** - * SchemaChangeResult after_schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} after_schema - * @memberof tabletmanagerdata.SchemaChangeResult - * @instance - */ - SchemaChangeResult.prototype.after_schema = null; - - /** - * Creates a new SchemaChangeResult instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {tabletmanagerdata.ISchemaChangeResult=} [properties] Properties to set - * @returns {tabletmanagerdata.SchemaChangeResult} SchemaChangeResult instance - */ - SchemaChangeResult.create = function create(properties) { - return new SchemaChangeResult(properties); - }; - - /** - * Encodes the specified SchemaChangeResult message. Does not implicitly {@link tabletmanagerdata.SchemaChangeResult.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {tabletmanagerdata.ISchemaChangeResult} message SchemaChangeResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaChangeResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.before_schema != null && Object.hasOwnProperty.call(message, "before_schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.before_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after_schema != null && Object.hasOwnProperty.call(message, "after_schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.after_schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SchemaChangeResult message, length delimited. Does not implicitly {@link tabletmanagerdata.SchemaChangeResult.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {tabletmanagerdata.ISchemaChangeResult} message SchemaChangeResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaChangeResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchemaChangeResult message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SchemaChangeResult} SchemaChangeResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaChangeResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SchemaChangeResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.before_schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - case 2: - message.after_schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaChangeResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SchemaChangeResult} SchemaChangeResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaChangeResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaChangeResult message. - * @function verify - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaChangeResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.before_schema != null && message.hasOwnProperty("before_schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.before_schema); - if (error) - return "before_schema." + error; - } - if (message.after_schema != null && message.hasOwnProperty("after_schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.after_schema); - if (error) - return "after_schema." + error; - } - return null; - }; - - /** - * Creates a SchemaChangeResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SchemaChangeResult} SchemaChangeResult - */ - SchemaChangeResult.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SchemaChangeResult) - return object; - var message = new $root.tabletmanagerdata.SchemaChangeResult(); - if (object.before_schema != null) { - if (typeof object.before_schema !== "object") - throw TypeError(".tabletmanagerdata.SchemaChangeResult.before_schema: object expected"); - message.before_schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.before_schema); - } - if (object.after_schema != null) { - if (typeof object.after_schema !== "object") - throw TypeError(".tabletmanagerdata.SchemaChangeResult.after_schema: object expected"); - message.after_schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.after_schema); - } - return message; - }; - - /** - * Creates a plain object from a SchemaChangeResult message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SchemaChangeResult - * @static - * @param {tabletmanagerdata.SchemaChangeResult} message SchemaChangeResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaChangeResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.before_schema = null; - object.after_schema = null; - } - if (message.before_schema != null && message.hasOwnProperty("before_schema")) - object.before_schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.before_schema, options); - if (message.after_schema != null && message.hasOwnProperty("after_schema")) - object.after_schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.after_schema, options); - return object; - }; - - /** - * Converts this SchemaChangeResult to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SchemaChangeResult - * @instance - * @returns {Object.} JSON object - */ - SchemaChangeResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SchemaChangeResult; - })(); - - tabletmanagerdata.UserPermission = (function() { - - /** - * Properties of a UserPermission. - * @memberof tabletmanagerdata - * @interface IUserPermission - * @property {string|null} [host] UserPermission host - * @property {string|null} [user] UserPermission user - * @property {number|Long|null} [password_checksum] UserPermission password_checksum - * @property {Object.|null} [privileges] UserPermission privileges - */ - - /** - * Constructs a new UserPermission. - * @memberof tabletmanagerdata - * @classdesc Represents a UserPermission. - * @implements IUserPermission - * @constructor - * @param {tabletmanagerdata.IUserPermission=} [properties] Properties to set - */ - function UserPermission(properties) { - this.privileges = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserPermission host. - * @member {string} host - * @memberof tabletmanagerdata.UserPermission - * @instance - */ - UserPermission.prototype.host = ""; - - /** - * UserPermission user. - * @member {string} user - * @memberof tabletmanagerdata.UserPermission - * @instance - */ - UserPermission.prototype.user = ""; - - /** - * UserPermission password_checksum. - * @member {number|Long} password_checksum - * @memberof tabletmanagerdata.UserPermission - * @instance - */ - UserPermission.prototype.password_checksum = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UserPermission privileges. - * @member {Object.} privileges - * @memberof tabletmanagerdata.UserPermission - * @instance - */ - UserPermission.prototype.privileges = $util.emptyObject; - - /** - * Creates a new UserPermission instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {tabletmanagerdata.IUserPermission=} [properties] Properties to set - * @returns {tabletmanagerdata.UserPermission} UserPermission instance - */ - UserPermission.create = function create(properties) { - return new UserPermission(properties); - }; - - /** - * Encodes the specified UserPermission message. Does not implicitly {@link tabletmanagerdata.UserPermission.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {tabletmanagerdata.IUserPermission} message UserPermission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserPermission.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.host != null && Object.hasOwnProperty.call(message, "host")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); - if (message.user != null && Object.hasOwnProperty.call(message, "user")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.user); - if (message.password_checksum != null && Object.hasOwnProperty.call(message, "password_checksum")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.password_checksum); - if (message.privileges != null && Object.hasOwnProperty.call(message, "privileges")) - for (var keys = Object.keys(message.privileges), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.privileges[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserPermission message, length delimited. Does not implicitly {@link tabletmanagerdata.UserPermission.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {tabletmanagerdata.IUserPermission} message UserPermission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserPermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserPermission message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.UserPermission} UserPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserPermission.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UserPermission(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.host = reader.string(); - break; - case 2: - message.user = reader.string(); - break; - case 3: - message.password_checksum = reader.uint64(); - break; - case 4: - if (message.privileges === $util.emptyObject) - message.privileges = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.privileges[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserPermission message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.UserPermission} UserPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserPermission.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserPermission message. - * @function verify - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserPermission.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.host != null && message.hasOwnProperty("host")) - if (!$util.isString(message.host)) - return "host: string expected"; - if (message.user != null && message.hasOwnProperty("user")) - if (!$util.isString(message.user)) - return "user: string expected"; - if (message.password_checksum != null && message.hasOwnProperty("password_checksum")) - if (!$util.isInteger(message.password_checksum) && !(message.password_checksum && $util.isInteger(message.password_checksum.low) && $util.isInteger(message.password_checksum.high))) - return "password_checksum: integer|Long expected"; - if (message.privileges != null && message.hasOwnProperty("privileges")) { - if (!$util.isObject(message.privileges)) - return "privileges: object expected"; - var key = Object.keys(message.privileges); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.privileges[key[i]])) - return "privileges: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a UserPermission message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.UserPermission} UserPermission - */ - UserPermission.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.UserPermission) - return object; - var message = new $root.tabletmanagerdata.UserPermission(); - if (object.host != null) - message.host = String(object.host); - if (object.user != null) - message.user = String(object.user); - if (object.password_checksum != null) - if ($util.Long) - (message.password_checksum = $util.Long.fromValue(object.password_checksum)).unsigned = true; - else if (typeof object.password_checksum === "string") - message.password_checksum = parseInt(object.password_checksum, 10); - else if (typeof object.password_checksum === "number") - message.password_checksum = object.password_checksum; - else if (typeof object.password_checksum === "object") - message.password_checksum = new $util.LongBits(object.password_checksum.low >>> 0, object.password_checksum.high >>> 0).toNumber(true); - if (object.privileges) { - if (typeof object.privileges !== "object") - throw TypeError(".tabletmanagerdata.UserPermission.privileges: object expected"); - message.privileges = {}; - for (var keys = Object.keys(object.privileges), i = 0; i < keys.length; ++i) - message.privileges[keys[i]] = String(object.privileges[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a UserPermission message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.UserPermission - * @static - * @param {tabletmanagerdata.UserPermission} message UserPermission - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserPermission.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.privileges = {}; - if (options.defaults) { - object.host = ""; - object.user = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.password_checksum = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.password_checksum = options.longs === String ? "0" : 0; - } - if (message.host != null && message.hasOwnProperty("host")) - object.host = message.host; - if (message.user != null && message.hasOwnProperty("user")) - object.user = message.user; - if (message.password_checksum != null && message.hasOwnProperty("password_checksum")) - if (typeof message.password_checksum === "number") - object.password_checksum = options.longs === String ? String(message.password_checksum) : message.password_checksum; - else - object.password_checksum = options.longs === String ? $util.Long.prototype.toString.call(message.password_checksum) : options.longs === Number ? new $util.LongBits(message.password_checksum.low >>> 0, message.password_checksum.high >>> 0).toNumber(true) : message.password_checksum; - var keys2; - if (message.privileges && (keys2 = Object.keys(message.privileges)).length) { - object.privileges = {}; - for (var j = 0; j < keys2.length; ++j) - object.privileges[keys2[j]] = message.privileges[keys2[j]]; - } - return object; - }; - - /** - * Converts this UserPermission to JSON. - * @function toJSON - * @memberof tabletmanagerdata.UserPermission - * @instance - * @returns {Object.} JSON object - */ - UserPermission.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UserPermission; - })(); - - tabletmanagerdata.DbPermission = (function() { - - /** - * Properties of a DbPermission. - * @memberof tabletmanagerdata - * @interface IDbPermission - * @property {string|null} [host] DbPermission host - * @property {string|null} [db] DbPermission db - * @property {string|null} [user] DbPermission user - * @property {Object.|null} [privileges] DbPermission privileges - */ - - /** - * Constructs a new DbPermission. - * @memberof tabletmanagerdata - * @classdesc Represents a DbPermission. - * @implements IDbPermission - * @constructor - * @param {tabletmanagerdata.IDbPermission=} [properties] Properties to set - */ - function DbPermission(properties) { - this.privileges = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DbPermission host. - * @member {string} host - * @memberof tabletmanagerdata.DbPermission - * @instance - */ - DbPermission.prototype.host = ""; - - /** - * DbPermission db. - * @member {string} db - * @memberof tabletmanagerdata.DbPermission - * @instance - */ - DbPermission.prototype.db = ""; - - /** - * DbPermission user. - * @member {string} user - * @memberof tabletmanagerdata.DbPermission - * @instance - */ - DbPermission.prototype.user = ""; - - /** - * DbPermission privileges. - * @member {Object.} privileges - * @memberof tabletmanagerdata.DbPermission - * @instance - */ - DbPermission.prototype.privileges = $util.emptyObject; - - /** - * Creates a new DbPermission instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {tabletmanagerdata.IDbPermission=} [properties] Properties to set - * @returns {tabletmanagerdata.DbPermission} DbPermission instance - */ - DbPermission.create = function create(properties) { - return new DbPermission(properties); - }; - - /** - * Encodes the specified DbPermission message. Does not implicitly {@link tabletmanagerdata.DbPermission.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {tabletmanagerdata.IDbPermission} message DbPermission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DbPermission.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.host != null && Object.hasOwnProperty.call(message, "host")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); - if (message.db != null && Object.hasOwnProperty.call(message, "db")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.db); - if (message.user != null && Object.hasOwnProperty.call(message, "user")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.user); - if (message.privileges != null && Object.hasOwnProperty.call(message, "privileges")) - for (var keys = Object.keys(message.privileges), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.privileges[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified DbPermission message, length delimited. Does not implicitly {@link tabletmanagerdata.DbPermission.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {tabletmanagerdata.IDbPermission} message DbPermission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DbPermission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DbPermission message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.DbPermission} DbPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DbPermission.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.DbPermission(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.host = reader.string(); - break; - case 2: - message.db = reader.string(); - break; - case 3: - message.user = reader.string(); - break; - case 4: - if (message.privileges === $util.emptyObject) - message.privileges = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.privileges[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DbPermission message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.DbPermission} DbPermission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DbPermission.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DbPermission message. - * @function verify - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DbPermission.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.host != null && message.hasOwnProperty("host")) - if (!$util.isString(message.host)) - return "host: string expected"; - if (message.db != null && message.hasOwnProperty("db")) - if (!$util.isString(message.db)) - return "db: string expected"; - if (message.user != null && message.hasOwnProperty("user")) - if (!$util.isString(message.user)) - return "user: string expected"; - if (message.privileges != null && message.hasOwnProperty("privileges")) { - if (!$util.isObject(message.privileges)) - return "privileges: object expected"; - var key = Object.keys(message.privileges); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.privileges[key[i]])) - return "privileges: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a DbPermission message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.DbPermission} DbPermission - */ - DbPermission.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.DbPermission) - return object; - var message = new $root.tabletmanagerdata.DbPermission(); - if (object.host != null) - message.host = String(object.host); - if (object.db != null) - message.db = String(object.db); - if (object.user != null) - message.user = String(object.user); - if (object.privileges) { - if (typeof object.privileges !== "object") - throw TypeError(".tabletmanagerdata.DbPermission.privileges: object expected"); - message.privileges = {}; - for (var keys = Object.keys(object.privileges), i = 0; i < keys.length; ++i) - message.privileges[keys[i]] = String(object.privileges[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a DbPermission message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.DbPermission - * @static - * @param {tabletmanagerdata.DbPermission} message DbPermission - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DbPermission.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.privileges = {}; - if (options.defaults) { - object.host = ""; - object.db = ""; - object.user = ""; - } - if (message.host != null && message.hasOwnProperty("host")) - object.host = message.host; - if (message.db != null && message.hasOwnProperty("db")) - object.db = message.db; - if (message.user != null && message.hasOwnProperty("user")) - object.user = message.user; - var keys2; - if (message.privileges && (keys2 = Object.keys(message.privileges)).length) { - object.privileges = {}; - for (var j = 0; j < keys2.length; ++j) - object.privileges[keys2[j]] = message.privileges[keys2[j]]; - } - return object; - }; - - /** - * Converts this DbPermission to JSON. - * @function toJSON - * @memberof tabletmanagerdata.DbPermission - * @instance - * @returns {Object.} JSON object - */ - DbPermission.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DbPermission; - })(); - - tabletmanagerdata.Permissions = (function() { - - /** - * Properties of a Permissions. - * @memberof tabletmanagerdata - * @interface IPermissions - * @property {Array.|null} [user_permissions] Permissions user_permissions - * @property {Array.|null} [db_permissions] Permissions db_permissions - */ - - /** - * Constructs a new Permissions. - * @memberof tabletmanagerdata - * @classdesc Represents a Permissions. - * @implements IPermissions - * @constructor - * @param {tabletmanagerdata.IPermissions=} [properties] Properties to set - */ - function Permissions(properties) { - this.user_permissions = []; - this.db_permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Permissions user_permissions. - * @member {Array.} user_permissions - * @memberof tabletmanagerdata.Permissions - * @instance - */ - Permissions.prototype.user_permissions = $util.emptyArray; - - /** - * Permissions db_permissions. - * @member {Array.} db_permissions - * @memberof tabletmanagerdata.Permissions - * @instance - */ - Permissions.prototype.db_permissions = $util.emptyArray; - - /** - * Creates a new Permissions instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.Permissions - * @static - * @param {tabletmanagerdata.IPermissions=} [properties] Properties to set - * @returns {tabletmanagerdata.Permissions} Permissions instance - */ - Permissions.create = function create(properties) { - return new Permissions(properties); - }; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link tabletmanagerdata.Permissions.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.Permissions - * @static - * @param {tabletmanagerdata.IPermissions} message Permissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Permissions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.user_permissions != null && message.user_permissions.length) - for (var i = 0; i < message.user_permissions.length; ++i) - $root.tabletmanagerdata.UserPermission.encode(message.user_permissions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.db_permissions != null && message.db_permissions.length) - for (var i = 0; i < message.db_permissions.length; ++i) - $root.tabletmanagerdata.DbPermission.encode(message.db_permissions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link tabletmanagerdata.Permissions.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.Permissions - * @static - * @param {tabletmanagerdata.IPermissions} message Permissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Permissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.Permissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.Permissions} Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Permissions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.Permissions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.user_permissions && message.user_permissions.length)) - message.user_permissions = []; - message.user_permissions.push($root.tabletmanagerdata.UserPermission.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.db_permissions && message.db_permissions.length)) - message.db_permissions = []; - message.db_permissions.push($root.tabletmanagerdata.DbPermission.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.Permissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.Permissions} Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Permissions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Permissions message. - * @function verify - * @memberof tabletmanagerdata.Permissions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Permissions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.user_permissions != null && message.hasOwnProperty("user_permissions")) { - if (!Array.isArray(message.user_permissions)) - return "user_permissions: array expected"; - for (var i = 0; i < message.user_permissions.length; ++i) { - var error = $root.tabletmanagerdata.UserPermission.verify(message.user_permissions[i]); - if (error) - return "user_permissions." + error; - } - } - if (message.db_permissions != null && message.hasOwnProperty("db_permissions")) { - if (!Array.isArray(message.db_permissions)) - return "db_permissions: array expected"; - for (var i = 0; i < message.db_permissions.length; ++i) { - var error = $root.tabletmanagerdata.DbPermission.verify(message.db_permissions[i]); - if (error) - return "db_permissions." + error; - } - } - return null; - }; - - /** - * Creates a Permissions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.Permissions - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.Permissions} Permissions - */ - Permissions.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.Permissions) - return object; - var message = new $root.tabletmanagerdata.Permissions(); - if (object.user_permissions) { - if (!Array.isArray(object.user_permissions)) - throw TypeError(".tabletmanagerdata.Permissions.user_permissions: array expected"); - message.user_permissions = []; - for (var i = 0; i < object.user_permissions.length; ++i) { - if (typeof object.user_permissions[i] !== "object") - throw TypeError(".tabletmanagerdata.Permissions.user_permissions: object expected"); - message.user_permissions[i] = $root.tabletmanagerdata.UserPermission.fromObject(object.user_permissions[i]); - } - } - if (object.db_permissions) { - if (!Array.isArray(object.db_permissions)) - throw TypeError(".tabletmanagerdata.Permissions.db_permissions: array expected"); - message.db_permissions = []; - for (var i = 0; i < object.db_permissions.length; ++i) { - if (typeof object.db_permissions[i] !== "object") - throw TypeError(".tabletmanagerdata.Permissions.db_permissions: object expected"); - message.db_permissions[i] = $root.tabletmanagerdata.DbPermission.fromObject(object.db_permissions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.Permissions - * @static - * @param {tabletmanagerdata.Permissions} message Permissions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Permissions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.user_permissions = []; - object.db_permissions = []; - } - if (message.user_permissions && message.user_permissions.length) { - object.user_permissions = []; - for (var j = 0; j < message.user_permissions.length; ++j) - object.user_permissions[j] = $root.tabletmanagerdata.UserPermission.toObject(message.user_permissions[j], options); - } - if (message.db_permissions && message.db_permissions.length) { - object.db_permissions = []; - for (var j = 0; j < message.db_permissions.length; ++j) - object.db_permissions[j] = $root.tabletmanagerdata.DbPermission.toObject(message.db_permissions[j], options); - } - return object; - }; - - /** - * Converts this Permissions to JSON. - * @function toJSON - * @memberof tabletmanagerdata.Permissions - * @instance - * @returns {Object.} JSON object - */ - Permissions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Permissions; - })(); - - tabletmanagerdata.PingRequest = (function() { - - /** - * Properties of a PingRequest. - * @memberof tabletmanagerdata - * @interface IPingRequest - * @property {string|null} [payload] PingRequest payload - */ - - /** - * Constructs a new PingRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a PingRequest. - * @implements IPingRequest - * @constructor - * @param {tabletmanagerdata.IPingRequest=} [properties] Properties to set - */ - function PingRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PingRequest payload. - * @member {string} payload - * @memberof tabletmanagerdata.PingRequest - * @instance - */ - PingRequest.prototype.payload = ""; - - /** - * Creates a new PingRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {tabletmanagerdata.IPingRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.PingRequest} PingRequest instance - */ - PingRequest.create = function create(properties) { - return new PingRequest(properties); - }; - - /** - * Encodes the specified PingRequest message. Does not implicitly {@link tabletmanagerdata.PingRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {tabletmanagerdata.IPingRequest} message PingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.payload); - return writer; - }; - - /** - * Encodes the specified PingRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PingRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {tabletmanagerdata.IPingRequest} message PingRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PingRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PingRequest} PingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PingRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payload = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PingRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PingRequest} PingRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PingRequest message. - * @function verify - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PingRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!$util.isString(message.payload)) - return "payload: string expected"; - return null; - }; - - /** - * Creates a PingRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PingRequest} PingRequest - */ - PingRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PingRequest) - return object; - var message = new $root.tabletmanagerdata.PingRequest(); - if (object.payload != null) - message.payload = String(object.payload); - return message; - }; - - /** - * Creates a plain object from a PingRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PingRequest - * @static - * @param {tabletmanagerdata.PingRequest} message PingRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PingRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.payload = ""; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = message.payload; - return object; - }; - - /** - * Converts this PingRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PingRequest - * @instance - * @returns {Object.} JSON object - */ - PingRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PingRequest; - })(); - - tabletmanagerdata.PingResponse = (function() { - - /** - * Properties of a PingResponse. - * @memberof tabletmanagerdata - * @interface IPingResponse - * @property {string|null} [payload] PingResponse payload - */ - - /** - * Constructs a new PingResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a PingResponse. - * @implements IPingResponse - * @constructor - * @param {tabletmanagerdata.IPingResponse=} [properties] Properties to set - */ - function PingResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PingResponse payload. - * @member {string} payload - * @memberof tabletmanagerdata.PingResponse - * @instance - */ - PingResponse.prototype.payload = ""; - - /** - * Creates a new PingResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {tabletmanagerdata.IPingResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.PingResponse} PingResponse instance - */ - PingResponse.create = function create(properties) { - return new PingResponse(properties); - }; - - /** - * Encodes the specified PingResponse message. Does not implicitly {@link tabletmanagerdata.PingResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {tabletmanagerdata.IPingResponse} message PingResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.payload); - return writer; - }; - - /** - * Encodes the specified PingResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PingResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {tabletmanagerdata.IPingResponse} message PingResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PingResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PingResponse} PingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PingResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payload = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PingResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PingResponse} PingResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PingResponse message. - * @function verify - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PingResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!$util.isString(message.payload)) - return "payload: string expected"; - return null; - }; - - /** - * Creates a PingResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PingResponse} PingResponse - */ - PingResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PingResponse) - return object; - var message = new $root.tabletmanagerdata.PingResponse(); - if (object.payload != null) - message.payload = String(object.payload); - return message; - }; - - /** - * Creates a plain object from a PingResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PingResponse - * @static - * @param {tabletmanagerdata.PingResponse} message PingResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PingResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.payload = ""; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = message.payload; - return object; - }; - - /** - * Converts this PingResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PingResponse - * @instance - * @returns {Object.} JSON object - */ - PingResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PingResponse; - })(); - - tabletmanagerdata.SleepRequest = (function() { - - /** - * Properties of a SleepRequest. - * @memberof tabletmanagerdata - * @interface ISleepRequest - * @property {number|Long|null} [duration] SleepRequest duration - */ - - /** - * Constructs a new SleepRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a SleepRequest. - * @implements ISleepRequest - * @constructor - * @param {tabletmanagerdata.ISleepRequest=} [properties] Properties to set - */ - function SleepRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SleepRequest duration. - * @member {number|Long} duration - * @memberof tabletmanagerdata.SleepRequest - * @instance - */ - SleepRequest.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SleepRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {tabletmanagerdata.ISleepRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.SleepRequest} SleepRequest instance - */ - SleepRequest.create = function create(properties) { - return new SleepRequest(properties); - }; - - /** - * Encodes the specified SleepRequest message. Does not implicitly {@link tabletmanagerdata.SleepRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {tabletmanagerdata.ISleepRequest} message SleepRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SleepRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.duration); - return writer; - }; - - /** - * Encodes the specified SleepRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SleepRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {tabletmanagerdata.ISleepRequest} message SleepRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SleepRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SleepRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SleepRequest} SleepRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SleepRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SleepRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.duration = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SleepRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SleepRequest} SleepRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SleepRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SleepRequest message. - * @function verify - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SleepRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isInteger(message.duration) && !(message.duration && $util.isInteger(message.duration.low) && $util.isInteger(message.duration.high))) - return "duration: integer|Long expected"; - return null; - }; - - /** - * Creates a SleepRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SleepRequest} SleepRequest - */ - SleepRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SleepRequest) - return object; - var message = new $root.tabletmanagerdata.SleepRequest(); - if (object.duration != null) - if ($util.Long) - (message.duration = $util.Long.fromValue(object.duration)).unsigned = false; - else if (typeof object.duration === "string") - message.duration = parseInt(object.duration, 10); - else if (typeof object.duration === "number") - message.duration = object.duration; - else if (typeof object.duration === "object") - message.duration = new $util.LongBits(object.duration.low >>> 0, object.duration.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SleepRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SleepRequest - * @static - * @param {tabletmanagerdata.SleepRequest} message SleepRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SleepRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.duration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.duration = options.longs === String ? "0" : 0; - if (message.duration != null && message.hasOwnProperty("duration")) - if (typeof message.duration === "number") - object.duration = options.longs === String ? String(message.duration) : message.duration; - else - object.duration = options.longs === String ? $util.Long.prototype.toString.call(message.duration) : options.longs === Number ? new $util.LongBits(message.duration.low >>> 0, message.duration.high >>> 0).toNumber() : message.duration; - return object; - }; - - /** - * Converts this SleepRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SleepRequest - * @instance - * @returns {Object.} JSON object - */ - SleepRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SleepRequest; - })(); - - tabletmanagerdata.SleepResponse = (function() { - - /** - * Properties of a SleepResponse. - * @memberof tabletmanagerdata - * @interface ISleepResponse - */ - - /** - * Constructs a new SleepResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a SleepResponse. - * @implements ISleepResponse - * @constructor - * @param {tabletmanagerdata.ISleepResponse=} [properties] Properties to set - */ - function SleepResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SleepResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {tabletmanagerdata.ISleepResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.SleepResponse} SleepResponse instance - */ - SleepResponse.create = function create(properties) { - return new SleepResponse(properties); - }; - - /** - * Encodes the specified SleepResponse message. Does not implicitly {@link tabletmanagerdata.SleepResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {tabletmanagerdata.ISleepResponse} message SleepResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SleepResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SleepResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SleepResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {tabletmanagerdata.ISleepResponse} message SleepResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SleepResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SleepResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SleepResponse} SleepResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SleepResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SleepResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SleepResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SleepResponse} SleepResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SleepResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SleepResponse message. - * @function verify - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SleepResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SleepResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SleepResponse} SleepResponse - */ - SleepResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SleepResponse) - return object; - return new $root.tabletmanagerdata.SleepResponse(); - }; - - /** - * Creates a plain object from a SleepResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SleepResponse - * @static - * @param {tabletmanagerdata.SleepResponse} message SleepResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SleepResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SleepResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SleepResponse - * @instance - * @returns {Object.} JSON object - */ - SleepResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SleepResponse; - })(); - - tabletmanagerdata.ExecuteHookRequest = (function() { - - /** - * Properties of an ExecuteHookRequest. - * @memberof tabletmanagerdata - * @interface IExecuteHookRequest - * @property {string|null} [name] ExecuteHookRequest name - * @property {Array.|null} [parameters] ExecuteHookRequest parameters - * @property {Object.|null} [extra_env] ExecuteHookRequest extra_env - */ - - /** - * Constructs a new ExecuteHookRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteHookRequest. - * @implements IExecuteHookRequest - * @constructor - * @param {tabletmanagerdata.IExecuteHookRequest=} [properties] Properties to set - */ - function ExecuteHookRequest(properties) { - this.parameters = []; - this.extra_env = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteHookRequest name. - * @member {string} name - * @memberof tabletmanagerdata.ExecuteHookRequest - * @instance - */ - ExecuteHookRequest.prototype.name = ""; - - /** - * ExecuteHookRequest parameters. - * @member {Array.} parameters - * @memberof tabletmanagerdata.ExecuteHookRequest - * @instance - */ - ExecuteHookRequest.prototype.parameters = $util.emptyArray; - - /** - * ExecuteHookRequest extra_env. - * @member {Object.} extra_env - * @memberof tabletmanagerdata.ExecuteHookRequest - * @instance - */ - ExecuteHookRequest.prototype.extra_env = $util.emptyObject; - - /** - * Creates a new ExecuteHookRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {tabletmanagerdata.IExecuteHookRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteHookRequest} ExecuteHookRequest instance - */ - ExecuteHookRequest.create = function create(properties) { - return new ExecuteHookRequest(properties); - }; - - /** - * Encodes the specified ExecuteHookRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteHookRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {tabletmanagerdata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteHookRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameters[i]); - if (message.extra_env != null && Object.hasOwnProperty.call(message, "extra_env")) - for (var keys = Object.keys(message.extra_env), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.extra_env[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteHookRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteHookRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {tabletmanagerdata.IExecuteHookRequest} message ExecuteHookRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteHookRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteHookRequest} ExecuteHookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteHookRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteHookRequest(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push(reader.string()); - break; - case 3: - if (message.extra_env === $util.emptyObject) - message.extra_env = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.extra_env[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteHookRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteHookRequest} ExecuteHookRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteHookRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteHookRequest message. - * @function verify - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteHookRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) - if (!$util.isString(message.parameters[i])) - return "parameters: string[] expected"; - } - if (message.extra_env != null && message.hasOwnProperty("extra_env")) { - if (!$util.isObject(message.extra_env)) - return "extra_env: object expected"; - var key = Object.keys(message.extra_env); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.extra_env[key[i]])) - return "extra_env: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an ExecuteHookRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteHookRequest} ExecuteHookRequest - */ - ExecuteHookRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteHookRequest) - return object; - var message = new $root.tabletmanagerdata.ExecuteHookRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".tabletmanagerdata.ExecuteHookRequest.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) - message.parameters[i] = String(object.parameters[i]); - } - if (object.extra_env) { - if (typeof object.extra_env !== "object") - throw TypeError(".tabletmanagerdata.ExecuteHookRequest.extra_env: object expected"); - message.extra_env = {}; - for (var keys = Object.keys(object.extra_env), i = 0; i < keys.length; ++i) - message.extra_env[keys[i]] = String(object.extra_env[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteHookRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteHookRequest - * @static - * @param {tabletmanagerdata.ExecuteHookRequest} message ExecuteHookRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteHookRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (options.objects || options.defaults) - object.extra_env = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = message.parameters[j]; - } - var keys2; - if (message.extra_env && (keys2 = Object.keys(message.extra_env)).length) { - object.extra_env = {}; - for (var j = 0; j < keys2.length; ++j) - object.extra_env[keys2[j]] = message.extra_env[keys2[j]]; - } - return object; - }; - - /** - * Converts this ExecuteHookRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteHookRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteHookRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteHookRequest; - })(); - - tabletmanagerdata.ExecuteHookResponse = (function() { - - /** - * Properties of an ExecuteHookResponse. - * @memberof tabletmanagerdata - * @interface IExecuteHookResponse - * @property {number|Long|null} [exit_status] ExecuteHookResponse exit_status - * @property {string|null} [stdout] ExecuteHookResponse stdout - * @property {string|null} [stderr] ExecuteHookResponse stderr - */ - - /** - * Constructs a new ExecuteHookResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteHookResponse. - * @implements IExecuteHookResponse - * @constructor - * @param {tabletmanagerdata.IExecuteHookResponse=} [properties] Properties to set - */ - function ExecuteHookResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteHookResponse exit_status. - * @member {number|Long} exit_status - * @memberof tabletmanagerdata.ExecuteHookResponse - * @instance - */ - ExecuteHookResponse.prototype.exit_status = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExecuteHookResponse stdout. - * @member {string} stdout - * @memberof tabletmanagerdata.ExecuteHookResponse - * @instance - */ - ExecuteHookResponse.prototype.stdout = ""; - - /** - * ExecuteHookResponse stderr. - * @member {string} stderr - * @memberof tabletmanagerdata.ExecuteHookResponse - * @instance - */ - ExecuteHookResponse.prototype.stderr = ""; - - /** - * Creates a new ExecuteHookResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {tabletmanagerdata.IExecuteHookResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteHookResponse} ExecuteHookResponse instance - */ - ExecuteHookResponse.create = function create(properties) { - return new ExecuteHookResponse(properties); - }; - - /** - * Encodes the specified ExecuteHookResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteHookResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {tabletmanagerdata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteHookResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exit_status != null && Object.hasOwnProperty.call(message, "exit_status")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.exit_status); - if (message.stdout != null && Object.hasOwnProperty.call(message, "stdout")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.stdout); - if (message.stderr != null && Object.hasOwnProperty.call(message, "stderr")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stderr); - return writer; - }; - - /** - * Encodes the specified ExecuteHookResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteHookResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {tabletmanagerdata.IExecuteHookResponse} message ExecuteHookResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteHookResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteHookResponse} ExecuteHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteHookResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteHookResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exit_status = reader.int64(); - break; - case 2: - message.stdout = reader.string(); - break; - case 3: - message.stderr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteHookResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteHookResponse} ExecuteHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteHookResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteHookResponse message. - * @function verify - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteHookResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exit_status != null && message.hasOwnProperty("exit_status")) - if (!$util.isInteger(message.exit_status) && !(message.exit_status && $util.isInteger(message.exit_status.low) && $util.isInteger(message.exit_status.high))) - return "exit_status: integer|Long expected"; - if (message.stdout != null && message.hasOwnProperty("stdout")) - if (!$util.isString(message.stdout)) - return "stdout: string expected"; - if (message.stderr != null && message.hasOwnProperty("stderr")) - if (!$util.isString(message.stderr)) - return "stderr: string expected"; - return null; - }; - - /** - * Creates an ExecuteHookResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteHookResponse} ExecuteHookResponse - */ - ExecuteHookResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteHookResponse) - return object; - var message = new $root.tabletmanagerdata.ExecuteHookResponse(); - if (object.exit_status != null) - if ($util.Long) - (message.exit_status = $util.Long.fromValue(object.exit_status)).unsigned = false; - else if (typeof object.exit_status === "string") - message.exit_status = parseInt(object.exit_status, 10); - else if (typeof object.exit_status === "number") - message.exit_status = object.exit_status; - else if (typeof object.exit_status === "object") - message.exit_status = new $util.LongBits(object.exit_status.low >>> 0, object.exit_status.high >>> 0).toNumber(); - if (object.stdout != null) - message.stdout = String(object.stdout); - if (object.stderr != null) - message.stderr = String(object.stderr); - return message; - }; - - /** - * Creates a plain object from an ExecuteHookResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteHookResponse - * @static - * @param {tabletmanagerdata.ExecuteHookResponse} message ExecuteHookResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteHookResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.exit_status = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.exit_status = options.longs === String ? "0" : 0; - object.stdout = ""; - object.stderr = ""; - } - if (message.exit_status != null && message.hasOwnProperty("exit_status")) - if (typeof message.exit_status === "number") - object.exit_status = options.longs === String ? String(message.exit_status) : message.exit_status; - else - object.exit_status = options.longs === String ? $util.Long.prototype.toString.call(message.exit_status) : options.longs === Number ? new $util.LongBits(message.exit_status.low >>> 0, message.exit_status.high >>> 0).toNumber() : message.exit_status; - if (message.stdout != null && message.hasOwnProperty("stdout")) - object.stdout = message.stdout; - if (message.stderr != null && message.hasOwnProperty("stderr")) - object.stderr = message.stderr; - return object; - }; - - /** - * Converts this ExecuteHookResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteHookResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteHookResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteHookResponse; - })(); - - tabletmanagerdata.GetSchemaRequest = (function() { - - /** - * Properties of a GetSchemaRequest. - * @memberof tabletmanagerdata - * @interface IGetSchemaRequest - * @property {Array.|null} [tables] GetSchemaRequest tables - * @property {boolean|null} [include_views] GetSchemaRequest include_views - * @property {Array.|null} [exclude_tables] GetSchemaRequest exclude_tables - */ - - /** - * Constructs a new GetSchemaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a GetSchemaRequest. - * @implements IGetSchemaRequest - * @constructor - * @param {tabletmanagerdata.IGetSchemaRequest=} [properties] Properties to set - */ - function GetSchemaRequest(properties) { - this.tables = []; - this.exclude_tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemaRequest tables. - * @member {Array.} tables - * @memberof tabletmanagerdata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tables = $util.emptyArray; - - /** - * GetSchemaRequest include_views. - * @member {boolean} include_views - * @memberof tabletmanagerdata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.include_views = false; - - /** - * GetSchemaRequest exclude_tables. - * @member {Array.} exclude_tables - * @memberof tabletmanagerdata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.exclude_tables = $util.emptyArray; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {tabletmanagerdata.IGetSchemaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.GetSchemaRequest} GetSchemaRequest instance - */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); - }; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link tabletmanagerdata.GetSchemaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {tabletmanagerdata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.tables[i]); - if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.include_views); - if (message.exclude_tables != null && message.exclude_tables.length) - for (var i = 0; i < message.exclude_tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); - return writer; - }; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.GetSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {tabletmanagerdata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.GetSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 2: - message.include_views = reader.bool(); - break; - case 3: - if (!(message.exclude_tables && message.exclude_tables.length)) - message.exclude_tables = []; - message.exclude_tables.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaRequest message. - * @function verify - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - if (typeof message.include_views !== "boolean") - return "include_views: boolean expected"; - if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { - if (!Array.isArray(message.exclude_tables)) - return "exclude_tables: array expected"; - for (var i = 0; i < message.exclude_tables.length; ++i) - if (!$util.isString(message.exclude_tables[i])) - return "exclude_tables: string[] expected"; - } - return null; - }; - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.GetSchemaRequest} GetSchemaRequest - */ - GetSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.GetSchemaRequest) - return object; - var message = new $root.tabletmanagerdata.GetSchemaRequest(); - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".tabletmanagerdata.GetSchemaRequest.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.include_views != null) - message.include_views = Boolean(object.include_views); - if (object.exclude_tables) { - if (!Array.isArray(object.exclude_tables)) - throw TypeError(".tabletmanagerdata.GetSchemaRequest.exclude_tables: array expected"); - message.exclude_tables = []; - for (var i = 0; i < object.exclude_tables.length; ++i) - message.exclude_tables[i] = String(object.exclude_tables[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.GetSchemaRequest - * @static - * @param {tabletmanagerdata.GetSchemaRequest} message GetSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tables = []; - object.exclude_tables = []; - } - if (options.defaults) - object.include_views = false; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - object.include_views = message.include_views; - if (message.exclude_tables && message.exclude_tables.length) { - object.exclude_tables = []; - for (var j = 0; j < message.exclude_tables.length; ++j) - object.exclude_tables[j] = message.exclude_tables[j]; - } - return object; - }; - - /** - * Converts this GetSchemaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.GetSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemaRequest; - })(); - - tabletmanagerdata.GetSchemaResponse = (function() { - - /** - * Properties of a GetSchemaResponse. - * @memberof tabletmanagerdata - * @interface IGetSchemaResponse - * @property {tabletmanagerdata.ISchemaDefinition|null} [schema_definition] GetSchemaResponse schema_definition - */ - - /** - * Constructs a new GetSchemaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a GetSchemaResponse. - * @implements IGetSchemaResponse - * @constructor - * @param {tabletmanagerdata.IGetSchemaResponse=} [properties] Properties to set - */ - function GetSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemaResponse schema_definition. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} schema_definition - * @memberof tabletmanagerdata.GetSchemaResponse - * @instance - */ - GetSchemaResponse.prototype.schema_definition = null; - - /** - * Creates a new GetSchemaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {tabletmanagerdata.IGetSchemaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.GetSchemaResponse} GetSchemaResponse instance - */ - GetSchemaResponse.create = function create(properties) { - return new GetSchemaResponse(properties); - }; - - /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link tabletmanagerdata.GetSchemaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {tabletmanagerdata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema_definition != null && Object.hasOwnProperty.call(message, "schema_definition")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.schema_definition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.GetSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {tabletmanagerdata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.GetSchemaResponse} GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.GetSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema_definition = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.GetSchemaResponse} GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaResponse message. - * @function verify - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema_definition != null && message.hasOwnProperty("schema_definition")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.schema_definition); - if (error) - return "schema_definition." + error; - } - return null; - }; - - /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.GetSchemaResponse} GetSchemaResponse - */ - GetSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.GetSchemaResponse) - return object; - var message = new $root.tabletmanagerdata.GetSchemaResponse(); - if (object.schema_definition != null) { - if (typeof object.schema_definition !== "object") - throw TypeError(".tabletmanagerdata.GetSchemaResponse.schema_definition: object expected"); - message.schema_definition = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.schema_definition); - } - return message; - }; - - /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.GetSchemaResponse - * @static - * @param {tabletmanagerdata.GetSchemaResponse} message GetSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.schema_definition = null; - if (message.schema_definition != null && message.hasOwnProperty("schema_definition")) - object.schema_definition = $root.tabletmanagerdata.SchemaDefinition.toObject(message.schema_definition, options); - return object; - }; - - /** - * Converts this GetSchemaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.GetSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - GetSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemaResponse; - })(); - - tabletmanagerdata.GetPermissionsRequest = (function() { - - /** - * Properties of a GetPermissionsRequest. - * @memberof tabletmanagerdata - * @interface IGetPermissionsRequest - */ - - /** - * Constructs a new GetPermissionsRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a GetPermissionsRequest. - * @implements IGetPermissionsRequest - * @constructor - * @param {tabletmanagerdata.IGetPermissionsRequest=} [properties] Properties to set - */ - function GetPermissionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new GetPermissionsRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {tabletmanagerdata.IGetPermissionsRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.GetPermissionsRequest} GetPermissionsRequest instance - */ - GetPermissionsRequest.create = function create(properties) { - return new GetPermissionsRequest(properties); - }; - - /** - * Encodes the specified GetPermissionsRequest message. Does not implicitly {@link tabletmanagerdata.GetPermissionsRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {tabletmanagerdata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPermissionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified GetPermissionsRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.GetPermissionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {tabletmanagerdata.IGetPermissionsRequest} message GetPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.GetPermissionsRequest} GetPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPermissionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.GetPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPermissionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.GetPermissionsRequest} GetPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPermissionsRequest message. - * @function verify - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPermissionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a GetPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.GetPermissionsRequest} GetPermissionsRequest - */ - GetPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.GetPermissionsRequest) - return object; - return new $root.tabletmanagerdata.GetPermissionsRequest(); - }; - - /** - * Creates a plain object from a GetPermissionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.GetPermissionsRequest - * @static - * @param {tabletmanagerdata.GetPermissionsRequest} message GetPermissionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPermissionsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this GetPermissionsRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.GetPermissionsRequest - * @instance - * @returns {Object.} JSON object - */ - GetPermissionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetPermissionsRequest; - })(); - - tabletmanagerdata.GetPermissionsResponse = (function() { - - /** - * Properties of a GetPermissionsResponse. - * @memberof tabletmanagerdata - * @interface IGetPermissionsResponse - * @property {tabletmanagerdata.IPermissions|null} [permissions] GetPermissionsResponse permissions - */ - - /** - * Constructs a new GetPermissionsResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a GetPermissionsResponse. - * @implements IGetPermissionsResponse - * @constructor - * @param {tabletmanagerdata.IGetPermissionsResponse=} [properties] Properties to set - */ - function GetPermissionsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPermissionsResponse permissions. - * @member {tabletmanagerdata.IPermissions|null|undefined} permissions - * @memberof tabletmanagerdata.GetPermissionsResponse - * @instance - */ - GetPermissionsResponse.prototype.permissions = null; - - /** - * Creates a new GetPermissionsResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {tabletmanagerdata.IGetPermissionsResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.GetPermissionsResponse} GetPermissionsResponse instance - */ - GetPermissionsResponse.create = function create(properties) { - return new GetPermissionsResponse(properties); - }; - - /** - * Encodes the specified GetPermissionsResponse message. Does not implicitly {@link tabletmanagerdata.GetPermissionsResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {tabletmanagerdata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPermissionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.tabletmanagerdata.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetPermissionsResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.GetPermissionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {tabletmanagerdata.IGetPermissionsResponse} message GetPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.GetPermissionsResponse} GetPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPermissionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.GetPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.permissions = $root.tabletmanagerdata.Permissions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPermissionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.GetPermissionsResponse} GetPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPermissionsResponse message. - * @function verify - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPermissionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - var error = $root.tabletmanagerdata.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; - } - return null; - }; - - /** - * Creates a GetPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.GetPermissionsResponse} GetPermissionsResponse - */ - GetPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.GetPermissionsResponse) - return object; - var message = new $root.tabletmanagerdata.GetPermissionsResponse(); - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".tabletmanagerdata.GetPermissionsResponse.permissions: object expected"); - message.permissions = $root.tabletmanagerdata.Permissions.fromObject(object.permissions); - } - return message; - }; - - /** - * Creates a plain object from a GetPermissionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.GetPermissionsResponse - * @static - * @param {tabletmanagerdata.GetPermissionsResponse} message GetPermissionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.permissions = null; - if (message.permissions != null && message.hasOwnProperty("permissions")) - object.permissions = $root.tabletmanagerdata.Permissions.toObject(message.permissions, options); - return object; - }; - - /** - * Converts this GetPermissionsResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.GetPermissionsResponse - * @instance - * @returns {Object.} JSON object - */ - GetPermissionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetPermissionsResponse; - })(); - - tabletmanagerdata.SetReadOnlyRequest = (function() { - - /** - * Properties of a SetReadOnlyRequest. - * @memberof tabletmanagerdata - * @interface ISetReadOnlyRequest - */ - - /** - * Constructs a new SetReadOnlyRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a SetReadOnlyRequest. - * @implements ISetReadOnlyRequest - * @constructor - * @param {tabletmanagerdata.ISetReadOnlyRequest=} [properties] Properties to set - */ - function SetReadOnlyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SetReadOnlyRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {tabletmanagerdata.ISetReadOnlyRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.SetReadOnlyRequest} SetReadOnlyRequest instance - */ - SetReadOnlyRequest.create = function create(properties) { - return new SetReadOnlyRequest(properties); - }; - - /** - * Encodes the specified SetReadOnlyRequest message. Does not implicitly {@link tabletmanagerdata.SetReadOnlyRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {tabletmanagerdata.ISetReadOnlyRequest} message SetReadOnlyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadOnlyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetReadOnlyRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadOnlyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {tabletmanagerdata.ISetReadOnlyRequest} message SetReadOnlyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadOnlyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetReadOnlyRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SetReadOnlyRequest} SetReadOnlyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadOnlyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SetReadOnlyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetReadOnlyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SetReadOnlyRequest} SetReadOnlyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadOnlyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetReadOnlyRequest message. - * @function verify - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetReadOnlyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetReadOnlyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SetReadOnlyRequest} SetReadOnlyRequest - */ - SetReadOnlyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SetReadOnlyRequest) - return object; - return new $root.tabletmanagerdata.SetReadOnlyRequest(); - }; - - /** - * Creates a plain object from a SetReadOnlyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @static - * @param {tabletmanagerdata.SetReadOnlyRequest} message SetReadOnlyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetReadOnlyRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetReadOnlyRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SetReadOnlyRequest - * @instance - * @returns {Object.} JSON object - */ - SetReadOnlyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetReadOnlyRequest; - })(); - - tabletmanagerdata.SetReadOnlyResponse = (function() { - - /** - * Properties of a SetReadOnlyResponse. - * @memberof tabletmanagerdata - * @interface ISetReadOnlyResponse - */ - - /** - * Constructs a new SetReadOnlyResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a SetReadOnlyResponse. - * @implements ISetReadOnlyResponse - * @constructor - * @param {tabletmanagerdata.ISetReadOnlyResponse=} [properties] Properties to set - */ - function SetReadOnlyResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SetReadOnlyResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {tabletmanagerdata.ISetReadOnlyResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.SetReadOnlyResponse} SetReadOnlyResponse instance - */ - SetReadOnlyResponse.create = function create(properties) { - return new SetReadOnlyResponse(properties); - }; - - /** - * Encodes the specified SetReadOnlyResponse message. Does not implicitly {@link tabletmanagerdata.SetReadOnlyResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {tabletmanagerdata.ISetReadOnlyResponse} message SetReadOnlyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadOnlyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetReadOnlyResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadOnlyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {tabletmanagerdata.ISetReadOnlyResponse} message SetReadOnlyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadOnlyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetReadOnlyResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SetReadOnlyResponse} SetReadOnlyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadOnlyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SetReadOnlyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetReadOnlyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SetReadOnlyResponse} SetReadOnlyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadOnlyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetReadOnlyResponse message. - * @function verify - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetReadOnlyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetReadOnlyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SetReadOnlyResponse} SetReadOnlyResponse - */ - SetReadOnlyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SetReadOnlyResponse) - return object; - return new $root.tabletmanagerdata.SetReadOnlyResponse(); - }; - - /** - * Creates a plain object from a SetReadOnlyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @static - * @param {tabletmanagerdata.SetReadOnlyResponse} message SetReadOnlyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetReadOnlyResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetReadOnlyResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SetReadOnlyResponse - * @instance - * @returns {Object.} JSON object - */ - SetReadOnlyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetReadOnlyResponse; - })(); - - tabletmanagerdata.SetReadWriteRequest = (function() { - - /** - * Properties of a SetReadWriteRequest. - * @memberof tabletmanagerdata - * @interface ISetReadWriteRequest - */ - - /** - * Constructs a new SetReadWriteRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a SetReadWriteRequest. - * @implements ISetReadWriteRequest - * @constructor - * @param {tabletmanagerdata.ISetReadWriteRequest=} [properties] Properties to set - */ - function SetReadWriteRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SetReadWriteRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {tabletmanagerdata.ISetReadWriteRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.SetReadWriteRequest} SetReadWriteRequest instance - */ - SetReadWriteRequest.create = function create(properties) { - return new SetReadWriteRequest(properties); - }; - - /** - * Encodes the specified SetReadWriteRequest message. Does not implicitly {@link tabletmanagerdata.SetReadWriteRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {tabletmanagerdata.ISetReadWriteRequest} message SetReadWriteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadWriteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetReadWriteRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadWriteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {tabletmanagerdata.ISetReadWriteRequest} message SetReadWriteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadWriteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetReadWriteRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SetReadWriteRequest} SetReadWriteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadWriteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SetReadWriteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetReadWriteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SetReadWriteRequest} SetReadWriteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadWriteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetReadWriteRequest message. - * @function verify - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetReadWriteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetReadWriteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SetReadWriteRequest} SetReadWriteRequest - */ - SetReadWriteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SetReadWriteRequest) - return object; - return new $root.tabletmanagerdata.SetReadWriteRequest(); - }; - - /** - * Creates a plain object from a SetReadWriteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SetReadWriteRequest - * @static - * @param {tabletmanagerdata.SetReadWriteRequest} message SetReadWriteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetReadWriteRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetReadWriteRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SetReadWriteRequest - * @instance - * @returns {Object.} JSON object - */ - SetReadWriteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetReadWriteRequest; - })(); - - tabletmanagerdata.SetReadWriteResponse = (function() { - - /** - * Properties of a SetReadWriteResponse. - * @memberof tabletmanagerdata - * @interface ISetReadWriteResponse - */ - - /** - * Constructs a new SetReadWriteResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a SetReadWriteResponse. - * @implements ISetReadWriteResponse - * @constructor - * @param {tabletmanagerdata.ISetReadWriteResponse=} [properties] Properties to set - */ - function SetReadWriteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SetReadWriteResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {tabletmanagerdata.ISetReadWriteResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.SetReadWriteResponse} SetReadWriteResponse instance - */ - SetReadWriteResponse.create = function create(properties) { - return new SetReadWriteResponse(properties); - }; - - /** - * Encodes the specified SetReadWriteResponse message. Does not implicitly {@link tabletmanagerdata.SetReadWriteResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {tabletmanagerdata.ISetReadWriteResponse} message SetReadWriteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadWriteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetReadWriteResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SetReadWriteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {tabletmanagerdata.ISetReadWriteResponse} message SetReadWriteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetReadWriteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetReadWriteResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SetReadWriteResponse} SetReadWriteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadWriteResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SetReadWriteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetReadWriteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SetReadWriteResponse} SetReadWriteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetReadWriteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetReadWriteResponse message. - * @function verify - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetReadWriteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetReadWriteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SetReadWriteResponse} SetReadWriteResponse - */ - SetReadWriteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SetReadWriteResponse) - return object; - return new $root.tabletmanagerdata.SetReadWriteResponse(); - }; - - /** - * Creates a plain object from a SetReadWriteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SetReadWriteResponse - * @static - * @param {tabletmanagerdata.SetReadWriteResponse} message SetReadWriteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetReadWriteResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetReadWriteResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SetReadWriteResponse - * @instance - * @returns {Object.} JSON object - */ - SetReadWriteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetReadWriteResponse; - })(); - - tabletmanagerdata.ChangeTypeRequest = (function() { - - /** - * Properties of a ChangeTypeRequest. - * @memberof tabletmanagerdata - * @interface IChangeTypeRequest - * @property {topodata.TabletType|null} [tablet_type] ChangeTypeRequest tablet_type - */ - - /** - * Constructs a new ChangeTypeRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a ChangeTypeRequest. - * @implements IChangeTypeRequest - * @constructor - * @param {tabletmanagerdata.IChangeTypeRequest=} [properties] Properties to set - */ - function ChangeTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChangeTypeRequest tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof tabletmanagerdata.ChangeTypeRequest - * @instance - */ - ChangeTypeRequest.prototype.tablet_type = 0; - - /** - * Creates a new ChangeTypeRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {tabletmanagerdata.IChangeTypeRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ChangeTypeRequest} ChangeTypeRequest instance - */ - ChangeTypeRequest.create = function create(properties) { - return new ChangeTypeRequest(properties); - }; - - /** - * Encodes the specified ChangeTypeRequest message. Does not implicitly {@link tabletmanagerdata.ChangeTypeRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {tabletmanagerdata.IChangeTypeRequest} message ChangeTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); - return writer; - }; - - /** - * Encodes the specified ChangeTypeRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ChangeTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {tabletmanagerdata.IChangeTypeRequest} message ChangeTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChangeTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ChangeTypeRequest} ChangeTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ChangeTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChangeTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ChangeTypeRequest} ChangeTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChangeTypeRequest message. - * @function verify - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChangeTypeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - return null; - }; - - /** - * Creates a ChangeTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ChangeTypeRequest} ChangeTypeRequest - */ - ChangeTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ChangeTypeRequest) - return object; - var message = new $root.tabletmanagerdata.ChangeTypeRequest(); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - return message; - }; - - /** - * Creates a plain object from a ChangeTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ChangeTypeRequest - * @static - * @param {tabletmanagerdata.ChangeTypeRequest} message ChangeTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChangeTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - return object; - }; - - /** - * Converts this ChangeTypeRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ChangeTypeRequest - * @instance - * @returns {Object.} JSON object - */ - ChangeTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ChangeTypeRequest; - })(); - - tabletmanagerdata.ChangeTypeResponse = (function() { - - /** - * Properties of a ChangeTypeResponse. - * @memberof tabletmanagerdata - * @interface IChangeTypeResponse - */ - - /** - * Constructs a new ChangeTypeResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a ChangeTypeResponse. - * @implements IChangeTypeResponse - * @constructor - * @param {tabletmanagerdata.IChangeTypeResponse=} [properties] Properties to set - */ - function ChangeTypeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ChangeTypeResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {tabletmanagerdata.IChangeTypeResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ChangeTypeResponse} ChangeTypeResponse instance - */ - ChangeTypeResponse.create = function create(properties) { - return new ChangeTypeResponse(properties); - }; - - /** - * Encodes the specified ChangeTypeResponse message. Does not implicitly {@link tabletmanagerdata.ChangeTypeResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {tabletmanagerdata.IChangeTypeResponse} message ChangeTypeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTypeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ChangeTypeResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ChangeTypeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {tabletmanagerdata.IChangeTypeResponse} message ChangeTypeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChangeTypeResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ChangeTypeResponse} ChangeTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTypeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ChangeTypeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChangeTypeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ChangeTypeResponse} ChangeTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTypeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChangeTypeResponse message. - * @function verify - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChangeTypeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ChangeTypeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ChangeTypeResponse} ChangeTypeResponse - */ - ChangeTypeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ChangeTypeResponse) - return object; - return new $root.tabletmanagerdata.ChangeTypeResponse(); - }; - - /** - * Creates a plain object from a ChangeTypeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ChangeTypeResponse - * @static - * @param {tabletmanagerdata.ChangeTypeResponse} message ChangeTypeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChangeTypeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ChangeTypeResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ChangeTypeResponse - * @instance - * @returns {Object.} JSON object - */ - ChangeTypeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ChangeTypeResponse; - })(); - - tabletmanagerdata.RefreshStateRequest = (function() { - - /** - * Properties of a RefreshStateRequest. - * @memberof tabletmanagerdata - * @interface IRefreshStateRequest - */ - - /** - * Constructs a new RefreshStateRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a RefreshStateRequest. - * @implements IRefreshStateRequest - * @constructor - * @param {tabletmanagerdata.IRefreshStateRequest=} [properties] Properties to set - */ - function RefreshStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RefreshStateRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {tabletmanagerdata.IRefreshStateRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.RefreshStateRequest} RefreshStateRequest instance - */ - RefreshStateRequest.create = function create(properties) { - return new RefreshStateRequest(properties); - }; - - /** - * Encodes the specified RefreshStateRequest message. Does not implicitly {@link tabletmanagerdata.RefreshStateRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {tabletmanagerdata.IRefreshStateRequest} message RefreshStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RefreshStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RefreshStateRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.RefreshStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {tabletmanagerdata.IRefreshStateRequest} message RefreshStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RefreshStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RefreshStateRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.RefreshStateRequest} RefreshStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RefreshStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.RefreshStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RefreshStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.RefreshStateRequest} RefreshStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RefreshStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RefreshStateRequest message. - * @function verify - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RefreshStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RefreshStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.RefreshStateRequest} RefreshStateRequest - */ - RefreshStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.RefreshStateRequest) - return object; - return new $root.tabletmanagerdata.RefreshStateRequest(); - }; - - /** - * Creates a plain object from a RefreshStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.RefreshStateRequest - * @static - * @param {tabletmanagerdata.RefreshStateRequest} message RefreshStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RefreshStateRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RefreshStateRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.RefreshStateRequest - * @instance - * @returns {Object.} JSON object - */ - RefreshStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RefreshStateRequest; - })(); - - tabletmanagerdata.RefreshStateResponse = (function() { - - /** - * Properties of a RefreshStateResponse. - * @memberof tabletmanagerdata - * @interface IRefreshStateResponse - */ - - /** - * Constructs a new RefreshStateResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a RefreshStateResponse. - * @implements IRefreshStateResponse - * @constructor - * @param {tabletmanagerdata.IRefreshStateResponse=} [properties] Properties to set - */ - function RefreshStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RefreshStateResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {tabletmanagerdata.IRefreshStateResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.RefreshStateResponse} RefreshStateResponse instance - */ - RefreshStateResponse.create = function create(properties) { - return new RefreshStateResponse(properties); - }; - - /** - * Encodes the specified RefreshStateResponse message. Does not implicitly {@link tabletmanagerdata.RefreshStateResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {tabletmanagerdata.IRefreshStateResponse} message RefreshStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RefreshStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RefreshStateResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.RefreshStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {tabletmanagerdata.IRefreshStateResponse} message RefreshStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RefreshStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RefreshStateResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.RefreshStateResponse} RefreshStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RefreshStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.RefreshStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RefreshStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.RefreshStateResponse} RefreshStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RefreshStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RefreshStateResponse message. - * @function verify - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RefreshStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RefreshStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.RefreshStateResponse} RefreshStateResponse - */ - RefreshStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.RefreshStateResponse) - return object; - return new $root.tabletmanagerdata.RefreshStateResponse(); - }; - - /** - * Creates a plain object from a RefreshStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.RefreshStateResponse - * @static - * @param {tabletmanagerdata.RefreshStateResponse} message RefreshStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RefreshStateResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RefreshStateResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.RefreshStateResponse - * @instance - * @returns {Object.} JSON object - */ - RefreshStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RefreshStateResponse; - })(); - - tabletmanagerdata.RunHealthCheckRequest = (function() { - - /** - * Properties of a RunHealthCheckRequest. - * @memberof tabletmanagerdata - * @interface IRunHealthCheckRequest - */ - - /** - * Constructs a new RunHealthCheckRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a RunHealthCheckRequest. - * @implements IRunHealthCheckRequest - * @constructor - * @param {tabletmanagerdata.IRunHealthCheckRequest=} [properties] Properties to set - */ - function RunHealthCheckRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RunHealthCheckRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {tabletmanagerdata.IRunHealthCheckRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.RunHealthCheckRequest} RunHealthCheckRequest instance - */ - RunHealthCheckRequest.create = function create(properties) { - return new RunHealthCheckRequest(properties); - }; - - /** - * Encodes the specified RunHealthCheckRequest message. Does not implicitly {@link tabletmanagerdata.RunHealthCheckRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {tabletmanagerdata.IRunHealthCheckRequest} message RunHealthCheckRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunHealthCheckRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RunHealthCheckRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.RunHealthCheckRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {tabletmanagerdata.IRunHealthCheckRequest} message RunHealthCheckRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunHealthCheckRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.RunHealthCheckRequest} RunHealthCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunHealthCheckRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.RunHealthCheckRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunHealthCheckRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.RunHealthCheckRequest} RunHealthCheckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunHealthCheckRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunHealthCheckRequest message. - * @function verify - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunHealthCheckRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RunHealthCheckRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.RunHealthCheckRequest} RunHealthCheckRequest - */ - RunHealthCheckRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.RunHealthCheckRequest) - return object; - return new $root.tabletmanagerdata.RunHealthCheckRequest(); - }; - - /** - * Creates a plain object from a RunHealthCheckRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @static - * @param {tabletmanagerdata.RunHealthCheckRequest} message RunHealthCheckRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunHealthCheckRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RunHealthCheckRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.RunHealthCheckRequest - * @instance - * @returns {Object.} JSON object - */ - RunHealthCheckRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RunHealthCheckRequest; - })(); - - tabletmanagerdata.RunHealthCheckResponse = (function() { - - /** - * Properties of a RunHealthCheckResponse. - * @memberof tabletmanagerdata - * @interface IRunHealthCheckResponse - */ - - /** - * Constructs a new RunHealthCheckResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a RunHealthCheckResponse. - * @implements IRunHealthCheckResponse - * @constructor - * @param {tabletmanagerdata.IRunHealthCheckResponse=} [properties] Properties to set - */ - function RunHealthCheckResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RunHealthCheckResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {tabletmanagerdata.IRunHealthCheckResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.RunHealthCheckResponse} RunHealthCheckResponse instance - */ - RunHealthCheckResponse.create = function create(properties) { - return new RunHealthCheckResponse(properties); - }; - - /** - * Encodes the specified RunHealthCheckResponse message. Does not implicitly {@link tabletmanagerdata.RunHealthCheckResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {tabletmanagerdata.IRunHealthCheckResponse} message RunHealthCheckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunHealthCheckResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RunHealthCheckResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.RunHealthCheckResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {tabletmanagerdata.IRunHealthCheckResponse} message RunHealthCheckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RunHealthCheckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.RunHealthCheckResponse} RunHealthCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunHealthCheckResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.RunHealthCheckResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RunHealthCheckResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.RunHealthCheckResponse} RunHealthCheckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RunHealthCheckResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RunHealthCheckResponse message. - * @function verify - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RunHealthCheckResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RunHealthCheckResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.RunHealthCheckResponse} RunHealthCheckResponse - */ - RunHealthCheckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.RunHealthCheckResponse) - return object; - return new $root.tabletmanagerdata.RunHealthCheckResponse(); - }; - - /** - * Creates a plain object from a RunHealthCheckResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @static - * @param {tabletmanagerdata.RunHealthCheckResponse} message RunHealthCheckResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RunHealthCheckResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RunHealthCheckResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.RunHealthCheckResponse - * @instance - * @returns {Object.} JSON object - */ - RunHealthCheckResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RunHealthCheckResponse; - })(); - - tabletmanagerdata.IgnoreHealthErrorRequest = (function() { - - /** - * Properties of an IgnoreHealthErrorRequest. - * @memberof tabletmanagerdata - * @interface IIgnoreHealthErrorRequest - * @property {string|null} [pattern] IgnoreHealthErrorRequest pattern - */ - - /** - * Constructs a new IgnoreHealthErrorRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an IgnoreHealthErrorRequest. - * @implements IIgnoreHealthErrorRequest - * @constructor - * @param {tabletmanagerdata.IIgnoreHealthErrorRequest=} [properties] Properties to set - */ - function IgnoreHealthErrorRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IgnoreHealthErrorRequest pattern. - * @member {string} pattern - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @instance - */ - IgnoreHealthErrorRequest.prototype.pattern = ""; - - /** - * Creates a new IgnoreHealthErrorRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {tabletmanagerdata.IIgnoreHealthErrorRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.IgnoreHealthErrorRequest} IgnoreHealthErrorRequest instance - */ - IgnoreHealthErrorRequest.create = function create(properties) { - return new IgnoreHealthErrorRequest(properties); - }; - - /** - * Encodes the specified IgnoreHealthErrorRequest message. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {tabletmanagerdata.IIgnoreHealthErrorRequest} message IgnoreHealthErrorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IgnoreHealthErrorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pattern); - return writer; - }; - - /** - * Encodes the specified IgnoreHealthErrorRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {tabletmanagerdata.IIgnoreHealthErrorRequest} message IgnoreHealthErrorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IgnoreHealthErrorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IgnoreHealthErrorRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.IgnoreHealthErrorRequest} IgnoreHealthErrorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IgnoreHealthErrorRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.IgnoreHealthErrorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pattern = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IgnoreHealthErrorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.IgnoreHealthErrorRequest} IgnoreHealthErrorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IgnoreHealthErrorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IgnoreHealthErrorRequest message. - * @function verify - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IgnoreHealthErrorRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) - if (!$util.isString(message.pattern)) - return "pattern: string expected"; - return null; - }; - - /** - * Creates an IgnoreHealthErrorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.IgnoreHealthErrorRequest} IgnoreHealthErrorRequest - */ - IgnoreHealthErrorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.IgnoreHealthErrorRequest) - return object; - var message = new $root.tabletmanagerdata.IgnoreHealthErrorRequest(); - if (object.pattern != null) - message.pattern = String(object.pattern); - return message; - }; - - /** - * Creates a plain object from an IgnoreHealthErrorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @static - * @param {tabletmanagerdata.IgnoreHealthErrorRequest} message IgnoreHealthErrorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IgnoreHealthErrorRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pattern = ""; - if (message.pattern != null && message.hasOwnProperty("pattern")) - object.pattern = message.pattern; - return object; - }; - - /** - * Converts this IgnoreHealthErrorRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.IgnoreHealthErrorRequest - * @instance - * @returns {Object.} JSON object - */ - IgnoreHealthErrorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IgnoreHealthErrorRequest; - })(); - - tabletmanagerdata.IgnoreHealthErrorResponse = (function() { - - /** - * Properties of an IgnoreHealthErrorResponse. - * @memberof tabletmanagerdata - * @interface IIgnoreHealthErrorResponse - */ - - /** - * Constructs a new IgnoreHealthErrorResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an IgnoreHealthErrorResponse. - * @implements IIgnoreHealthErrorResponse - * @constructor - * @param {tabletmanagerdata.IIgnoreHealthErrorResponse=} [properties] Properties to set - */ - function IgnoreHealthErrorResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new IgnoreHealthErrorResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {tabletmanagerdata.IIgnoreHealthErrorResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.IgnoreHealthErrorResponse} IgnoreHealthErrorResponse instance - */ - IgnoreHealthErrorResponse.create = function create(properties) { - return new IgnoreHealthErrorResponse(properties); - }; - - /** - * Encodes the specified IgnoreHealthErrorResponse message. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {tabletmanagerdata.IIgnoreHealthErrorResponse} message IgnoreHealthErrorResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IgnoreHealthErrorResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified IgnoreHealthErrorResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.IgnoreHealthErrorResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {tabletmanagerdata.IIgnoreHealthErrorResponse} message IgnoreHealthErrorResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IgnoreHealthErrorResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IgnoreHealthErrorResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.IgnoreHealthErrorResponse} IgnoreHealthErrorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IgnoreHealthErrorResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.IgnoreHealthErrorResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IgnoreHealthErrorResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.IgnoreHealthErrorResponse} IgnoreHealthErrorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IgnoreHealthErrorResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IgnoreHealthErrorResponse message. - * @function verify - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IgnoreHealthErrorResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an IgnoreHealthErrorResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.IgnoreHealthErrorResponse} IgnoreHealthErrorResponse - */ - IgnoreHealthErrorResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.IgnoreHealthErrorResponse) - return object; - return new $root.tabletmanagerdata.IgnoreHealthErrorResponse(); - }; - - /** - * Creates a plain object from an IgnoreHealthErrorResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @static - * @param {tabletmanagerdata.IgnoreHealthErrorResponse} message IgnoreHealthErrorResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IgnoreHealthErrorResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this IgnoreHealthErrorResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.IgnoreHealthErrorResponse - * @instance - * @returns {Object.} JSON object - */ - IgnoreHealthErrorResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IgnoreHealthErrorResponse; - })(); - - tabletmanagerdata.ReloadSchemaRequest = (function() { - - /** - * Properties of a ReloadSchemaRequest. - * @memberof tabletmanagerdata - * @interface IReloadSchemaRequest - * @property {string|null} [wait_position] ReloadSchemaRequest wait_position - */ - - /** - * Constructs a new ReloadSchemaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a ReloadSchemaRequest. - * @implements IReloadSchemaRequest - * @constructor - * @param {tabletmanagerdata.IReloadSchemaRequest=} [properties] Properties to set - */ - function ReloadSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReloadSchemaRequest wait_position. - * @member {string} wait_position - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @instance - */ - ReloadSchemaRequest.prototype.wait_position = ""; - - /** - * Creates a new ReloadSchemaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {tabletmanagerdata.IReloadSchemaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ReloadSchemaRequest} ReloadSchemaRequest instance - */ - ReloadSchemaRequest.create = function create(properties) { - return new ReloadSchemaRequest(properties); - }; - - /** - * Encodes the specified ReloadSchemaRequest message. Does not implicitly {@link tabletmanagerdata.ReloadSchemaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {tabletmanagerdata.IReloadSchemaRequest} message ReloadSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReloadSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.wait_position != null && Object.hasOwnProperty.call(message, "wait_position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.wait_position); - return writer; - }; - - /** - * Encodes the specified ReloadSchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReloadSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {tabletmanagerdata.IReloadSchemaRequest} message ReloadSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReloadSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReloadSchemaRequest} ReloadSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReloadSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReloadSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.wait_position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReloadSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReloadSchemaRequest} ReloadSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReloadSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReloadSchemaRequest message. - * @function verify - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReloadSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - if (!$util.isString(message.wait_position)) - return "wait_position: string expected"; - return null; - }; - - /** - * Creates a ReloadSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReloadSchemaRequest} ReloadSchemaRequest - */ - ReloadSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReloadSchemaRequest) - return object; - var message = new $root.tabletmanagerdata.ReloadSchemaRequest(); - if (object.wait_position != null) - message.wait_position = String(object.wait_position); - return message; - }; - - /** - * Creates a plain object from a ReloadSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @static - * @param {tabletmanagerdata.ReloadSchemaRequest} message ReloadSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReloadSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.wait_position = ""; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - object.wait_position = message.wait_position; - return object; - }; - - /** - * Converts this ReloadSchemaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReloadSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - ReloadSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReloadSchemaRequest; - })(); - - tabletmanagerdata.ReloadSchemaResponse = (function() { - - /** - * Properties of a ReloadSchemaResponse. - * @memberof tabletmanagerdata - * @interface IReloadSchemaResponse - */ - - /** - * Constructs a new ReloadSchemaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a ReloadSchemaResponse. - * @implements IReloadSchemaResponse - * @constructor - * @param {tabletmanagerdata.IReloadSchemaResponse=} [properties] Properties to set - */ - function ReloadSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReloadSchemaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {tabletmanagerdata.IReloadSchemaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ReloadSchemaResponse} ReloadSchemaResponse instance - */ - ReloadSchemaResponse.create = function create(properties) { - return new ReloadSchemaResponse(properties); - }; - - /** - * Encodes the specified ReloadSchemaResponse message. Does not implicitly {@link tabletmanagerdata.ReloadSchemaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {tabletmanagerdata.IReloadSchemaResponse} message ReloadSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReloadSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReloadSchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReloadSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {tabletmanagerdata.IReloadSchemaResponse} message ReloadSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReloadSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReloadSchemaResponse} ReloadSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReloadSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReloadSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReloadSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReloadSchemaResponse} ReloadSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReloadSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReloadSchemaResponse message. - * @function verify - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReloadSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReloadSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReloadSchemaResponse} ReloadSchemaResponse - */ - ReloadSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReloadSchemaResponse) - return object; - return new $root.tabletmanagerdata.ReloadSchemaResponse(); - }; - - /** - * Creates a plain object from a ReloadSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @static - * @param {tabletmanagerdata.ReloadSchemaResponse} message ReloadSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReloadSchemaResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReloadSchemaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReloadSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - ReloadSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReloadSchemaResponse; - })(); - - tabletmanagerdata.PreflightSchemaRequest = (function() { - - /** - * Properties of a PreflightSchemaRequest. - * @memberof tabletmanagerdata - * @interface IPreflightSchemaRequest - * @property {Array.|null} [changes] PreflightSchemaRequest changes - */ - - /** - * Constructs a new PreflightSchemaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a PreflightSchemaRequest. - * @implements IPreflightSchemaRequest - * @constructor - * @param {tabletmanagerdata.IPreflightSchemaRequest=} [properties] Properties to set - */ - function PreflightSchemaRequest(properties) { - this.changes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PreflightSchemaRequest changes. - * @member {Array.} changes - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @instance - */ - PreflightSchemaRequest.prototype.changes = $util.emptyArray; - - /** - * Creates a new PreflightSchemaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {tabletmanagerdata.IPreflightSchemaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.PreflightSchemaRequest} PreflightSchemaRequest instance - */ - PreflightSchemaRequest.create = function create(properties) { - return new PreflightSchemaRequest(properties); - }; - - /** - * Encodes the specified PreflightSchemaRequest message. Does not implicitly {@link tabletmanagerdata.PreflightSchemaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {tabletmanagerdata.IPreflightSchemaRequest} message PreflightSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreflightSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.changes != null && message.changes.length) - for (var i = 0; i < message.changes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.changes[i]); - return writer; - }; - - /** - * Encodes the specified PreflightSchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PreflightSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {tabletmanagerdata.IPreflightSchemaRequest} message PreflightSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreflightSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreflightSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PreflightSchemaRequest} PreflightSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreflightSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PreflightSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.changes && message.changes.length)) - message.changes = []; - message.changes.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreflightSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PreflightSchemaRequest} PreflightSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreflightSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreflightSchemaRequest message. - * @function verify - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreflightSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.changes != null && message.hasOwnProperty("changes")) { - if (!Array.isArray(message.changes)) - return "changes: array expected"; - for (var i = 0; i < message.changes.length; ++i) - if (!$util.isString(message.changes[i])) - return "changes: string[] expected"; - } - return null; - }; - - /** - * Creates a PreflightSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PreflightSchemaRequest} PreflightSchemaRequest - */ - PreflightSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PreflightSchemaRequest) - return object; - var message = new $root.tabletmanagerdata.PreflightSchemaRequest(); - if (object.changes) { - if (!Array.isArray(object.changes)) - throw TypeError(".tabletmanagerdata.PreflightSchemaRequest.changes: array expected"); - message.changes = []; - for (var i = 0; i < object.changes.length; ++i) - message.changes[i] = String(object.changes[i]); - } - return message; - }; - - /** - * Creates a plain object from a PreflightSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @static - * @param {tabletmanagerdata.PreflightSchemaRequest} message PreflightSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreflightSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.changes = []; - if (message.changes && message.changes.length) { - object.changes = []; - for (var j = 0; j < message.changes.length; ++j) - object.changes[j] = message.changes[j]; - } - return object; - }; - - /** - * Converts this PreflightSchemaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PreflightSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - PreflightSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PreflightSchemaRequest; - })(); - - tabletmanagerdata.PreflightSchemaResponse = (function() { - - /** - * Properties of a PreflightSchemaResponse. - * @memberof tabletmanagerdata - * @interface IPreflightSchemaResponse - * @property {Array.|null} [change_results] PreflightSchemaResponse change_results - */ - - /** - * Constructs a new PreflightSchemaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a PreflightSchemaResponse. - * @implements IPreflightSchemaResponse - * @constructor - * @param {tabletmanagerdata.IPreflightSchemaResponse=} [properties] Properties to set - */ - function PreflightSchemaResponse(properties) { - this.change_results = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PreflightSchemaResponse change_results. - * @member {Array.} change_results - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @instance - */ - PreflightSchemaResponse.prototype.change_results = $util.emptyArray; - - /** - * Creates a new PreflightSchemaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {tabletmanagerdata.IPreflightSchemaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.PreflightSchemaResponse} PreflightSchemaResponse instance - */ - PreflightSchemaResponse.create = function create(properties) { - return new PreflightSchemaResponse(properties); - }; - - /** - * Encodes the specified PreflightSchemaResponse message. Does not implicitly {@link tabletmanagerdata.PreflightSchemaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {tabletmanagerdata.IPreflightSchemaResponse} message PreflightSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreflightSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.change_results != null && message.change_results.length) - for (var i = 0; i < message.change_results.length; ++i) - $root.tabletmanagerdata.SchemaChangeResult.encode(message.change_results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PreflightSchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PreflightSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {tabletmanagerdata.IPreflightSchemaResponse} message PreflightSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreflightSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreflightSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PreflightSchemaResponse} PreflightSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreflightSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PreflightSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.change_results && message.change_results.length)) - message.change_results = []; - message.change_results.push($root.tabletmanagerdata.SchemaChangeResult.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreflightSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PreflightSchemaResponse} PreflightSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreflightSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreflightSchemaResponse message. - * @function verify - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreflightSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.change_results != null && message.hasOwnProperty("change_results")) { - if (!Array.isArray(message.change_results)) - return "change_results: array expected"; - for (var i = 0; i < message.change_results.length; ++i) { - var error = $root.tabletmanagerdata.SchemaChangeResult.verify(message.change_results[i]); - if (error) - return "change_results." + error; - } - } - return null; - }; - - /** - * Creates a PreflightSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PreflightSchemaResponse} PreflightSchemaResponse - */ - PreflightSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PreflightSchemaResponse) - return object; - var message = new $root.tabletmanagerdata.PreflightSchemaResponse(); - if (object.change_results) { - if (!Array.isArray(object.change_results)) - throw TypeError(".tabletmanagerdata.PreflightSchemaResponse.change_results: array expected"); - message.change_results = []; - for (var i = 0; i < object.change_results.length; ++i) { - if (typeof object.change_results[i] !== "object") - throw TypeError(".tabletmanagerdata.PreflightSchemaResponse.change_results: object expected"); - message.change_results[i] = $root.tabletmanagerdata.SchemaChangeResult.fromObject(object.change_results[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PreflightSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @static - * @param {tabletmanagerdata.PreflightSchemaResponse} message PreflightSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreflightSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.change_results = []; - if (message.change_results && message.change_results.length) { - object.change_results = []; - for (var j = 0; j < message.change_results.length; ++j) - object.change_results[j] = $root.tabletmanagerdata.SchemaChangeResult.toObject(message.change_results[j], options); - } - return object; - }; - - /** - * Converts this PreflightSchemaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PreflightSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - PreflightSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PreflightSchemaResponse; - })(); - - tabletmanagerdata.ApplySchemaRequest = (function() { - - /** - * Properties of an ApplySchemaRequest. - * @memberof tabletmanagerdata - * @interface IApplySchemaRequest - * @property {string|null} [sql] ApplySchemaRequest sql - * @property {boolean|null} [force] ApplySchemaRequest force - * @property {boolean|null} [allow_replication] ApplySchemaRequest allow_replication - * @property {tabletmanagerdata.ISchemaDefinition|null} [before_schema] ApplySchemaRequest before_schema - * @property {tabletmanagerdata.ISchemaDefinition|null} [after_schema] ApplySchemaRequest after_schema - */ - - /** - * Constructs a new ApplySchemaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an ApplySchemaRequest. - * @implements IApplySchemaRequest - * @constructor - * @param {tabletmanagerdata.IApplySchemaRequest=} [properties] Properties to set - */ - function ApplySchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ApplySchemaRequest sql. - * @member {string} sql - * @memberof tabletmanagerdata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.sql = ""; - - /** - * ApplySchemaRequest force. - * @member {boolean} force - * @memberof tabletmanagerdata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.force = false; - - /** - * ApplySchemaRequest allow_replication. - * @member {boolean} allow_replication - * @memberof tabletmanagerdata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.allow_replication = false; - - /** - * ApplySchemaRequest before_schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} before_schema - * @memberof tabletmanagerdata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.before_schema = null; - - /** - * ApplySchemaRequest after_schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} after_schema - * @memberof tabletmanagerdata.ApplySchemaRequest - * @instance - */ - ApplySchemaRequest.prototype.after_schema = null; - - /** - * Creates a new ApplySchemaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {tabletmanagerdata.IApplySchemaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ApplySchemaRequest} ApplySchemaRequest instance - */ - ApplySchemaRequest.create = function create(properties) { - return new ApplySchemaRequest(properties); - }; - - /** - * Encodes the specified ApplySchemaRequest message. Does not implicitly {@link tabletmanagerdata.ApplySchemaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {tabletmanagerdata.IApplySchemaRequest} message ApplySchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApplySchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sql); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - if (message.allow_replication != null && Object.hasOwnProperty.call(message, "allow_replication")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_replication); - if (message.before_schema != null && Object.hasOwnProperty.call(message, "before_schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.before_schema, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.after_schema != null && Object.hasOwnProperty.call(message, "after_schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.after_schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ApplySchemaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ApplySchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {tabletmanagerdata.IApplySchemaRequest} message ApplySchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApplySchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ApplySchemaRequest} ApplySchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApplySchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ApplySchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sql = reader.string(); - break; - case 2: - message.force = reader.bool(); - break; - case 3: - message.allow_replication = reader.bool(); - break; - case 4: - message.before_schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - case 5: - message.after_schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ApplySchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ApplySchemaRequest} ApplySchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApplySchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ApplySchemaRequest message. - * @function verify - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ApplySchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.allow_replication != null && message.hasOwnProperty("allow_replication")) - if (typeof message.allow_replication !== "boolean") - return "allow_replication: boolean expected"; - if (message.before_schema != null && message.hasOwnProperty("before_schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.before_schema); - if (error) - return "before_schema." + error; - } - if (message.after_schema != null && message.hasOwnProperty("after_schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.after_schema); - if (error) - return "after_schema." + error; - } - return null; - }; - - /** - * Creates an ApplySchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ApplySchemaRequest} ApplySchemaRequest - */ - ApplySchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ApplySchemaRequest) - return object; - var message = new $root.tabletmanagerdata.ApplySchemaRequest(); - if (object.sql != null) - message.sql = String(object.sql); - if (object.force != null) - message.force = Boolean(object.force); - if (object.allow_replication != null) - message.allow_replication = Boolean(object.allow_replication); - if (object.before_schema != null) { - if (typeof object.before_schema !== "object") - throw TypeError(".tabletmanagerdata.ApplySchemaRequest.before_schema: object expected"); - message.before_schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.before_schema); - } - if (object.after_schema != null) { - if (typeof object.after_schema !== "object") - throw TypeError(".tabletmanagerdata.ApplySchemaRequest.after_schema: object expected"); - message.after_schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.after_schema); - } - return message; - }; - - /** - * Creates a plain object from an ApplySchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ApplySchemaRequest - * @static - * @param {tabletmanagerdata.ApplySchemaRequest} message ApplySchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ApplySchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sql = ""; - object.force = false; - object.allow_replication = false; - object.before_schema = null; - object.after_schema = null; - } - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.allow_replication != null && message.hasOwnProperty("allow_replication")) - object.allow_replication = message.allow_replication; - if (message.before_schema != null && message.hasOwnProperty("before_schema")) - object.before_schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.before_schema, options); - if (message.after_schema != null && message.hasOwnProperty("after_schema")) - object.after_schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.after_schema, options); - return object; - }; - - /** - * Converts this ApplySchemaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ApplySchemaRequest - * @instance - * @returns {Object.} JSON object - */ - ApplySchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ApplySchemaRequest; - })(); - - tabletmanagerdata.ApplySchemaResponse = (function() { - - /** - * Properties of an ApplySchemaResponse. - * @memberof tabletmanagerdata - * @interface IApplySchemaResponse - * @property {tabletmanagerdata.ISchemaDefinition|null} [before_schema] ApplySchemaResponse before_schema - * @property {tabletmanagerdata.ISchemaDefinition|null} [after_schema] ApplySchemaResponse after_schema - */ - - /** - * Constructs a new ApplySchemaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an ApplySchemaResponse. - * @implements IApplySchemaResponse - * @constructor - * @param {tabletmanagerdata.IApplySchemaResponse=} [properties] Properties to set - */ - function ApplySchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ApplySchemaResponse before_schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} before_schema - * @memberof tabletmanagerdata.ApplySchemaResponse - * @instance - */ - ApplySchemaResponse.prototype.before_schema = null; - - /** - * ApplySchemaResponse after_schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} after_schema - * @memberof tabletmanagerdata.ApplySchemaResponse - * @instance - */ - ApplySchemaResponse.prototype.after_schema = null; - - /** - * Creates a new ApplySchemaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {tabletmanagerdata.IApplySchemaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ApplySchemaResponse} ApplySchemaResponse instance - */ - ApplySchemaResponse.create = function create(properties) { - return new ApplySchemaResponse(properties); - }; - - /** - * Encodes the specified ApplySchemaResponse message. Does not implicitly {@link tabletmanagerdata.ApplySchemaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {tabletmanagerdata.IApplySchemaResponse} message ApplySchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApplySchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.before_schema != null && Object.hasOwnProperty.call(message, "before_schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.before_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after_schema != null && Object.hasOwnProperty.call(message, "after_schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.after_schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ApplySchemaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ApplySchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {tabletmanagerdata.IApplySchemaResponse} message ApplySchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApplySchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ApplySchemaResponse} ApplySchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApplySchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ApplySchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.before_schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - case 2: - message.after_schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ApplySchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ApplySchemaResponse} ApplySchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApplySchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ApplySchemaResponse message. - * @function verify - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ApplySchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.before_schema != null && message.hasOwnProperty("before_schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.before_schema); - if (error) - return "before_schema." + error; - } - if (message.after_schema != null && message.hasOwnProperty("after_schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.after_schema); - if (error) - return "after_schema." + error; - } - return null; - }; - - /** - * Creates an ApplySchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ApplySchemaResponse} ApplySchemaResponse - */ - ApplySchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ApplySchemaResponse) - return object; - var message = new $root.tabletmanagerdata.ApplySchemaResponse(); - if (object.before_schema != null) { - if (typeof object.before_schema !== "object") - throw TypeError(".tabletmanagerdata.ApplySchemaResponse.before_schema: object expected"); - message.before_schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.before_schema); - } - if (object.after_schema != null) { - if (typeof object.after_schema !== "object") - throw TypeError(".tabletmanagerdata.ApplySchemaResponse.after_schema: object expected"); - message.after_schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.after_schema); - } - return message; - }; - - /** - * Creates a plain object from an ApplySchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ApplySchemaResponse - * @static - * @param {tabletmanagerdata.ApplySchemaResponse} message ApplySchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ApplySchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.before_schema = null; - object.after_schema = null; - } - if (message.before_schema != null && message.hasOwnProperty("before_schema")) - object.before_schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.before_schema, options); - if (message.after_schema != null && message.hasOwnProperty("after_schema")) - object.after_schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.after_schema, options); - return object; - }; - - /** - * Converts this ApplySchemaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ApplySchemaResponse - * @instance - * @returns {Object.} JSON object - */ - ApplySchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ApplySchemaResponse; - })(); - - tabletmanagerdata.LockTablesRequest = (function() { - - /** - * Properties of a LockTablesRequest. - * @memberof tabletmanagerdata - * @interface ILockTablesRequest - */ - - /** - * Constructs a new LockTablesRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a LockTablesRequest. - * @implements ILockTablesRequest - * @constructor - * @param {tabletmanagerdata.ILockTablesRequest=} [properties] Properties to set - */ - function LockTablesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new LockTablesRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {tabletmanagerdata.ILockTablesRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.LockTablesRequest} LockTablesRequest instance - */ - LockTablesRequest.create = function create(properties) { - return new LockTablesRequest(properties); - }; - - /** - * Encodes the specified LockTablesRequest message. Does not implicitly {@link tabletmanagerdata.LockTablesRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {tabletmanagerdata.ILockTablesRequest} message LockTablesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockTablesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified LockTablesRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.LockTablesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {tabletmanagerdata.ILockTablesRequest} message LockTablesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LockTablesRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.LockTablesRequest} LockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockTablesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.LockTablesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LockTablesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.LockTablesRequest} LockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockTablesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LockTablesRequest message. - * @function verify - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LockTablesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a LockTablesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.LockTablesRequest} LockTablesRequest - */ - LockTablesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.LockTablesRequest) - return object; - return new $root.tabletmanagerdata.LockTablesRequest(); - }; - - /** - * Creates a plain object from a LockTablesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.LockTablesRequest - * @static - * @param {tabletmanagerdata.LockTablesRequest} message LockTablesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LockTablesRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this LockTablesRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.LockTablesRequest - * @instance - * @returns {Object.} JSON object - */ - LockTablesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LockTablesRequest; - })(); - - tabletmanagerdata.LockTablesResponse = (function() { - - /** - * Properties of a LockTablesResponse. - * @memberof tabletmanagerdata - * @interface ILockTablesResponse - */ - - /** - * Constructs a new LockTablesResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a LockTablesResponse. - * @implements ILockTablesResponse - * @constructor - * @param {tabletmanagerdata.ILockTablesResponse=} [properties] Properties to set - */ - function LockTablesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new LockTablesResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {tabletmanagerdata.ILockTablesResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.LockTablesResponse} LockTablesResponse instance - */ - LockTablesResponse.create = function create(properties) { - return new LockTablesResponse(properties); - }; - - /** - * Encodes the specified LockTablesResponse message. Does not implicitly {@link tabletmanagerdata.LockTablesResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {tabletmanagerdata.ILockTablesResponse} message LockTablesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockTablesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified LockTablesResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.LockTablesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {tabletmanagerdata.ILockTablesResponse} message LockTablesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LockTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LockTablesResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.LockTablesResponse} LockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockTablesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.LockTablesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LockTablesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.LockTablesResponse} LockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LockTablesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LockTablesResponse message. - * @function verify - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LockTablesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a LockTablesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.LockTablesResponse} LockTablesResponse - */ - LockTablesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.LockTablesResponse) - return object; - return new $root.tabletmanagerdata.LockTablesResponse(); - }; - - /** - * Creates a plain object from a LockTablesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.LockTablesResponse - * @static - * @param {tabletmanagerdata.LockTablesResponse} message LockTablesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LockTablesResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this LockTablesResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.LockTablesResponse - * @instance - * @returns {Object.} JSON object - */ - LockTablesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LockTablesResponse; - })(); - - tabletmanagerdata.UnlockTablesRequest = (function() { - - /** - * Properties of an UnlockTablesRequest. - * @memberof tabletmanagerdata - * @interface IUnlockTablesRequest - */ - - /** - * Constructs a new UnlockTablesRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an UnlockTablesRequest. - * @implements IUnlockTablesRequest - * @constructor - * @param {tabletmanagerdata.IUnlockTablesRequest=} [properties] Properties to set - */ - function UnlockTablesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new UnlockTablesRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {tabletmanagerdata.IUnlockTablesRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.UnlockTablesRequest} UnlockTablesRequest instance - */ - UnlockTablesRequest.create = function create(properties) { - return new UnlockTablesRequest(properties); - }; - - /** - * Encodes the specified UnlockTablesRequest message. Does not implicitly {@link tabletmanagerdata.UnlockTablesRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {tabletmanagerdata.IUnlockTablesRequest} message UnlockTablesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnlockTablesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UnlockTablesRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.UnlockTablesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {tabletmanagerdata.IUnlockTablesRequest} message UnlockTablesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnlockTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnlockTablesRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.UnlockTablesRequest} UnlockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnlockTablesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UnlockTablesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnlockTablesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.UnlockTablesRequest} UnlockTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnlockTablesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnlockTablesRequest message. - * @function verify - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnlockTablesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UnlockTablesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.UnlockTablesRequest} UnlockTablesRequest - */ - UnlockTablesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.UnlockTablesRequest) - return object; - return new $root.tabletmanagerdata.UnlockTablesRequest(); - }; - - /** - * Creates a plain object from an UnlockTablesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.UnlockTablesRequest - * @static - * @param {tabletmanagerdata.UnlockTablesRequest} message UnlockTablesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnlockTablesRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UnlockTablesRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.UnlockTablesRequest - * @instance - * @returns {Object.} JSON object - */ - UnlockTablesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UnlockTablesRequest; - })(); - - tabletmanagerdata.UnlockTablesResponse = (function() { - - /** - * Properties of an UnlockTablesResponse. - * @memberof tabletmanagerdata - * @interface IUnlockTablesResponse - */ - - /** - * Constructs a new UnlockTablesResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an UnlockTablesResponse. - * @implements IUnlockTablesResponse - * @constructor - * @param {tabletmanagerdata.IUnlockTablesResponse=} [properties] Properties to set - */ - function UnlockTablesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new UnlockTablesResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {tabletmanagerdata.IUnlockTablesResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.UnlockTablesResponse} UnlockTablesResponse instance - */ - UnlockTablesResponse.create = function create(properties) { - return new UnlockTablesResponse(properties); - }; - - /** - * Encodes the specified UnlockTablesResponse message. Does not implicitly {@link tabletmanagerdata.UnlockTablesResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {tabletmanagerdata.IUnlockTablesResponse} message UnlockTablesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnlockTablesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UnlockTablesResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.UnlockTablesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {tabletmanagerdata.IUnlockTablesResponse} message UnlockTablesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnlockTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnlockTablesResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.UnlockTablesResponse} UnlockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnlockTablesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UnlockTablesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnlockTablesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.UnlockTablesResponse} UnlockTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnlockTablesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnlockTablesResponse message. - * @function verify - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnlockTablesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UnlockTablesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.UnlockTablesResponse} UnlockTablesResponse - */ - UnlockTablesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.UnlockTablesResponse) - return object; - return new $root.tabletmanagerdata.UnlockTablesResponse(); - }; - - /** - * Creates a plain object from an UnlockTablesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.UnlockTablesResponse - * @static - * @param {tabletmanagerdata.UnlockTablesResponse} message UnlockTablesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnlockTablesResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UnlockTablesResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.UnlockTablesResponse - * @instance - * @returns {Object.} JSON object - */ - UnlockTablesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UnlockTablesResponse; - })(); - - tabletmanagerdata.ExecuteFetchAsDbaRequest = (function() { - - /** - * Properties of an ExecuteFetchAsDbaRequest. - * @memberof tabletmanagerdata - * @interface IExecuteFetchAsDbaRequest - * @property {Uint8Array|null} [query] ExecuteFetchAsDbaRequest query - * @property {string|null} [db_name] ExecuteFetchAsDbaRequest db_name - * @property {number|Long|null} [max_rows] ExecuteFetchAsDbaRequest max_rows - * @property {boolean|null} [disable_binlogs] ExecuteFetchAsDbaRequest disable_binlogs - * @property {boolean|null} [reload_schema] ExecuteFetchAsDbaRequest reload_schema - */ - - /** - * Constructs a new ExecuteFetchAsDbaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteFetchAsDbaRequest. - * @implements IExecuteFetchAsDbaRequest - * @constructor - * @param {tabletmanagerdata.IExecuteFetchAsDbaRequest=} [properties] Properties to set - */ - function ExecuteFetchAsDbaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsDbaRequest query. - * @member {Uint8Array} query - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @instance - */ - ExecuteFetchAsDbaRequest.prototype.query = $util.newBuffer([]); - - /** - * ExecuteFetchAsDbaRequest db_name. - * @member {string} db_name - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @instance - */ - ExecuteFetchAsDbaRequest.prototype.db_name = ""; - - /** - * ExecuteFetchAsDbaRequest max_rows. - * @member {number|Long} max_rows - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @instance - */ - ExecuteFetchAsDbaRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ExecuteFetchAsDbaRequest disable_binlogs. - * @member {boolean} disable_binlogs - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @instance - */ - ExecuteFetchAsDbaRequest.prototype.disable_binlogs = false; - - /** - * ExecuteFetchAsDbaRequest reload_schema. - * @member {boolean} reload_schema - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @instance - */ - ExecuteFetchAsDbaRequest.prototype.reload_schema = false; - - /** - * Creates a new ExecuteFetchAsDbaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsDbaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteFetchAsDbaRequest} ExecuteFetchAsDbaRequest instance - */ - ExecuteFetchAsDbaRequest.create = function create(properties) { - return new ExecuteFetchAsDbaRequest(properties); - }; - - /** - * Encodes the specified ExecuteFetchAsDbaRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsDbaRequest} message ExecuteFetchAsDbaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsDbaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.query); - if (message.db_name != null && Object.hasOwnProperty.call(message, "db_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.db_name); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.max_rows); - if (message.disable_binlogs != null && Object.hasOwnProperty.call(message, "disable_binlogs")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disable_binlogs); - if (message.reload_schema != null && Object.hasOwnProperty.call(message, "reload_schema")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reload_schema); - return writer; - }; - - /** - * Encodes the specified ExecuteFetchAsDbaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsDbaRequest} message ExecuteFetchAsDbaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsDbaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteFetchAsDbaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteFetchAsDbaRequest} ExecuteFetchAsDbaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsDbaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteFetchAsDbaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.bytes(); - break; - case 2: - message.db_name = reader.string(); - break; - case 3: - message.max_rows = reader.uint64(); - break; - case 4: - message.disable_binlogs = reader.bool(); - break; - case 5: - message.reload_schema = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteFetchAsDbaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteFetchAsDbaRequest} ExecuteFetchAsDbaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsDbaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteFetchAsDbaRequest message. - * @function verify - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteFetchAsDbaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!(message.query && typeof message.query.length === "number" || $util.isString(message.query))) - return "query: buffer expected"; - if (message.db_name != null && message.hasOwnProperty("db_name")) - if (!$util.isString(message.db_name)) - return "db_name: string expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) - if (typeof message.disable_binlogs !== "boolean") - return "disable_binlogs: boolean expected"; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - if (typeof message.reload_schema !== "boolean") - return "reload_schema: boolean expected"; - return null; - }; - - /** - * Creates an ExecuteFetchAsDbaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteFetchAsDbaRequest} ExecuteFetchAsDbaRequest - */ - ExecuteFetchAsDbaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteFetchAsDbaRequest) - return object; - var message = new $root.tabletmanagerdata.ExecuteFetchAsDbaRequest(); - if (object.query != null) - if (typeof object.query === "string") - $util.base64.decode(object.query, message.query = $util.newBuffer($util.base64.length(object.query)), 0); - else if (object.query.length) - message.query = object.query; - if (object.db_name != null) - message.db_name = String(object.db_name); - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = true; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(true); - if (object.disable_binlogs != null) - message.disable_binlogs = Boolean(object.disable_binlogs); - if (object.reload_schema != null) - message.reload_schema = Boolean(object.reload_schema); - return message; - }; - - /** - * Creates a plain object from an ExecuteFetchAsDbaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @static - * @param {tabletmanagerdata.ExecuteFetchAsDbaRequest} message ExecuteFetchAsDbaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteFetchAsDbaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.query = ""; - else { - object.query = []; - if (options.bytes !== Array) - object.query = $util.newBuffer(object.query); - } - object.db_name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - object.disable_binlogs = false; - object.reload_schema = false; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = options.bytes === String ? $util.base64.encode(message.query, 0, message.query.length) : options.bytes === Array ? Array.prototype.slice.call(message.query) : message.query; - if (message.db_name != null && message.hasOwnProperty("db_name")) - object.db_name = message.db_name; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber(true) : message.max_rows; - if (message.disable_binlogs != null && message.hasOwnProperty("disable_binlogs")) - object.disable_binlogs = message.disable_binlogs; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - object.reload_schema = message.reload_schema; - return object; - }; - - /** - * Converts this ExecuteFetchAsDbaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteFetchAsDbaRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteFetchAsDbaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteFetchAsDbaRequest; - })(); - - tabletmanagerdata.ExecuteFetchAsDbaResponse = (function() { - - /** - * Properties of an ExecuteFetchAsDbaResponse. - * @memberof tabletmanagerdata - * @interface IExecuteFetchAsDbaResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsDbaResponse result - */ - - /** - * Constructs a new ExecuteFetchAsDbaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteFetchAsDbaResponse. - * @implements IExecuteFetchAsDbaResponse - * @constructor - * @param {tabletmanagerdata.IExecuteFetchAsDbaResponse=} [properties] Properties to set - */ - function ExecuteFetchAsDbaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsDbaResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @instance - */ - ExecuteFetchAsDbaResponse.prototype.result = null; - - /** - * Creates a new ExecuteFetchAsDbaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsDbaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteFetchAsDbaResponse} ExecuteFetchAsDbaResponse instance - */ - ExecuteFetchAsDbaResponse.create = function create(properties) { - return new ExecuteFetchAsDbaResponse(properties); - }; - - /** - * Encodes the specified ExecuteFetchAsDbaResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsDbaResponse} message ExecuteFetchAsDbaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsDbaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteFetchAsDbaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsDbaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsDbaResponse} message ExecuteFetchAsDbaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsDbaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteFetchAsDbaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteFetchAsDbaResponse} ExecuteFetchAsDbaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsDbaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteFetchAsDbaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteFetchAsDbaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteFetchAsDbaResponse} ExecuteFetchAsDbaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsDbaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteFetchAsDbaResponse message. - * @function verify - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteFetchAsDbaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates an ExecuteFetchAsDbaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteFetchAsDbaResponse} ExecuteFetchAsDbaResponse - */ - ExecuteFetchAsDbaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteFetchAsDbaResponse) - return object; - var message = new $root.tabletmanagerdata.ExecuteFetchAsDbaResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tabletmanagerdata.ExecuteFetchAsDbaResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteFetchAsDbaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @static - * @param {tabletmanagerdata.ExecuteFetchAsDbaResponse} message ExecuteFetchAsDbaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteFetchAsDbaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this ExecuteFetchAsDbaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteFetchAsDbaResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteFetchAsDbaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteFetchAsDbaResponse; - })(); - - tabletmanagerdata.ExecuteFetchAsAllPrivsRequest = (function() { - - /** - * Properties of an ExecuteFetchAsAllPrivsRequest. - * @memberof tabletmanagerdata - * @interface IExecuteFetchAsAllPrivsRequest - * @property {Uint8Array|null} [query] ExecuteFetchAsAllPrivsRequest query - * @property {string|null} [db_name] ExecuteFetchAsAllPrivsRequest db_name - * @property {number|Long|null} [max_rows] ExecuteFetchAsAllPrivsRequest max_rows - * @property {boolean|null} [reload_schema] ExecuteFetchAsAllPrivsRequest reload_schema - */ - - /** - * Constructs a new ExecuteFetchAsAllPrivsRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteFetchAsAllPrivsRequest. - * @implements IExecuteFetchAsAllPrivsRequest - * @constructor - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsRequest=} [properties] Properties to set - */ - function ExecuteFetchAsAllPrivsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsAllPrivsRequest query. - * @member {Uint8Array} query - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @instance - */ - ExecuteFetchAsAllPrivsRequest.prototype.query = $util.newBuffer([]); - - /** - * ExecuteFetchAsAllPrivsRequest db_name. - * @member {string} db_name - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @instance - */ - ExecuteFetchAsAllPrivsRequest.prototype.db_name = ""; - - /** - * ExecuteFetchAsAllPrivsRequest max_rows. - * @member {number|Long} max_rows - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @instance - */ - ExecuteFetchAsAllPrivsRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ExecuteFetchAsAllPrivsRequest reload_schema. - * @member {boolean} reload_schema - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @instance - */ - ExecuteFetchAsAllPrivsRequest.prototype.reload_schema = false; - - /** - * Creates a new ExecuteFetchAsAllPrivsRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsRequest} ExecuteFetchAsAllPrivsRequest instance - */ - ExecuteFetchAsAllPrivsRequest.create = function create(properties) { - return new ExecuteFetchAsAllPrivsRequest(properties); - }; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsRequest} message ExecuteFetchAsAllPrivsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAllPrivsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.query); - if (message.db_name != null && Object.hasOwnProperty.call(message, "db_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.db_name); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.max_rows); - if (message.reload_schema != null && Object.hasOwnProperty.call(message, "reload_schema")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.reload_schema); - return writer; - }; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsRequest} message ExecuteFetchAsAllPrivsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAllPrivsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteFetchAsAllPrivsRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsRequest} ExecuteFetchAsAllPrivsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAllPrivsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteFetchAsAllPrivsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.bytes(); - break; - case 2: - message.db_name = reader.string(); - break; - case 3: - message.max_rows = reader.uint64(); - break; - case 4: - message.reload_schema = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteFetchAsAllPrivsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsRequest} ExecuteFetchAsAllPrivsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAllPrivsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteFetchAsAllPrivsRequest message. - * @function verify - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteFetchAsAllPrivsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!(message.query && typeof message.query.length === "number" || $util.isString(message.query))) - return "query: buffer expected"; - if (message.db_name != null && message.hasOwnProperty("db_name")) - if (!$util.isString(message.db_name)) - return "db_name: string expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - if (typeof message.reload_schema !== "boolean") - return "reload_schema: boolean expected"; - return null; - }; - - /** - * Creates an ExecuteFetchAsAllPrivsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsRequest} ExecuteFetchAsAllPrivsRequest - */ - ExecuteFetchAsAllPrivsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteFetchAsAllPrivsRequest) - return object; - var message = new $root.tabletmanagerdata.ExecuteFetchAsAllPrivsRequest(); - if (object.query != null) - if (typeof object.query === "string") - $util.base64.decode(object.query, message.query = $util.newBuffer($util.base64.length(object.query)), 0); - else if (object.query.length) - message.query = object.query; - if (object.db_name != null) - message.db_name = String(object.db_name); - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = true; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(true); - if (object.reload_schema != null) - message.reload_schema = Boolean(object.reload_schema); - return message; - }; - - /** - * Creates a plain object from an ExecuteFetchAsAllPrivsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @static - * @param {tabletmanagerdata.ExecuteFetchAsAllPrivsRequest} message ExecuteFetchAsAllPrivsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteFetchAsAllPrivsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.query = ""; - else { - object.query = []; - if (options.bytes !== Array) - object.query = $util.newBuffer(object.query); - } - object.db_name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - object.reload_schema = false; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = options.bytes === String ? $util.base64.encode(message.query, 0, message.query.length) : options.bytes === Array ? Array.prototype.slice.call(message.query) : message.query; - if (message.db_name != null && message.hasOwnProperty("db_name")) - object.db_name = message.db_name; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber(true) : message.max_rows; - if (message.reload_schema != null && message.hasOwnProperty("reload_schema")) - object.reload_schema = message.reload_schema; - return object; - }; - - /** - * Converts this ExecuteFetchAsAllPrivsRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteFetchAsAllPrivsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteFetchAsAllPrivsRequest; - })(); - - tabletmanagerdata.ExecuteFetchAsAllPrivsResponse = (function() { - - /** - * Properties of an ExecuteFetchAsAllPrivsResponse. - * @memberof tabletmanagerdata - * @interface IExecuteFetchAsAllPrivsResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsAllPrivsResponse result - */ - - /** - * Constructs a new ExecuteFetchAsAllPrivsResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteFetchAsAllPrivsResponse. - * @implements IExecuteFetchAsAllPrivsResponse - * @constructor - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsResponse=} [properties] Properties to set - */ - function ExecuteFetchAsAllPrivsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsAllPrivsResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @instance - */ - ExecuteFetchAsAllPrivsResponse.prototype.result = null; - - /** - * Creates a new ExecuteFetchAsAllPrivsResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsResponse} ExecuteFetchAsAllPrivsResponse instance - */ - ExecuteFetchAsAllPrivsResponse.create = function create(properties) { - return new ExecuteFetchAsAllPrivsResponse(properties); - }; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsResponse} message ExecuteFetchAsAllPrivsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAllPrivsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteFetchAsAllPrivsResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAllPrivsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAllPrivsResponse} message ExecuteFetchAsAllPrivsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAllPrivsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteFetchAsAllPrivsResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsResponse} ExecuteFetchAsAllPrivsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAllPrivsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteFetchAsAllPrivsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteFetchAsAllPrivsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsResponse} ExecuteFetchAsAllPrivsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAllPrivsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteFetchAsAllPrivsResponse message. - * @function verify - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteFetchAsAllPrivsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates an ExecuteFetchAsAllPrivsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteFetchAsAllPrivsResponse} ExecuteFetchAsAllPrivsResponse - */ - ExecuteFetchAsAllPrivsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteFetchAsAllPrivsResponse) - return object; - var message = new $root.tabletmanagerdata.ExecuteFetchAsAllPrivsResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tabletmanagerdata.ExecuteFetchAsAllPrivsResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteFetchAsAllPrivsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @static - * @param {tabletmanagerdata.ExecuteFetchAsAllPrivsResponse} message ExecuteFetchAsAllPrivsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteFetchAsAllPrivsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this ExecuteFetchAsAllPrivsResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteFetchAsAllPrivsResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteFetchAsAllPrivsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteFetchAsAllPrivsResponse; - })(); - - tabletmanagerdata.ExecuteFetchAsAppRequest = (function() { - - /** - * Properties of an ExecuteFetchAsAppRequest. - * @memberof tabletmanagerdata - * @interface IExecuteFetchAsAppRequest - * @property {Uint8Array|null} [query] ExecuteFetchAsAppRequest query - * @property {number|Long|null} [max_rows] ExecuteFetchAsAppRequest max_rows - */ - - /** - * Constructs a new ExecuteFetchAsAppRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteFetchAsAppRequest. - * @implements IExecuteFetchAsAppRequest - * @constructor - * @param {tabletmanagerdata.IExecuteFetchAsAppRequest=} [properties] Properties to set - */ - function ExecuteFetchAsAppRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsAppRequest query. - * @member {Uint8Array} query - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.query = $util.newBuffer([]); - - /** - * ExecuteFetchAsAppRequest max_rows. - * @member {number|Long} max_rows - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @instance - */ - ExecuteFetchAsAppRequest.prototype.max_rows = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new ExecuteFetchAsAppRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAppRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest instance - */ - ExecuteFetchAsAppRequest.create = function create(properties) { - return new ExecuteFetchAsAppRequest(properties); - }; - - /** - * Encodes the specified ExecuteFetchAsAppRequest message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAppRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.query); - if (message.max_rows != null && Object.hasOwnProperty.call(message, "max_rows")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.max_rows); - return writer; - }; - - /** - * Encodes the specified ExecuteFetchAsAppRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAppRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAppRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteFetchAsAppRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.bytes(); - break; - case 2: - message.max_rows = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteFetchAsAppRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAppRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteFetchAsAppRequest message. - * @function verify - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteFetchAsAppRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!(message.query && typeof message.query.length === "number" || $util.isString(message.query))) - return "query: buffer expected"; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (!$util.isInteger(message.max_rows) && !(message.max_rows && $util.isInteger(message.max_rows.low) && $util.isInteger(message.max_rows.high))) - return "max_rows: integer|Long expected"; - return null; - }; - - /** - * Creates an ExecuteFetchAsAppRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteFetchAsAppRequest} ExecuteFetchAsAppRequest - */ - ExecuteFetchAsAppRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteFetchAsAppRequest) - return object; - var message = new $root.tabletmanagerdata.ExecuteFetchAsAppRequest(); - if (object.query != null) - if (typeof object.query === "string") - $util.base64.decode(object.query, message.query = $util.newBuffer($util.base64.length(object.query)), 0); - else if (object.query.length) - message.query = object.query; - if (object.max_rows != null) - if ($util.Long) - (message.max_rows = $util.Long.fromValue(object.max_rows)).unsigned = true; - else if (typeof object.max_rows === "string") - message.max_rows = parseInt(object.max_rows, 10); - else if (typeof object.max_rows === "number") - message.max_rows = object.max_rows; - else if (typeof object.max_rows === "object") - message.max_rows = new $util.LongBits(object.max_rows.low >>> 0, object.max_rows.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an ExecuteFetchAsAppRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @static - * @param {tabletmanagerdata.ExecuteFetchAsAppRequest} message ExecuteFetchAsAppRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteFetchAsAppRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.query = ""; - else { - object.query = []; - if (options.bytes !== Array) - object.query = $util.newBuffer(object.query); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.max_rows = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_rows = options.longs === String ? "0" : 0; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = options.bytes === String ? $util.base64.encode(message.query, 0, message.query.length) : options.bytes === Array ? Array.prototype.slice.call(message.query) : message.query; - if (message.max_rows != null && message.hasOwnProperty("max_rows")) - if (typeof message.max_rows === "number") - object.max_rows = options.longs === String ? String(message.max_rows) : message.max_rows; - else - object.max_rows = options.longs === String ? $util.Long.prototype.toString.call(message.max_rows) : options.longs === Number ? new $util.LongBits(message.max_rows.low >>> 0, message.max_rows.high >>> 0).toNumber(true) : message.max_rows; - return object; - }; - - /** - * Converts this ExecuteFetchAsAppRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteFetchAsAppRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteFetchAsAppRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteFetchAsAppRequest; - })(); - - tabletmanagerdata.ExecuteFetchAsAppResponse = (function() { - - /** - * Properties of an ExecuteFetchAsAppResponse. - * @memberof tabletmanagerdata - * @interface IExecuteFetchAsAppResponse - * @property {query.IQueryResult|null} [result] ExecuteFetchAsAppResponse result - */ - - /** - * Constructs a new ExecuteFetchAsAppResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an ExecuteFetchAsAppResponse. - * @implements IExecuteFetchAsAppResponse - * @constructor - * @param {tabletmanagerdata.IExecuteFetchAsAppResponse=} [properties] Properties to set - */ - function ExecuteFetchAsAppResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteFetchAsAppResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @instance - */ - ExecuteFetchAsAppResponse.prototype.result = null; - - /** - * Creates a new ExecuteFetchAsAppResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAppResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse instance - */ - ExecuteFetchAsAppResponse.create = function create(properties) { - return new ExecuteFetchAsAppResponse(properties); - }; - - /** - * Encodes the specified ExecuteFetchAsAppResponse message. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAppResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteFetchAsAppResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ExecuteFetchAsAppResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {tabletmanagerdata.IExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteFetchAsAppResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAppResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ExecuteFetchAsAppResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteFetchAsAppResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteFetchAsAppResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteFetchAsAppResponse message. - * @function verify - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteFetchAsAppResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates an ExecuteFetchAsAppResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ExecuteFetchAsAppResponse} ExecuteFetchAsAppResponse - */ - ExecuteFetchAsAppResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ExecuteFetchAsAppResponse) - return object; - var message = new $root.tabletmanagerdata.ExecuteFetchAsAppResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tabletmanagerdata.ExecuteFetchAsAppResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteFetchAsAppResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @static - * @param {tabletmanagerdata.ExecuteFetchAsAppResponse} message ExecuteFetchAsAppResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteFetchAsAppResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this ExecuteFetchAsAppResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ExecuteFetchAsAppResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteFetchAsAppResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteFetchAsAppResponse; - })(); - - tabletmanagerdata.ReplicationStatusRequest = (function() { - - /** - * Properties of a ReplicationStatusRequest. - * @memberof tabletmanagerdata - * @interface IReplicationStatusRequest - */ - - /** - * Constructs a new ReplicationStatusRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a ReplicationStatusRequest. - * @implements IReplicationStatusRequest - * @constructor - * @param {tabletmanagerdata.IReplicationStatusRequest=} [properties] Properties to set - */ - function ReplicationStatusRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReplicationStatusRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {tabletmanagerdata.IReplicationStatusRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ReplicationStatusRequest} ReplicationStatusRequest instance - */ - ReplicationStatusRequest.create = function create(properties) { - return new ReplicationStatusRequest(properties); - }; - - /** - * Encodes the specified ReplicationStatusRequest message. Does not implicitly {@link tabletmanagerdata.ReplicationStatusRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {tabletmanagerdata.IReplicationStatusRequest} message ReplicationStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReplicationStatusRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicationStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {tabletmanagerdata.IReplicationStatusRequest} message ReplicationStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicationStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReplicationStatusRequest} ReplicationStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationStatusRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReplicationStatusRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicationStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReplicationStatusRequest} ReplicationStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicationStatusRequest message. - * @function verify - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicationStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReplicationStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReplicationStatusRequest} ReplicationStatusRequest - */ - ReplicationStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReplicationStatusRequest) - return object; - return new $root.tabletmanagerdata.ReplicationStatusRequest(); - }; - - /** - * Creates a plain object from a ReplicationStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @static - * @param {tabletmanagerdata.ReplicationStatusRequest} message ReplicationStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicationStatusRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReplicationStatusRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReplicationStatusRequest - * @instance - * @returns {Object.} JSON object - */ - ReplicationStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicationStatusRequest; - })(); - - tabletmanagerdata.ReplicationStatusResponse = (function() { - - /** - * Properties of a ReplicationStatusResponse. - * @memberof tabletmanagerdata - * @interface IReplicationStatusResponse - * @property {replicationdata.IStatus|null} [status] ReplicationStatusResponse status - */ - - /** - * Constructs a new ReplicationStatusResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a ReplicationStatusResponse. - * @implements IReplicationStatusResponse - * @constructor - * @param {tabletmanagerdata.IReplicationStatusResponse=} [properties] Properties to set - */ - function ReplicationStatusResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReplicationStatusResponse status. - * @member {replicationdata.IStatus|null|undefined} status - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @instance - */ - ReplicationStatusResponse.prototype.status = null; - - /** - * Creates a new ReplicationStatusResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {tabletmanagerdata.IReplicationStatusResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ReplicationStatusResponse} ReplicationStatusResponse instance - */ - ReplicationStatusResponse.create = function create(properties) { - return new ReplicationStatusResponse(properties); - }; - - /** - * Encodes the specified ReplicationStatusResponse message. Does not implicitly {@link tabletmanagerdata.ReplicationStatusResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {tabletmanagerdata.IReplicationStatusResponse} message ReplicationStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.replicationdata.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReplicationStatusResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicationStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {tabletmanagerdata.IReplicationStatusResponse} message ReplicationStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicationStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReplicationStatusResponse} ReplicationStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationStatusResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReplicationStatusResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicationStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReplicationStatusResponse} ReplicationStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicationStatusResponse message. - * @function verify - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicationStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.replicationdata.Status.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a ReplicationStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReplicationStatusResponse} ReplicationStatusResponse - */ - ReplicationStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReplicationStatusResponse) - return object; - var message = new $root.tabletmanagerdata.ReplicationStatusResponse(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".tabletmanagerdata.ReplicationStatusResponse.status: object expected"); - message.status = $root.replicationdata.Status.fromObject(object.status); - } - return message; - }; - - /** - * Creates a plain object from a ReplicationStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @static - * @param {tabletmanagerdata.ReplicationStatusResponse} message ReplicationStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicationStatusResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.replicationdata.Status.toObject(message.status, options); - return object; - }; - - /** - * Converts this ReplicationStatusResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReplicationStatusResponse - * @instance - * @returns {Object.} JSON object - */ - ReplicationStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicationStatusResponse; - })(); - - tabletmanagerdata.MasterStatusRequest = (function() { - - /** - * Properties of a MasterStatusRequest. - * @memberof tabletmanagerdata - * @interface IMasterStatusRequest - */ - - /** - * Constructs a new MasterStatusRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a MasterStatusRequest. - * @implements IMasterStatusRequest - * @constructor - * @param {tabletmanagerdata.IMasterStatusRequest=} [properties] Properties to set - */ - function MasterStatusRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new MasterStatusRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {tabletmanagerdata.IMasterStatusRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.MasterStatusRequest} MasterStatusRequest instance - */ - MasterStatusRequest.create = function create(properties) { - return new MasterStatusRequest(properties); - }; - - /** - * Encodes the specified MasterStatusRequest message. Does not implicitly {@link tabletmanagerdata.MasterStatusRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {tabletmanagerdata.IMasterStatusRequest} message MasterStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MasterStatusRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {tabletmanagerdata.IMasterStatusRequest} message MasterStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.MasterStatusRequest} MasterStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterStatusRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.MasterStatusRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.MasterStatusRequest} MasterStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterStatusRequest message. - * @function verify - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MasterStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.MasterStatusRequest} MasterStatusRequest - */ - MasterStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.MasterStatusRequest) - return object; - return new $root.tabletmanagerdata.MasterStatusRequest(); - }; - - /** - * Creates a plain object from a MasterStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.MasterStatusRequest - * @static - * @param {tabletmanagerdata.MasterStatusRequest} message MasterStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterStatusRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MasterStatusRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.MasterStatusRequest - * @instance - * @returns {Object.} JSON object - */ - MasterStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MasterStatusRequest; - })(); - - tabletmanagerdata.MasterStatusResponse = (function() { - - /** - * Properties of a MasterStatusResponse. - * @memberof tabletmanagerdata - * @interface IMasterStatusResponse - * @property {replicationdata.IMasterStatus|null} [status] MasterStatusResponse status - */ - - /** - * Constructs a new MasterStatusResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a MasterStatusResponse. - * @implements IMasterStatusResponse - * @constructor - * @param {tabletmanagerdata.IMasterStatusResponse=} [properties] Properties to set - */ - function MasterStatusResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterStatusResponse status. - * @member {replicationdata.IMasterStatus|null|undefined} status - * @memberof tabletmanagerdata.MasterStatusResponse - * @instance - */ - MasterStatusResponse.prototype.status = null; - - /** - * Creates a new MasterStatusResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {tabletmanagerdata.IMasterStatusResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.MasterStatusResponse} MasterStatusResponse instance - */ - MasterStatusResponse.create = function create(properties) { - return new MasterStatusResponse(properties); - }; - - /** - * Encodes the specified MasterStatusResponse message. Does not implicitly {@link tabletmanagerdata.MasterStatusResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {tabletmanagerdata.IMasterStatusResponse} message MasterStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.replicationdata.MasterStatus.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MasterStatusResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {tabletmanagerdata.IMasterStatusResponse} message MasterStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.MasterStatusResponse} MasterStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterStatusResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.MasterStatusResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = $root.replicationdata.MasterStatus.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.MasterStatusResponse} MasterStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterStatusResponse message. - * @function verify - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.replicationdata.MasterStatus.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a MasterStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.MasterStatusResponse} MasterStatusResponse - */ - MasterStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.MasterStatusResponse) - return object; - var message = new $root.tabletmanagerdata.MasterStatusResponse(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".tabletmanagerdata.MasterStatusResponse.status: object expected"); - message.status = $root.replicationdata.MasterStatus.fromObject(object.status); - } - return message; - }; - - /** - * Creates a plain object from a MasterStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.MasterStatusResponse - * @static - * @param {tabletmanagerdata.MasterStatusResponse} message MasterStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterStatusResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.status = null; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.replicationdata.MasterStatus.toObject(message.status, options); - return object; - }; - - /** - * Converts this MasterStatusResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.MasterStatusResponse - * @instance - * @returns {Object.} JSON object - */ - MasterStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MasterStatusResponse; - })(); - - tabletmanagerdata.MasterPositionRequest = (function() { - - /** - * Properties of a MasterPositionRequest. - * @memberof tabletmanagerdata - * @interface IMasterPositionRequest - */ - - /** - * Constructs a new MasterPositionRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a MasterPositionRequest. - * @implements IMasterPositionRequest - * @constructor - * @param {tabletmanagerdata.IMasterPositionRequest=} [properties] Properties to set - */ - function MasterPositionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new MasterPositionRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {tabletmanagerdata.IMasterPositionRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.MasterPositionRequest} MasterPositionRequest instance - */ - MasterPositionRequest.create = function create(properties) { - return new MasterPositionRequest(properties); - }; - - /** - * Encodes the specified MasterPositionRequest message. Does not implicitly {@link tabletmanagerdata.MasterPositionRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {tabletmanagerdata.IMasterPositionRequest} message MasterPositionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterPositionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MasterPositionRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterPositionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {tabletmanagerdata.IMasterPositionRequest} message MasterPositionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterPositionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterPositionRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.MasterPositionRequest} MasterPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterPositionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.MasterPositionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterPositionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.MasterPositionRequest} MasterPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterPositionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterPositionRequest message. - * @function verify - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterPositionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MasterPositionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.MasterPositionRequest} MasterPositionRequest - */ - MasterPositionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.MasterPositionRequest) - return object; - return new $root.tabletmanagerdata.MasterPositionRequest(); - }; - - /** - * Creates a plain object from a MasterPositionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.MasterPositionRequest - * @static - * @param {tabletmanagerdata.MasterPositionRequest} message MasterPositionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterPositionRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MasterPositionRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.MasterPositionRequest - * @instance - * @returns {Object.} JSON object - */ - MasterPositionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MasterPositionRequest; - })(); - - tabletmanagerdata.MasterPositionResponse = (function() { - - /** - * Properties of a MasterPositionResponse. - * @memberof tabletmanagerdata - * @interface IMasterPositionResponse - * @property {string|null} [position] MasterPositionResponse position - */ - - /** - * Constructs a new MasterPositionResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a MasterPositionResponse. - * @implements IMasterPositionResponse - * @constructor - * @param {tabletmanagerdata.IMasterPositionResponse=} [properties] Properties to set - */ - function MasterPositionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterPositionResponse position. - * @member {string} position - * @memberof tabletmanagerdata.MasterPositionResponse - * @instance - */ - MasterPositionResponse.prototype.position = ""; - - /** - * Creates a new MasterPositionResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {tabletmanagerdata.IMasterPositionResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.MasterPositionResponse} MasterPositionResponse instance - */ - MasterPositionResponse.create = function create(properties) { - return new MasterPositionResponse(properties); - }; - - /** - * Encodes the specified MasterPositionResponse message. Does not implicitly {@link tabletmanagerdata.MasterPositionResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {tabletmanagerdata.IMasterPositionResponse} message MasterPositionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterPositionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - return writer; - }; - - /** - * Encodes the specified MasterPositionResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.MasterPositionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {tabletmanagerdata.IMasterPositionResponse} message MasterPositionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterPositionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterPositionResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.MasterPositionResponse} MasterPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterPositionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.MasterPositionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterPositionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.MasterPositionResponse} MasterPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterPositionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterPositionResponse message. - * @function verify - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterPositionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates a MasterPositionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.MasterPositionResponse} MasterPositionResponse - */ - MasterPositionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.MasterPositionResponse) - return object; - var message = new $root.tabletmanagerdata.MasterPositionResponse(); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from a MasterPositionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.MasterPositionResponse - * @static - * @param {tabletmanagerdata.MasterPositionResponse} message MasterPositionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterPositionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.position = ""; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this MasterPositionResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.MasterPositionResponse - * @instance - * @returns {Object.} JSON object - */ - MasterPositionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MasterPositionResponse; - })(); - - tabletmanagerdata.WaitForPositionRequest = (function() { - - /** - * Properties of a WaitForPositionRequest. - * @memberof tabletmanagerdata - * @interface IWaitForPositionRequest - * @property {string|null} [position] WaitForPositionRequest position - */ - - /** - * Constructs a new WaitForPositionRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a WaitForPositionRequest. - * @implements IWaitForPositionRequest - * @constructor - * @param {tabletmanagerdata.IWaitForPositionRequest=} [properties] Properties to set - */ - function WaitForPositionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitForPositionRequest position. - * @member {string} position - * @memberof tabletmanagerdata.WaitForPositionRequest - * @instance - */ - WaitForPositionRequest.prototype.position = ""; - - /** - * Creates a new WaitForPositionRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {tabletmanagerdata.IWaitForPositionRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.WaitForPositionRequest} WaitForPositionRequest instance - */ - WaitForPositionRequest.create = function create(properties) { - return new WaitForPositionRequest(properties); - }; - - /** - * Encodes the specified WaitForPositionRequest message. Does not implicitly {@link tabletmanagerdata.WaitForPositionRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {tabletmanagerdata.IWaitForPositionRequest} message WaitForPositionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitForPositionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - return writer; - }; - - /** - * Encodes the specified WaitForPositionRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.WaitForPositionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {tabletmanagerdata.IWaitForPositionRequest} message WaitForPositionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitForPositionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitForPositionRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.WaitForPositionRequest} WaitForPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitForPositionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.WaitForPositionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitForPositionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.WaitForPositionRequest} WaitForPositionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitForPositionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitForPositionRequest message. - * @function verify - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitForPositionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates a WaitForPositionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.WaitForPositionRequest} WaitForPositionRequest - */ - WaitForPositionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.WaitForPositionRequest) - return object; - var message = new $root.tabletmanagerdata.WaitForPositionRequest(); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from a WaitForPositionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.WaitForPositionRequest - * @static - * @param {tabletmanagerdata.WaitForPositionRequest} message WaitForPositionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitForPositionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.position = ""; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this WaitForPositionRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.WaitForPositionRequest - * @instance - * @returns {Object.} JSON object - */ - WaitForPositionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WaitForPositionRequest; - })(); - - tabletmanagerdata.WaitForPositionResponse = (function() { - - /** - * Properties of a WaitForPositionResponse. - * @memberof tabletmanagerdata - * @interface IWaitForPositionResponse - */ - - /** - * Constructs a new WaitForPositionResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a WaitForPositionResponse. - * @implements IWaitForPositionResponse - * @constructor - * @param {tabletmanagerdata.IWaitForPositionResponse=} [properties] Properties to set - */ - function WaitForPositionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new WaitForPositionResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {tabletmanagerdata.IWaitForPositionResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.WaitForPositionResponse} WaitForPositionResponse instance - */ - WaitForPositionResponse.create = function create(properties) { - return new WaitForPositionResponse(properties); - }; - - /** - * Encodes the specified WaitForPositionResponse message. Does not implicitly {@link tabletmanagerdata.WaitForPositionResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {tabletmanagerdata.IWaitForPositionResponse} message WaitForPositionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitForPositionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified WaitForPositionResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.WaitForPositionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {tabletmanagerdata.IWaitForPositionResponse} message WaitForPositionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitForPositionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitForPositionResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.WaitForPositionResponse} WaitForPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitForPositionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.WaitForPositionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitForPositionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.WaitForPositionResponse} WaitForPositionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitForPositionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitForPositionResponse message. - * @function verify - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitForPositionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a WaitForPositionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.WaitForPositionResponse} WaitForPositionResponse - */ - WaitForPositionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.WaitForPositionResponse) - return object; - return new $root.tabletmanagerdata.WaitForPositionResponse(); - }; - - /** - * Creates a plain object from a WaitForPositionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.WaitForPositionResponse - * @static - * @param {tabletmanagerdata.WaitForPositionResponse} message WaitForPositionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WaitForPositionResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this WaitForPositionResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.WaitForPositionResponse - * @instance - * @returns {Object.} JSON object - */ - WaitForPositionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WaitForPositionResponse; - })(); - - tabletmanagerdata.StopReplicationRequest = (function() { - - /** - * Properties of a StopReplicationRequest. - * @memberof tabletmanagerdata - * @interface IStopReplicationRequest - */ - - /** - * Constructs a new StopReplicationRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a StopReplicationRequest. - * @implements IStopReplicationRequest - * @constructor - * @param {tabletmanagerdata.IStopReplicationRequest=} [properties] Properties to set - */ - function StopReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StopReplicationRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {tabletmanagerdata.IStopReplicationRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.StopReplicationRequest} StopReplicationRequest instance - */ - StopReplicationRequest.create = function create(properties) { - return new StopReplicationRequest(properties); - }; - - /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link tabletmanagerdata.StopReplicationRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {tabletmanagerdata.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {tabletmanagerdata.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StopReplicationRequest} StopReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StopReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StopReplicationRequest} StopReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationRequest message. - * @function verify - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StopReplicationRequest} StopReplicationRequest - */ - StopReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StopReplicationRequest) - return object; - return new $root.tabletmanagerdata.StopReplicationRequest(); - }; - - /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StopReplicationRequest - * @static - * @param {tabletmanagerdata.StopReplicationRequest} message StopReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StopReplicationRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StopReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - StopReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationRequest; - })(); - - tabletmanagerdata.StopReplicationResponse = (function() { - - /** - * Properties of a StopReplicationResponse. - * @memberof tabletmanagerdata - * @interface IStopReplicationResponse - */ - - /** - * Constructs a new StopReplicationResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a StopReplicationResponse. - * @implements IStopReplicationResponse - * @constructor - * @param {tabletmanagerdata.IStopReplicationResponse=} [properties] Properties to set - */ - function StopReplicationResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StopReplicationResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {tabletmanagerdata.IStopReplicationResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.StopReplicationResponse} StopReplicationResponse instance - */ - StopReplicationResponse.create = function create(properties) { - return new StopReplicationResponse(properties); - }; - - /** - * Encodes the specified StopReplicationResponse message. Does not implicitly {@link tabletmanagerdata.StopReplicationResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {tabletmanagerdata.IStopReplicationResponse} message StopReplicationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StopReplicationResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {tabletmanagerdata.IStopReplicationResponse} message StopReplicationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StopReplicationResponse} StopReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StopReplicationResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StopReplicationResponse} StopReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationResponse message. - * @function verify - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StopReplicationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StopReplicationResponse} StopReplicationResponse - */ - StopReplicationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StopReplicationResponse) - return object; - return new $root.tabletmanagerdata.StopReplicationResponse(); - }; - - /** - * Creates a plain object from a StopReplicationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StopReplicationResponse - * @static - * @param {tabletmanagerdata.StopReplicationResponse} message StopReplicationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StopReplicationResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StopReplicationResponse - * @instance - * @returns {Object.} JSON object - */ - StopReplicationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationResponse; - })(); - - tabletmanagerdata.StopReplicationMinimumRequest = (function() { - - /** - * Properties of a StopReplicationMinimumRequest. - * @memberof tabletmanagerdata - * @interface IStopReplicationMinimumRequest - * @property {string|null} [position] StopReplicationMinimumRequest position - * @property {number|Long|null} [wait_timeout] StopReplicationMinimumRequest wait_timeout - */ - - /** - * Constructs a new StopReplicationMinimumRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a StopReplicationMinimumRequest. - * @implements IStopReplicationMinimumRequest - * @constructor - * @param {tabletmanagerdata.IStopReplicationMinimumRequest=} [properties] Properties to set - */ - function StopReplicationMinimumRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopReplicationMinimumRequest position. - * @member {string} position - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @instance - */ - StopReplicationMinimumRequest.prototype.position = ""; - - /** - * StopReplicationMinimumRequest wait_timeout. - * @member {number|Long} wait_timeout - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @instance - */ - StopReplicationMinimumRequest.prototype.wait_timeout = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new StopReplicationMinimumRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {tabletmanagerdata.IStopReplicationMinimumRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.StopReplicationMinimumRequest} StopReplicationMinimumRequest instance - */ - StopReplicationMinimumRequest.create = function create(properties) { - return new StopReplicationMinimumRequest(properties); - }; - - /** - * Encodes the specified StopReplicationMinimumRequest message. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {tabletmanagerdata.IStopReplicationMinimumRequest} message StopReplicationMinimumRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationMinimumRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.wait_timeout != null && Object.hasOwnProperty.call(message, "wait_timeout")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.wait_timeout); - return writer; - }; - - /** - * Encodes the specified StopReplicationMinimumRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {tabletmanagerdata.IStopReplicationMinimumRequest} message StopReplicationMinimumRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationMinimumRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationMinimumRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StopReplicationMinimumRequest} StopReplicationMinimumRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationMinimumRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StopReplicationMinimumRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - case 2: - message.wait_timeout = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationMinimumRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StopReplicationMinimumRequest} StopReplicationMinimumRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationMinimumRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationMinimumRequest message. - * @function verify - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationMinimumRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.wait_timeout != null && message.hasOwnProperty("wait_timeout")) - if (!$util.isInteger(message.wait_timeout) && !(message.wait_timeout && $util.isInteger(message.wait_timeout.low) && $util.isInteger(message.wait_timeout.high))) - return "wait_timeout: integer|Long expected"; - return null; - }; - - /** - * Creates a StopReplicationMinimumRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StopReplicationMinimumRequest} StopReplicationMinimumRequest - */ - StopReplicationMinimumRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StopReplicationMinimumRequest) - return object; - var message = new $root.tabletmanagerdata.StopReplicationMinimumRequest(); - if (object.position != null) - message.position = String(object.position); - if (object.wait_timeout != null) - if ($util.Long) - (message.wait_timeout = $util.Long.fromValue(object.wait_timeout)).unsigned = false; - else if (typeof object.wait_timeout === "string") - message.wait_timeout = parseInt(object.wait_timeout, 10); - else if (typeof object.wait_timeout === "number") - message.wait_timeout = object.wait_timeout; - else if (typeof object.wait_timeout === "object") - message.wait_timeout = new $util.LongBits(object.wait_timeout.low >>> 0, object.wait_timeout.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a StopReplicationMinimumRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @static - * @param {tabletmanagerdata.StopReplicationMinimumRequest} message StopReplicationMinimumRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationMinimumRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.position = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.wait_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.wait_timeout = options.longs === String ? "0" : 0; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.wait_timeout != null && message.hasOwnProperty("wait_timeout")) - if (typeof message.wait_timeout === "number") - object.wait_timeout = options.longs === String ? String(message.wait_timeout) : message.wait_timeout; - else - object.wait_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.wait_timeout) : options.longs === Number ? new $util.LongBits(message.wait_timeout.low >>> 0, message.wait_timeout.high >>> 0).toNumber() : message.wait_timeout; - return object; - }; - - /** - * Converts this StopReplicationMinimumRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StopReplicationMinimumRequest - * @instance - * @returns {Object.} JSON object - */ - StopReplicationMinimumRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationMinimumRequest; - })(); - - tabletmanagerdata.StopReplicationMinimumResponse = (function() { - - /** - * Properties of a StopReplicationMinimumResponse. - * @memberof tabletmanagerdata - * @interface IStopReplicationMinimumResponse - * @property {string|null} [position] StopReplicationMinimumResponse position - */ - - /** - * Constructs a new StopReplicationMinimumResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a StopReplicationMinimumResponse. - * @implements IStopReplicationMinimumResponse - * @constructor - * @param {tabletmanagerdata.IStopReplicationMinimumResponse=} [properties] Properties to set - */ - function StopReplicationMinimumResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopReplicationMinimumResponse position. - * @member {string} position - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @instance - */ - StopReplicationMinimumResponse.prototype.position = ""; - - /** - * Creates a new StopReplicationMinimumResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {tabletmanagerdata.IStopReplicationMinimumResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.StopReplicationMinimumResponse} StopReplicationMinimumResponse instance - */ - StopReplicationMinimumResponse.create = function create(properties) { - return new StopReplicationMinimumResponse(properties); - }; - - /** - * Encodes the specified StopReplicationMinimumResponse message. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {tabletmanagerdata.IStopReplicationMinimumResponse} message StopReplicationMinimumResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationMinimumResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - return writer; - }; - - /** - * Encodes the specified StopReplicationMinimumResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationMinimumResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {tabletmanagerdata.IStopReplicationMinimumResponse} message StopReplicationMinimumResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationMinimumResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationMinimumResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StopReplicationMinimumResponse} StopReplicationMinimumResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationMinimumResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StopReplicationMinimumResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationMinimumResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StopReplicationMinimumResponse} StopReplicationMinimumResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationMinimumResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationMinimumResponse message. - * @function verify - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationMinimumResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates a StopReplicationMinimumResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StopReplicationMinimumResponse} StopReplicationMinimumResponse - */ - StopReplicationMinimumResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StopReplicationMinimumResponse) - return object; - var message = new $root.tabletmanagerdata.StopReplicationMinimumResponse(); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from a StopReplicationMinimumResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @static - * @param {tabletmanagerdata.StopReplicationMinimumResponse} message StopReplicationMinimumResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationMinimumResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.position = ""; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this StopReplicationMinimumResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StopReplicationMinimumResponse - * @instance - * @returns {Object.} JSON object - */ - StopReplicationMinimumResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationMinimumResponse; - })(); - - tabletmanagerdata.StartReplicationRequest = (function() { - - /** - * Properties of a StartReplicationRequest. - * @memberof tabletmanagerdata - * @interface IStartReplicationRequest - */ - - /** - * Constructs a new StartReplicationRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a StartReplicationRequest. - * @implements IStartReplicationRequest - * @constructor - * @param {tabletmanagerdata.IStartReplicationRequest=} [properties] Properties to set - */ - function StartReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StartReplicationRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {tabletmanagerdata.IStartReplicationRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.StartReplicationRequest} StartReplicationRequest instance - */ - StartReplicationRequest.create = function create(properties) { - return new StartReplicationRequest(properties); - }; - - /** - * Encodes the specified StartReplicationRequest message. Does not implicitly {@link tabletmanagerdata.StartReplicationRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {tabletmanagerdata.IStartReplicationRequest} message StartReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StartReplicationRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {tabletmanagerdata.IStartReplicationRequest} message StartReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StartReplicationRequest} StartReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StartReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StartReplicationRequest} StartReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartReplicationRequest message. - * @function verify - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StartReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StartReplicationRequest} StartReplicationRequest - */ - StartReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StartReplicationRequest) - return object; - return new $root.tabletmanagerdata.StartReplicationRequest(); - }; - - /** - * Creates a plain object from a StartReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StartReplicationRequest - * @static - * @param {tabletmanagerdata.StartReplicationRequest} message StartReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartReplicationRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StartReplicationRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StartReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - StartReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StartReplicationRequest; - })(); - - tabletmanagerdata.StartReplicationResponse = (function() { - - /** - * Properties of a StartReplicationResponse. - * @memberof tabletmanagerdata - * @interface IStartReplicationResponse - */ - - /** - * Constructs a new StartReplicationResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a StartReplicationResponse. - * @implements IStartReplicationResponse - * @constructor - * @param {tabletmanagerdata.IStartReplicationResponse=} [properties] Properties to set - */ - function StartReplicationResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StartReplicationResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {tabletmanagerdata.IStartReplicationResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.StartReplicationResponse} StartReplicationResponse instance - */ - StartReplicationResponse.create = function create(properties) { - return new StartReplicationResponse(properties); - }; - - /** - * Encodes the specified StartReplicationResponse message. Does not implicitly {@link tabletmanagerdata.StartReplicationResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {tabletmanagerdata.IStartReplicationResponse} message StartReplicationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StartReplicationResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {tabletmanagerdata.IStartReplicationResponse} message StartReplicationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartReplicationResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StartReplicationResponse} StartReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StartReplicationResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartReplicationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StartReplicationResponse} StartReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartReplicationResponse message. - * @function verify - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartReplicationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StartReplicationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StartReplicationResponse} StartReplicationResponse - */ - StartReplicationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StartReplicationResponse) - return object; - return new $root.tabletmanagerdata.StartReplicationResponse(); - }; - - /** - * Creates a plain object from a StartReplicationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StartReplicationResponse - * @static - * @param {tabletmanagerdata.StartReplicationResponse} message StartReplicationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartReplicationResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StartReplicationResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StartReplicationResponse - * @instance - * @returns {Object.} JSON object - */ - StartReplicationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StartReplicationResponse; - })(); - - tabletmanagerdata.StartReplicationUntilAfterRequest = (function() { - - /** - * Properties of a StartReplicationUntilAfterRequest. - * @memberof tabletmanagerdata - * @interface IStartReplicationUntilAfterRequest - * @property {string|null} [position] StartReplicationUntilAfterRequest position - * @property {number|Long|null} [wait_timeout] StartReplicationUntilAfterRequest wait_timeout - */ - - /** - * Constructs a new StartReplicationUntilAfterRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a StartReplicationUntilAfterRequest. - * @implements IStartReplicationUntilAfterRequest - * @constructor - * @param {tabletmanagerdata.IStartReplicationUntilAfterRequest=} [properties] Properties to set - */ - function StartReplicationUntilAfterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StartReplicationUntilAfterRequest position. - * @member {string} position - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @instance - */ - StartReplicationUntilAfterRequest.prototype.position = ""; - - /** - * StartReplicationUntilAfterRequest wait_timeout. - * @member {number|Long} wait_timeout - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @instance - */ - StartReplicationUntilAfterRequest.prototype.wait_timeout = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new StartReplicationUntilAfterRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {tabletmanagerdata.IStartReplicationUntilAfterRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.StartReplicationUntilAfterRequest} StartReplicationUntilAfterRequest instance - */ - StartReplicationUntilAfterRequest.create = function create(properties) { - return new StartReplicationUntilAfterRequest(properties); - }; - - /** - * Encodes the specified StartReplicationUntilAfterRequest message. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {tabletmanagerdata.IStartReplicationUntilAfterRequest} message StartReplicationUntilAfterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationUntilAfterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.wait_timeout != null && Object.hasOwnProperty.call(message, "wait_timeout")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.wait_timeout); - return writer; - }; - - /** - * Encodes the specified StartReplicationUntilAfterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {tabletmanagerdata.IStartReplicationUntilAfterRequest} message StartReplicationUntilAfterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationUntilAfterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartReplicationUntilAfterRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StartReplicationUntilAfterRequest} StartReplicationUntilAfterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationUntilAfterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StartReplicationUntilAfterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - case 2: - message.wait_timeout = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartReplicationUntilAfterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StartReplicationUntilAfterRequest} StartReplicationUntilAfterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationUntilAfterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartReplicationUntilAfterRequest message. - * @function verify - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartReplicationUntilAfterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.wait_timeout != null && message.hasOwnProperty("wait_timeout")) - if (!$util.isInteger(message.wait_timeout) && !(message.wait_timeout && $util.isInteger(message.wait_timeout.low) && $util.isInteger(message.wait_timeout.high))) - return "wait_timeout: integer|Long expected"; - return null; - }; - - /** - * Creates a StartReplicationUntilAfterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StartReplicationUntilAfterRequest} StartReplicationUntilAfterRequest - */ - StartReplicationUntilAfterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StartReplicationUntilAfterRequest) - return object; - var message = new $root.tabletmanagerdata.StartReplicationUntilAfterRequest(); - if (object.position != null) - message.position = String(object.position); - if (object.wait_timeout != null) - if ($util.Long) - (message.wait_timeout = $util.Long.fromValue(object.wait_timeout)).unsigned = false; - else if (typeof object.wait_timeout === "string") - message.wait_timeout = parseInt(object.wait_timeout, 10); - else if (typeof object.wait_timeout === "number") - message.wait_timeout = object.wait_timeout; - else if (typeof object.wait_timeout === "object") - message.wait_timeout = new $util.LongBits(object.wait_timeout.low >>> 0, object.wait_timeout.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a StartReplicationUntilAfterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @static - * @param {tabletmanagerdata.StartReplicationUntilAfterRequest} message StartReplicationUntilAfterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartReplicationUntilAfterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.position = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.wait_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.wait_timeout = options.longs === String ? "0" : 0; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.wait_timeout != null && message.hasOwnProperty("wait_timeout")) - if (typeof message.wait_timeout === "number") - object.wait_timeout = options.longs === String ? String(message.wait_timeout) : message.wait_timeout; - else - object.wait_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.wait_timeout) : options.longs === Number ? new $util.LongBits(message.wait_timeout.low >>> 0, message.wait_timeout.high >>> 0).toNumber() : message.wait_timeout; - return object; - }; - - /** - * Converts this StartReplicationUntilAfterRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StartReplicationUntilAfterRequest - * @instance - * @returns {Object.} JSON object - */ - StartReplicationUntilAfterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StartReplicationUntilAfterRequest; - })(); - - tabletmanagerdata.StartReplicationUntilAfterResponse = (function() { - - /** - * Properties of a StartReplicationUntilAfterResponse. - * @memberof tabletmanagerdata - * @interface IStartReplicationUntilAfterResponse - */ - - /** - * Constructs a new StartReplicationUntilAfterResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a StartReplicationUntilAfterResponse. - * @implements IStartReplicationUntilAfterResponse - * @constructor - * @param {tabletmanagerdata.IStartReplicationUntilAfterResponse=} [properties] Properties to set - */ - function StartReplicationUntilAfterResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StartReplicationUntilAfterResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {tabletmanagerdata.IStartReplicationUntilAfterResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.StartReplicationUntilAfterResponse} StartReplicationUntilAfterResponse instance - */ - StartReplicationUntilAfterResponse.create = function create(properties) { - return new StartReplicationUntilAfterResponse(properties); - }; - - /** - * Encodes the specified StartReplicationUntilAfterResponse message. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {tabletmanagerdata.IStartReplicationUntilAfterResponse} message StartReplicationUntilAfterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationUntilAfterResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StartReplicationUntilAfterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StartReplicationUntilAfterResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {tabletmanagerdata.IStartReplicationUntilAfterResponse} message StartReplicationUntilAfterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartReplicationUntilAfterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartReplicationUntilAfterResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StartReplicationUntilAfterResponse} StartReplicationUntilAfterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationUntilAfterResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StartReplicationUntilAfterResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartReplicationUntilAfterResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StartReplicationUntilAfterResponse} StartReplicationUntilAfterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartReplicationUntilAfterResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartReplicationUntilAfterResponse message. - * @function verify - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartReplicationUntilAfterResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StartReplicationUntilAfterResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StartReplicationUntilAfterResponse} StartReplicationUntilAfterResponse - */ - StartReplicationUntilAfterResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StartReplicationUntilAfterResponse) - return object; - return new $root.tabletmanagerdata.StartReplicationUntilAfterResponse(); - }; - - /** - * Creates a plain object from a StartReplicationUntilAfterResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @static - * @param {tabletmanagerdata.StartReplicationUntilAfterResponse} message StartReplicationUntilAfterResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartReplicationUntilAfterResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StartReplicationUntilAfterResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StartReplicationUntilAfterResponse - * @instance - * @returns {Object.} JSON object - */ - StartReplicationUntilAfterResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StartReplicationUntilAfterResponse; - })(); - - tabletmanagerdata.GetReplicasRequest = (function() { - - /** - * Properties of a GetReplicasRequest. - * @memberof tabletmanagerdata - * @interface IGetReplicasRequest - */ - - /** - * Constructs a new GetReplicasRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a GetReplicasRequest. - * @implements IGetReplicasRequest - * @constructor - * @param {tabletmanagerdata.IGetReplicasRequest=} [properties] Properties to set - */ - function GetReplicasRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new GetReplicasRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {tabletmanagerdata.IGetReplicasRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.GetReplicasRequest} GetReplicasRequest instance - */ - GetReplicasRequest.create = function create(properties) { - return new GetReplicasRequest(properties); - }; - - /** - * Encodes the specified GetReplicasRequest message. Does not implicitly {@link tabletmanagerdata.GetReplicasRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {tabletmanagerdata.IGetReplicasRequest} message GetReplicasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReplicasRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified GetReplicasRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.GetReplicasRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {tabletmanagerdata.IGetReplicasRequest} message GetReplicasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReplicasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetReplicasRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.GetReplicasRequest} GetReplicasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReplicasRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.GetReplicasRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetReplicasRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.GetReplicasRequest} GetReplicasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReplicasRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetReplicasRequest message. - * @function verify - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetReplicasRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a GetReplicasRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.GetReplicasRequest} GetReplicasRequest - */ - GetReplicasRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.GetReplicasRequest) - return object; - return new $root.tabletmanagerdata.GetReplicasRequest(); - }; - - /** - * Creates a plain object from a GetReplicasRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.GetReplicasRequest - * @static - * @param {tabletmanagerdata.GetReplicasRequest} message GetReplicasRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetReplicasRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this GetReplicasRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.GetReplicasRequest - * @instance - * @returns {Object.} JSON object - */ - GetReplicasRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetReplicasRequest; - })(); - - tabletmanagerdata.GetReplicasResponse = (function() { - - /** - * Properties of a GetReplicasResponse. - * @memberof tabletmanagerdata - * @interface IGetReplicasResponse - * @property {Array.|null} [addrs] GetReplicasResponse addrs - */ - - /** - * Constructs a new GetReplicasResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a GetReplicasResponse. - * @implements IGetReplicasResponse - * @constructor - * @param {tabletmanagerdata.IGetReplicasResponse=} [properties] Properties to set - */ - function GetReplicasResponse(properties) { - this.addrs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetReplicasResponse addrs. - * @member {Array.} addrs - * @memberof tabletmanagerdata.GetReplicasResponse - * @instance - */ - GetReplicasResponse.prototype.addrs = $util.emptyArray; - - /** - * Creates a new GetReplicasResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {tabletmanagerdata.IGetReplicasResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.GetReplicasResponse} GetReplicasResponse instance - */ - GetReplicasResponse.create = function create(properties) { - return new GetReplicasResponse(properties); - }; - - /** - * Encodes the specified GetReplicasResponse message. Does not implicitly {@link tabletmanagerdata.GetReplicasResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {tabletmanagerdata.IGetReplicasResponse} message GetReplicasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReplicasResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.addrs != null && message.addrs.length) - for (var i = 0; i < message.addrs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.addrs[i]); - return writer; - }; - - /** - * Encodes the specified GetReplicasResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.GetReplicasResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {tabletmanagerdata.IGetReplicasResponse} message GetReplicasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReplicasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetReplicasResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.GetReplicasResponse} GetReplicasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReplicasResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.GetReplicasResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.addrs && message.addrs.length)) - message.addrs = []; - message.addrs.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetReplicasResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.GetReplicasResponse} GetReplicasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReplicasResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetReplicasResponse message. - * @function verify - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetReplicasResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.addrs != null && message.hasOwnProperty("addrs")) { - if (!Array.isArray(message.addrs)) - return "addrs: array expected"; - for (var i = 0; i < message.addrs.length; ++i) - if (!$util.isString(message.addrs[i])) - return "addrs: string[] expected"; - } - return null; - }; - - /** - * Creates a GetReplicasResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.GetReplicasResponse} GetReplicasResponse - */ - GetReplicasResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.GetReplicasResponse) - return object; - var message = new $root.tabletmanagerdata.GetReplicasResponse(); - if (object.addrs) { - if (!Array.isArray(object.addrs)) - throw TypeError(".tabletmanagerdata.GetReplicasResponse.addrs: array expected"); - message.addrs = []; - for (var i = 0; i < object.addrs.length; ++i) - message.addrs[i] = String(object.addrs[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetReplicasResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.GetReplicasResponse - * @static - * @param {tabletmanagerdata.GetReplicasResponse} message GetReplicasResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetReplicasResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.addrs = []; - if (message.addrs && message.addrs.length) { - object.addrs = []; - for (var j = 0; j < message.addrs.length; ++j) - object.addrs[j] = message.addrs[j]; - } - return object; - }; - - /** - * Converts this GetReplicasResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.GetReplicasResponse - * @instance - * @returns {Object.} JSON object - */ - GetReplicasResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetReplicasResponse; - })(); - - tabletmanagerdata.ResetReplicationRequest = (function() { - - /** - * Properties of a ResetReplicationRequest. - * @memberof tabletmanagerdata - * @interface IResetReplicationRequest - */ - - /** - * Constructs a new ResetReplicationRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a ResetReplicationRequest. - * @implements IResetReplicationRequest - * @constructor - * @param {tabletmanagerdata.IResetReplicationRequest=} [properties] Properties to set - */ - function ResetReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ResetReplicationRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {tabletmanagerdata.IResetReplicationRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ResetReplicationRequest} ResetReplicationRequest instance - */ - ResetReplicationRequest.create = function create(properties) { - return new ResetReplicationRequest(properties); - }; - - /** - * Encodes the specified ResetReplicationRequest message. Does not implicitly {@link tabletmanagerdata.ResetReplicationRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {tabletmanagerdata.IResetReplicationRequest} message ResetReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ResetReplicationRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ResetReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {tabletmanagerdata.IResetReplicationRequest} message ResetReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResetReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ResetReplicationRequest} ResetReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetReplicationRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ResetReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResetReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ResetReplicationRequest} ResetReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResetReplicationRequest message. - * @function verify - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResetReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ResetReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ResetReplicationRequest} ResetReplicationRequest - */ - ResetReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ResetReplicationRequest) - return object; - return new $root.tabletmanagerdata.ResetReplicationRequest(); - }; - - /** - * Creates a plain object from a ResetReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ResetReplicationRequest - * @static - * @param {tabletmanagerdata.ResetReplicationRequest} message ResetReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResetReplicationRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ResetReplicationRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ResetReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - ResetReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResetReplicationRequest; - })(); - - tabletmanagerdata.ResetReplicationResponse = (function() { - - /** - * Properties of a ResetReplicationResponse. - * @memberof tabletmanagerdata - * @interface IResetReplicationResponse - */ - - /** - * Constructs a new ResetReplicationResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a ResetReplicationResponse. - * @implements IResetReplicationResponse - * @constructor - * @param {tabletmanagerdata.IResetReplicationResponse=} [properties] Properties to set - */ - function ResetReplicationResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ResetReplicationResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {tabletmanagerdata.IResetReplicationResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ResetReplicationResponse} ResetReplicationResponse instance - */ - ResetReplicationResponse.create = function create(properties) { - return new ResetReplicationResponse(properties); - }; - - /** - * Encodes the specified ResetReplicationResponse message. Does not implicitly {@link tabletmanagerdata.ResetReplicationResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {tabletmanagerdata.IResetReplicationResponse} message ResetReplicationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetReplicationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ResetReplicationResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ResetReplicationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {tabletmanagerdata.IResetReplicationResponse} message ResetReplicationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetReplicationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResetReplicationResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ResetReplicationResponse} ResetReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetReplicationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ResetReplicationResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResetReplicationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ResetReplicationResponse} ResetReplicationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetReplicationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResetReplicationResponse message. - * @function verify - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResetReplicationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ResetReplicationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ResetReplicationResponse} ResetReplicationResponse - */ - ResetReplicationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ResetReplicationResponse) - return object; - return new $root.tabletmanagerdata.ResetReplicationResponse(); - }; - - /** - * Creates a plain object from a ResetReplicationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ResetReplicationResponse - * @static - * @param {tabletmanagerdata.ResetReplicationResponse} message ResetReplicationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResetReplicationResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ResetReplicationResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ResetReplicationResponse - * @instance - * @returns {Object.} JSON object - */ - ResetReplicationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResetReplicationResponse; - })(); - - tabletmanagerdata.VReplicationExecRequest = (function() { - - /** - * Properties of a VReplicationExecRequest. - * @memberof tabletmanagerdata - * @interface IVReplicationExecRequest - * @property {string|null} [query] VReplicationExecRequest query - */ - - /** - * Constructs a new VReplicationExecRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a VReplicationExecRequest. - * @implements IVReplicationExecRequest - * @constructor - * @param {tabletmanagerdata.IVReplicationExecRequest=} [properties] Properties to set - */ - function VReplicationExecRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VReplicationExecRequest query. - * @member {string} query - * @memberof tabletmanagerdata.VReplicationExecRequest - * @instance - */ - VReplicationExecRequest.prototype.query = ""; - - /** - * Creates a new VReplicationExecRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {tabletmanagerdata.IVReplicationExecRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.VReplicationExecRequest} VReplicationExecRequest instance - */ - VReplicationExecRequest.create = function create(properties) { - return new VReplicationExecRequest(properties); - }; - - /** - * Encodes the specified VReplicationExecRequest message. Does not implicitly {@link tabletmanagerdata.VReplicationExecRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {tabletmanagerdata.IVReplicationExecRequest} message VReplicationExecRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationExecRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - return writer; - }; - - /** - * Encodes the specified VReplicationExecRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationExecRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {tabletmanagerdata.IVReplicationExecRequest} message VReplicationExecRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationExecRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VReplicationExecRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VReplicationExecRequest} VReplicationExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationExecRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VReplicationExecRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VReplicationExecRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VReplicationExecRequest} VReplicationExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationExecRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VReplicationExecRequest message. - * @function verify - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VReplicationExecRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - return null; - }; - - /** - * Creates a VReplicationExecRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VReplicationExecRequest} VReplicationExecRequest - */ - VReplicationExecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VReplicationExecRequest) - return object; - var message = new $root.tabletmanagerdata.VReplicationExecRequest(); - if (object.query != null) - message.query = String(object.query); - return message; - }; - - /** - * Creates a plain object from a VReplicationExecRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VReplicationExecRequest - * @static - * @param {tabletmanagerdata.VReplicationExecRequest} message VReplicationExecRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VReplicationExecRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.query = ""; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - return object; - }; - - /** - * Converts this VReplicationExecRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VReplicationExecRequest - * @instance - * @returns {Object.} JSON object - */ - VReplicationExecRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VReplicationExecRequest; - })(); - - tabletmanagerdata.VReplicationExecResponse = (function() { - - /** - * Properties of a VReplicationExecResponse. - * @memberof tabletmanagerdata - * @interface IVReplicationExecResponse - * @property {query.IQueryResult|null} [result] VReplicationExecResponse result - */ - - /** - * Constructs a new VReplicationExecResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a VReplicationExecResponse. - * @implements IVReplicationExecResponse - * @constructor - * @param {tabletmanagerdata.IVReplicationExecResponse=} [properties] Properties to set - */ - function VReplicationExecResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VReplicationExecResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof tabletmanagerdata.VReplicationExecResponse - * @instance - */ - VReplicationExecResponse.prototype.result = null; - - /** - * Creates a new VReplicationExecResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {tabletmanagerdata.IVReplicationExecResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.VReplicationExecResponse} VReplicationExecResponse instance - */ - VReplicationExecResponse.create = function create(properties) { - return new VReplicationExecResponse(properties); - }; - - /** - * Encodes the specified VReplicationExecResponse message. Does not implicitly {@link tabletmanagerdata.VReplicationExecResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {tabletmanagerdata.IVReplicationExecResponse} message VReplicationExecResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationExecResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VReplicationExecResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationExecResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {tabletmanagerdata.IVReplicationExecResponse} message VReplicationExecResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationExecResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VReplicationExecResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VReplicationExecResponse} VReplicationExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationExecResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VReplicationExecResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VReplicationExecResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VReplicationExecResponse} VReplicationExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationExecResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VReplicationExecResponse message. - * @function verify - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VReplicationExecResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a VReplicationExecResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VReplicationExecResponse} VReplicationExecResponse - */ - VReplicationExecResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VReplicationExecResponse) - return object; - var message = new $root.tabletmanagerdata.VReplicationExecResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tabletmanagerdata.VReplicationExecResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a VReplicationExecResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VReplicationExecResponse - * @static - * @param {tabletmanagerdata.VReplicationExecResponse} message VReplicationExecResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VReplicationExecResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this VReplicationExecResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VReplicationExecResponse - * @instance - * @returns {Object.} JSON object - */ - VReplicationExecResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VReplicationExecResponse; - })(); - - tabletmanagerdata.VReplicationWaitForPosRequest = (function() { - - /** - * Properties of a VReplicationWaitForPosRequest. - * @memberof tabletmanagerdata - * @interface IVReplicationWaitForPosRequest - * @property {number|Long|null} [id] VReplicationWaitForPosRequest id - * @property {string|null} [position] VReplicationWaitForPosRequest position - */ - - /** - * Constructs a new VReplicationWaitForPosRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a VReplicationWaitForPosRequest. - * @implements IVReplicationWaitForPosRequest - * @constructor - * @param {tabletmanagerdata.IVReplicationWaitForPosRequest=} [properties] Properties to set - */ - function VReplicationWaitForPosRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VReplicationWaitForPosRequest id. - * @member {number|Long} id - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @instance - */ - VReplicationWaitForPosRequest.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * VReplicationWaitForPosRequest position. - * @member {string} position - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @instance - */ - VReplicationWaitForPosRequest.prototype.position = ""; - - /** - * Creates a new VReplicationWaitForPosRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {tabletmanagerdata.IVReplicationWaitForPosRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.VReplicationWaitForPosRequest} VReplicationWaitForPosRequest instance - */ - VReplicationWaitForPosRequest.create = function create(properties) { - return new VReplicationWaitForPosRequest(properties); - }; - - /** - * Encodes the specified VReplicationWaitForPosRequest message. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {tabletmanagerdata.IVReplicationWaitForPosRequest} message VReplicationWaitForPosRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationWaitForPosRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.position); - return writer; - }; - - /** - * Encodes the specified VReplicationWaitForPosRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {tabletmanagerdata.IVReplicationWaitForPosRequest} message VReplicationWaitForPosRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationWaitForPosRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VReplicationWaitForPosRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VReplicationWaitForPosRequest} VReplicationWaitForPosRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationWaitForPosRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VReplicationWaitForPosRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VReplicationWaitForPosRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VReplicationWaitForPosRequest} VReplicationWaitForPosRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationWaitForPosRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VReplicationWaitForPosRequest message. - * @function verify - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VReplicationWaitForPosRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates a VReplicationWaitForPosRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VReplicationWaitForPosRequest} VReplicationWaitForPosRequest - */ - VReplicationWaitForPosRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VReplicationWaitForPosRequest) - return object; - var message = new $root.tabletmanagerdata.VReplicationWaitForPosRequest(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from a VReplicationWaitForPosRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @static - * @param {tabletmanagerdata.VReplicationWaitForPosRequest} message VReplicationWaitForPosRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VReplicationWaitForPosRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.position = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this VReplicationWaitForPosRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VReplicationWaitForPosRequest - * @instance - * @returns {Object.} JSON object - */ - VReplicationWaitForPosRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VReplicationWaitForPosRequest; - })(); - - tabletmanagerdata.VReplicationWaitForPosResponse = (function() { - - /** - * Properties of a VReplicationWaitForPosResponse. - * @memberof tabletmanagerdata - * @interface IVReplicationWaitForPosResponse - */ - - /** - * Constructs a new VReplicationWaitForPosResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a VReplicationWaitForPosResponse. - * @implements IVReplicationWaitForPosResponse - * @constructor - * @param {tabletmanagerdata.IVReplicationWaitForPosResponse=} [properties] Properties to set - */ - function VReplicationWaitForPosResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new VReplicationWaitForPosResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {tabletmanagerdata.IVReplicationWaitForPosResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.VReplicationWaitForPosResponse} VReplicationWaitForPosResponse instance - */ - VReplicationWaitForPosResponse.create = function create(properties) { - return new VReplicationWaitForPosResponse(properties); - }; - - /** - * Encodes the specified VReplicationWaitForPosResponse message. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {tabletmanagerdata.IVReplicationWaitForPosResponse} message VReplicationWaitForPosResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationWaitForPosResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified VReplicationWaitForPosResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VReplicationWaitForPosResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {tabletmanagerdata.IVReplicationWaitForPosResponse} message VReplicationWaitForPosResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VReplicationWaitForPosResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VReplicationWaitForPosResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VReplicationWaitForPosResponse} VReplicationWaitForPosResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationWaitForPosResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VReplicationWaitForPosResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VReplicationWaitForPosResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VReplicationWaitForPosResponse} VReplicationWaitForPosResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VReplicationWaitForPosResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VReplicationWaitForPosResponse message. - * @function verify - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VReplicationWaitForPosResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a VReplicationWaitForPosResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VReplicationWaitForPosResponse} VReplicationWaitForPosResponse - */ - VReplicationWaitForPosResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VReplicationWaitForPosResponse) - return object; - return new $root.tabletmanagerdata.VReplicationWaitForPosResponse(); - }; - - /** - * Creates a plain object from a VReplicationWaitForPosResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @static - * @param {tabletmanagerdata.VReplicationWaitForPosResponse} message VReplicationWaitForPosResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VReplicationWaitForPosResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this VReplicationWaitForPosResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VReplicationWaitForPosResponse - * @instance - * @returns {Object.} JSON object - */ - VReplicationWaitForPosResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VReplicationWaitForPosResponse; - })(); - - tabletmanagerdata.InitMasterRequest = (function() { - - /** - * Properties of an InitMasterRequest. - * @memberof tabletmanagerdata - * @interface IInitMasterRequest - */ - - /** - * Constructs a new InitMasterRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an InitMasterRequest. - * @implements IInitMasterRequest - * @constructor - * @param {tabletmanagerdata.IInitMasterRequest=} [properties] Properties to set - */ - function InitMasterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new InitMasterRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {tabletmanagerdata.IInitMasterRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.InitMasterRequest} InitMasterRequest instance - */ - InitMasterRequest.create = function create(properties) { - return new InitMasterRequest(properties); - }; - - /** - * Encodes the specified InitMasterRequest message. Does not implicitly {@link tabletmanagerdata.InitMasterRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {tabletmanagerdata.IInitMasterRequest} message InitMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitMasterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified InitMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.InitMasterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {tabletmanagerdata.IInitMasterRequest} message InitMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitMasterRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.InitMasterRequest} InitMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitMasterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.InitMasterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitMasterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.InitMasterRequest} InitMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitMasterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitMasterRequest message. - * @function verify - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitMasterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an InitMasterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.InitMasterRequest} InitMasterRequest - */ - InitMasterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.InitMasterRequest) - return object; - return new $root.tabletmanagerdata.InitMasterRequest(); - }; - - /** - * Creates a plain object from an InitMasterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.InitMasterRequest - * @static - * @param {tabletmanagerdata.InitMasterRequest} message InitMasterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitMasterRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this InitMasterRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.InitMasterRequest - * @instance - * @returns {Object.} JSON object - */ - InitMasterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitMasterRequest; - })(); - - tabletmanagerdata.InitMasterResponse = (function() { - - /** - * Properties of an InitMasterResponse. - * @memberof tabletmanagerdata - * @interface IInitMasterResponse - * @property {string|null} [position] InitMasterResponse position - */ - - /** - * Constructs a new InitMasterResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an InitMasterResponse. - * @implements IInitMasterResponse - * @constructor - * @param {tabletmanagerdata.IInitMasterResponse=} [properties] Properties to set - */ - function InitMasterResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitMasterResponse position. - * @member {string} position - * @memberof tabletmanagerdata.InitMasterResponse - * @instance - */ - InitMasterResponse.prototype.position = ""; - - /** - * Creates a new InitMasterResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {tabletmanagerdata.IInitMasterResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.InitMasterResponse} InitMasterResponse instance - */ - InitMasterResponse.create = function create(properties) { - return new InitMasterResponse(properties); - }; - - /** - * Encodes the specified InitMasterResponse message. Does not implicitly {@link tabletmanagerdata.InitMasterResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {tabletmanagerdata.IInitMasterResponse} message InitMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitMasterResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - return writer; - }; - - /** - * Encodes the specified InitMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.InitMasterResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {tabletmanagerdata.IInitMasterResponse} message InitMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitMasterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitMasterResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.InitMasterResponse} InitMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitMasterResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.InitMasterResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitMasterResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.InitMasterResponse} InitMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitMasterResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitMasterResponse message. - * @function verify - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitMasterResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates an InitMasterResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.InitMasterResponse} InitMasterResponse - */ - InitMasterResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.InitMasterResponse) - return object; - var message = new $root.tabletmanagerdata.InitMasterResponse(); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from an InitMasterResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.InitMasterResponse - * @static - * @param {tabletmanagerdata.InitMasterResponse} message InitMasterResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitMasterResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.position = ""; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this InitMasterResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.InitMasterResponse - * @instance - * @returns {Object.} JSON object - */ - InitMasterResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitMasterResponse; - })(); - - tabletmanagerdata.PopulateReparentJournalRequest = (function() { - - /** - * Properties of a PopulateReparentJournalRequest. - * @memberof tabletmanagerdata - * @interface IPopulateReparentJournalRequest - * @property {number|Long|null} [time_created_ns] PopulateReparentJournalRequest time_created_ns - * @property {string|null} [action_name] PopulateReparentJournalRequest action_name - * @property {topodata.ITabletAlias|null} [master_alias] PopulateReparentJournalRequest master_alias - * @property {string|null} [replication_position] PopulateReparentJournalRequest replication_position - */ - - /** - * Constructs a new PopulateReparentJournalRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a PopulateReparentJournalRequest. - * @implements IPopulateReparentJournalRequest - * @constructor - * @param {tabletmanagerdata.IPopulateReparentJournalRequest=} [properties] Properties to set - */ - function PopulateReparentJournalRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PopulateReparentJournalRequest time_created_ns. - * @member {number|Long} time_created_ns - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @instance - */ - PopulateReparentJournalRequest.prototype.time_created_ns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PopulateReparentJournalRequest action_name. - * @member {string} action_name - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @instance - */ - PopulateReparentJournalRequest.prototype.action_name = ""; - - /** - * PopulateReparentJournalRequest master_alias. - * @member {topodata.ITabletAlias|null|undefined} master_alias - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @instance - */ - PopulateReparentJournalRequest.prototype.master_alias = null; - - /** - * PopulateReparentJournalRequest replication_position. - * @member {string} replication_position - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @instance - */ - PopulateReparentJournalRequest.prototype.replication_position = ""; - - /** - * Creates a new PopulateReparentJournalRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {tabletmanagerdata.IPopulateReparentJournalRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.PopulateReparentJournalRequest} PopulateReparentJournalRequest instance - */ - PopulateReparentJournalRequest.create = function create(properties) { - return new PopulateReparentJournalRequest(properties); - }; - - /** - * Encodes the specified PopulateReparentJournalRequest message. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {tabletmanagerdata.IPopulateReparentJournalRequest} message PopulateReparentJournalRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PopulateReparentJournalRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.time_created_ns != null && Object.hasOwnProperty.call(message, "time_created_ns")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.time_created_ns); - if (message.action_name != null && Object.hasOwnProperty.call(message, "action_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.action_name); - if (message.master_alias != null && Object.hasOwnProperty.call(message, "master_alias")) - $root.topodata.TabletAlias.encode(message.master_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.replication_position != null && Object.hasOwnProperty.call(message, "replication_position")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.replication_position); - return writer; - }; - - /** - * Encodes the specified PopulateReparentJournalRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {tabletmanagerdata.IPopulateReparentJournalRequest} message PopulateReparentJournalRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PopulateReparentJournalRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PopulateReparentJournalRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PopulateReparentJournalRequest} PopulateReparentJournalRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PopulateReparentJournalRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PopulateReparentJournalRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time_created_ns = reader.int64(); - break; - case 2: - message.action_name = reader.string(); - break; - case 3: - message.master_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.replication_position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PopulateReparentJournalRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PopulateReparentJournalRequest} PopulateReparentJournalRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PopulateReparentJournalRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PopulateReparentJournalRequest message. - * @function verify - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PopulateReparentJournalRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.time_created_ns != null && message.hasOwnProperty("time_created_ns")) - if (!$util.isInteger(message.time_created_ns) && !(message.time_created_ns && $util.isInteger(message.time_created_ns.low) && $util.isInteger(message.time_created_ns.high))) - return "time_created_ns: integer|Long expected"; - if (message.action_name != null && message.hasOwnProperty("action_name")) - if (!$util.isString(message.action_name)) - return "action_name: string expected"; - if (message.master_alias != null && message.hasOwnProperty("master_alias")) { - var error = $root.topodata.TabletAlias.verify(message.master_alias); - if (error) - return "master_alias." + error; - } - if (message.replication_position != null && message.hasOwnProperty("replication_position")) - if (!$util.isString(message.replication_position)) - return "replication_position: string expected"; - return null; - }; - - /** - * Creates a PopulateReparentJournalRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PopulateReparentJournalRequest} PopulateReparentJournalRequest - */ - PopulateReparentJournalRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PopulateReparentJournalRequest) - return object; - var message = new $root.tabletmanagerdata.PopulateReparentJournalRequest(); - if (object.time_created_ns != null) - if ($util.Long) - (message.time_created_ns = $util.Long.fromValue(object.time_created_ns)).unsigned = false; - else if (typeof object.time_created_ns === "string") - message.time_created_ns = parseInt(object.time_created_ns, 10); - else if (typeof object.time_created_ns === "number") - message.time_created_ns = object.time_created_ns; - else if (typeof object.time_created_ns === "object") - message.time_created_ns = new $util.LongBits(object.time_created_ns.low >>> 0, object.time_created_ns.high >>> 0).toNumber(); - if (object.action_name != null) - message.action_name = String(object.action_name); - if (object.master_alias != null) { - if (typeof object.master_alias !== "object") - throw TypeError(".tabletmanagerdata.PopulateReparentJournalRequest.master_alias: object expected"); - message.master_alias = $root.topodata.TabletAlias.fromObject(object.master_alias); - } - if (object.replication_position != null) - message.replication_position = String(object.replication_position); - return message; - }; - - /** - * Creates a plain object from a PopulateReparentJournalRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @static - * @param {tabletmanagerdata.PopulateReparentJournalRequest} message PopulateReparentJournalRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PopulateReparentJournalRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.time_created_ns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time_created_ns = options.longs === String ? "0" : 0; - object.action_name = ""; - object.master_alias = null; - object.replication_position = ""; - } - if (message.time_created_ns != null && message.hasOwnProperty("time_created_ns")) - if (typeof message.time_created_ns === "number") - object.time_created_ns = options.longs === String ? String(message.time_created_ns) : message.time_created_ns; - else - object.time_created_ns = options.longs === String ? $util.Long.prototype.toString.call(message.time_created_ns) : options.longs === Number ? new $util.LongBits(message.time_created_ns.low >>> 0, message.time_created_ns.high >>> 0).toNumber() : message.time_created_ns; - if (message.action_name != null && message.hasOwnProperty("action_name")) - object.action_name = message.action_name; - if (message.master_alias != null && message.hasOwnProperty("master_alias")) - object.master_alias = $root.topodata.TabletAlias.toObject(message.master_alias, options); - if (message.replication_position != null && message.hasOwnProperty("replication_position")) - object.replication_position = message.replication_position; - return object; - }; - - /** - * Converts this PopulateReparentJournalRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PopulateReparentJournalRequest - * @instance - * @returns {Object.} JSON object - */ - PopulateReparentJournalRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PopulateReparentJournalRequest; - })(); - - tabletmanagerdata.PopulateReparentJournalResponse = (function() { - - /** - * Properties of a PopulateReparentJournalResponse. - * @memberof tabletmanagerdata - * @interface IPopulateReparentJournalResponse - */ - - /** - * Constructs a new PopulateReparentJournalResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a PopulateReparentJournalResponse. - * @implements IPopulateReparentJournalResponse - * @constructor - * @param {tabletmanagerdata.IPopulateReparentJournalResponse=} [properties] Properties to set - */ - function PopulateReparentJournalResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new PopulateReparentJournalResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {tabletmanagerdata.IPopulateReparentJournalResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.PopulateReparentJournalResponse} PopulateReparentJournalResponse instance - */ - PopulateReparentJournalResponse.create = function create(properties) { - return new PopulateReparentJournalResponse(properties); - }; - - /** - * Encodes the specified PopulateReparentJournalResponse message. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {tabletmanagerdata.IPopulateReparentJournalResponse} message PopulateReparentJournalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PopulateReparentJournalResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PopulateReparentJournalResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PopulateReparentJournalResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {tabletmanagerdata.IPopulateReparentJournalResponse} message PopulateReparentJournalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PopulateReparentJournalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PopulateReparentJournalResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PopulateReparentJournalResponse} PopulateReparentJournalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PopulateReparentJournalResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PopulateReparentJournalResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PopulateReparentJournalResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PopulateReparentJournalResponse} PopulateReparentJournalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PopulateReparentJournalResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PopulateReparentJournalResponse message. - * @function verify - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PopulateReparentJournalResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PopulateReparentJournalResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PopulateReparentJournalResponse} PopulateReparentJournalResponse - */ - PopulateReparentJournalResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PopulateReparentJournalResponse) - return object; - return new $root.tabletmanagerdata.PopulateReparentJournalResponse(); - }; - - /** - * Creates a plain object from a PopulateReparentJournalResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @static - * @param {tabletmanagerdata.PopulateReparentJournalResponse} message PopulateReparentJournalResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PopulateReparentJournalResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PopulateReparentJournalResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PopulateReparentJournalResponse - * @instance - * @returns {Object.} JSON object - */ - PopulateReparentJournalResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PopulateReparentJournalResponse; - })(); - - tabletmanagerdata.InitReplicaRequest = (function() { - - /** - * Properties of an InitReplicaRequest. - * @memberof tabletmanagerdata - * @interface IInitReplicaRequest - * @property {topodata.ITabletAlias|null} [parent] InitReplicaRequest parent - * @property {string|null} [replication_position] InitReplicaRequest replication_position - * @property {number|Long|null} [time_created_ns] InitReplicaRequest time_created_ns - */ - - /** - * Constructs a new InitReplicaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an InitReplicaRequest. - * @implements IInitReplicaRequest - * @constructor - * @param {tabletmanagerdata.IInitReplicaRequest=} [properties] Properties to set - */ - function InitReplicaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitReplicaRequest parent. - * @member {topodata.ITabletAlias|null|undefined} parent - * @memberof tabletmanagerdata.InitReplicaRequest - * @instance - */ - InitReplicaRequest.prototype.parent = null; - - /** - * InitReplicaRequest replication_position. - * @member {string} replication_position - * @memberof tabletmanagerdata.InitReplicaRequest - * @instance - */ - InitReplicaRequest.prototype.replication_position = ""; - - /** - * InitReplicaRequest time_created_ns. - * @member {number|Long} time_created_ns - * @memberof tabletmanagerdata.InitReplicaRequest - * @instance - */ - InitReplicaRequest.prototype.time_created_ns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new InitReplicaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {tabletmanagerdata.IInitReplicaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.InitReplicaRequest} InitReplicaRequest instance - */ - InitReplicaRequest.create = function create(properties) { - return new InitReplicaRequest(properties); - }; - - /** - * Encodes the specified InitReplicaRequest message. Does not implicitly {@link tabletmanagerdata.InitReplicaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {tabletmanagerdata.IInitReplicaRequest} message InitReplicaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitReplicaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - $root.topodata.TabletAlias.encode(message.parent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.replication_position != null && Object.hasOwnProperty.call(message, "replication_position")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.replication_position); - if (message.time_created_ns != null && Object.hasOwnProperty.call(message, "time_created_ns")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time_created_ns); - return writer; - }; - - /** - * Encodes the specified InitReplicaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.InitReplicaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {tabletmanagerdata.IInitReplicaRequest} message InitReplicaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitReplicaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitReplicaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.InitReplicaRequest} InitReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitReplicaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.InitReplicaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.replication_position = reader.string(); - break; - case 3: - message.time_created_ns = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitReplicaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.InitReplicaRequest} InitReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitReplicaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitReplicaRequest message. - * @function verify - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitReplicaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) { - var error = $root.topodata.TabletAlias.verify(message.parent); - if (error) - return "parent." + error; - } - if (message.replication_position != null && message.hasOwnProperty("replication_position")) - if (!$util.isString(message.replication_position)) - return "replication_position: string expected"; - if (message.time_created_ns != null && message.hasOwnProperty("time_created_ns")) - if (!$util.isInteger(message.time_created_ns) && !(message.time_created_ns && $util.isInteger(message.time_created_ns.low) && $util.isInteger(message.time_created_ns.high))) - return "time_created_ns: integer|Long expected"; - return null; - }; - - /** - * Creates an InitReplicaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.InitReplicaRequest} InitReplicaRequest - */ - InitReplicaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.InitReplicaRequest) - return object; - var message = new $root.tabletmanagerdata.InitReplicaRequest(); - if (object.parent != null) { - if (typeof object.parent !== "object") - throw TypeError(".tabletmanagerdata.InitReplicaRequest.parent: object expected"); - message.parent = $root.topodata.TabletAlias.fromObject(object.parent); - } - if (object.replication_position != null) - message.replication_position = String(object.replication_position); - if (object.time_created_ns != null) - if ($util.Long) - (message.time_created_ns = $util.Long.fromValue(object.time_created_ns)).unsigned = false; - else if (typeof object.time_created_ns === "string") - message.time_created_ns = parseInt(object.time_created_ns, 10); - else if (typeof object.time_created_ns === "number") - message.time_created_ns = object.time_created_ns; - else if (typeof object.time_created_ns === "object") - message.time_created_ns = new $util.LongBits(object.time_created_ns.low >>> 0, object.time_created_ns.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an InitReplicaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.InitReplicaRequest - * @static - * @param {tabletmanagerdata.InitReplicaRequest} message InitReplicaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitReplicaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = null; - object.replication_position = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.time_created_ns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time_created_ns = options.longs === String ? "0" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = $root.topodata.TabletAlias.toObject(message.parent, options); - if (message.replication_position != null && message.hasOwnProperty("replication_position")) - object.replication_position = message.replication_position; - if (message.time_created_ns != null && message.hasOwnProperty("time_created_ns")) - if (typeof message.time_created_ns === "number") - object.time_created_ns = options.longs === String ? String(message.time_created_ns) : message.time_created_ns; - else - object.time_created_ns = options.longs === String ? $util.Long.prototype.toString.call(message.time_created_ns) : options.longs === Number ? new $util.LongBits(message.time_created_ns.low >>> 0, message.time_created_ns.high >>> 0).toNumber() : message.time_created_ns; - return object; - }; - - /** - * Converts this InitReplicaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.InitReplicaRequest - * @instance - * @returns {Object.} JSON object - */ - InitReplicaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitReplicaRequest; - })(); - - tabletmanagerdata.InitReplicaResponse = (function() { - - /** - * Properties of an InitReplicaResponse. - * @memberof tabletmanagerdata - * @interface IInitReplicaResponse - */ - - /** - * Constructs a new InitReplicaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an InitReplicaResponse. - * @implements IInitReplicaResponse - * @constructor - * @param {tabletmanagerdata.IInitReplicaResponse=} [properties] Properties to set - */ - function InitReplicaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new InitReplicaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {tabletmanagerdata.IInitReplicaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.InitReplicaResponse} InitReplicaResponse instance - */ - InitReplicaResponse.create = function create(properties) { - return new InitReplicaResponse(properties); - }; - - /** - * Encodes the specified InitReplicaResponse message. Does not implicitly {@link tabletmanagerdata.InitReplicaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {tabletmanagerdata.IInitReplicaResponse} message InitReplicaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitReplicaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified InitReplicaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.InitReplicaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {tabletmanagerdata.IInitReplicaResponse} message InitReplicaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitReplicaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitReplicaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.InitReplicaResponse} InitReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitReplicaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.InitReplicaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitReplicaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.InitReplicaResponse} InitReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitReplicaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitReplicaResponse message. - * @function verify - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitReplicaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an InitReplicaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.InitReplicaResponse} InitReplicaResponse - */ - InitReplicaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.InitReplicaResponse) - return object; - return new $root.tabletmanagerdata.InitReplicaResponse(); - }; - - /** - * Creates a plain object from an InitReplicaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.InitReplicaResponse - * @static - * @param {tabletmanagerdata.InitReplicaResponse} message InitReplicaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitReplicaResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this InitReplicaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.InitReplicaResponse - * @instance - * @returns {Object.} JSON object - */ - InitReplicaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitReplicaResponse; - })(); - - tabletmanagerdata.DemoteMasterRequest = (function() { - - /** - * Properties of a DemoteMasterRequest. - * @memberof tabletmanagerdata - * @interface IDemoteMasterRequest - */ - - /** - * Constructs a new DemoteMasterRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a DemoteMasterRequest. - * @implements IDemoteMasterRequest - * @constructor - * @param {tabletmanagerdata.IDemoteMasterRequest=} [properties] Properties to set - */ - function DemoteMasterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new DemoteMasterRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {tabletmanagerdata.IDemoteMasterRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.DemoteMasterRequest} DemoteMasterRequest instance - */ - DemoteMasterRequest.create = function create(properties) { - return new DemoteMasterRequest(properties); - }; - - /** - * Encodes the specified DemoteMasterRequest message. Does not implicitly {@link tabletmanagerdata.DemoteMasterRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {tabletmanagerdata.IDemoteMasterRequest} message DemoteMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DemoteMasterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DemoteMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.DemoteMasterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {tabletmanagerdata.IDemoteMasterRequest} message DemoteMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DemoteMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DemoteMasterRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.DemoteMasterRequest} DemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DemoteMasterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.DemoteMasterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DemoteMasterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.DemoteMasterRequest} DemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DemoteMasterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DemoteMasterRequest message. - * @function verify - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DemoteMasterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DemoteMasterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.DemoteMasterRequest} DemoteMasterRequest - */ - DemoteMasterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.DemoteMasterRequest) - return object; - return new $root.tabletmanagerdata.DemoteMasterRequest(); - }; - - /** - * Creates a plain object from a DemoteMasterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.DemoteMasterRequest - * @static - * @param {tabletmanagerdata.DemoteMasterRequest} message DemoteMasterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DemoteMasterRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DemoteMasterRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.DemoteMasterRequest - * @instance - * @returns {Object.} JSON object - */ - DemoteMasterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DemoteMasterRequest; - })(); - - tabletmanagerdata.DemoteMasterResponse = (function() { - - /** - * Properties of a DemoteMasterResponse. - * @memberof tabletmanagerdata - * @interface IDemoteMasterResponse - * @property {string|null} [deprecated_position] DemoteMasterResponse deprecated_position - * @property {replicationdata.IMasterStatus|null} [master_status] DemoteMasterResponse master_status - */ - - /** - * Constructs a new DemoteMasterResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a DemoteMasterResponse. - * @implements IDemoteMasterResponse - * @constructor - * @param {tabletmanagerdata.IDemoteMasterResponse=} [properties] Properties to set - */ - function DemoteMasterResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DemoteMasterResponse deprecated_position. - * @member {string} deprecated_position - * @memberof tabletmanagerdata.DemoteMasterResponse - * @instance - */ - DemoteMasterResponse.prototype.deprecated_position = ""; - - /** - * DemoteMasterResponse master_status. - * @member {replicationdata.IMasterStatus|null|undefined} master_status - * @memberof tabletmanagerdata.DemoteMasterResponse - * @instance - */ - DemoteMasterResponse.prototype.master_status = null; - - /** - * Creates a new DemoteMasterResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {tabletmanagerdata.IDemoteMasterResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.DemoteMasterResponse} DemoteMasterResponse instance - */ - DemoteMasterResponse.create = function create(properties) { - return new DemoteMasterResponse(properties); - }; - - /** - * Encodes the specified DemoteMasterResponse message. Does not implicitly {@link tabletmanagerdata.DemoteMasterResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {tabletmanagerdata.IDemoteMasterResponse} message DemoteMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DemoteMasterResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated_position != null && Object.hasOwnProperty.call(message, "deprecated_position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deprecated_position); - if (message.master_status != null && Object.hasOwnProperty.call(message, "master_status")) - $root.replicationdata.MasterStatus.encode(message.master_status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DemoteMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.DemoteMasterResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {tabletmanagerdata.IDemoteMasterResponse} message DemoteMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DemoteMasterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DemoteMasterResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.DemoteMasterResponse} DemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DemoteMasterResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.DemoteMasterResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated_position = reader.string(); - break; - case 2: - message.master_status = $root.replicationdata.MasterStatus.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DemoteMasterResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.DemoteMasterResponse} DemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DemoteMasterResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DemoteMasterResponse message. - * @function verify - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DemoteMasterResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated_position != null && message.hasOwnProperty("deprecated_position")) - if (!$util.isString(message.deprecated_position)) - return "deprecated_position: string expected"; - if (message.master_status != null && message.hasOwnProperty("master_status")) { - var error = $root.replicationdata.MasterStatus.verify(message.master_status); - if (error) - return "master_status." + error; - } - return null; - }; - - /** - * Creates a DemoteMasterResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.DemoteMasterResponse} DemoteMasterResponse - */ - DemoteMasterResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.DemoteMasterResponse) - return object; - var message = new $root.tabletmanagerdata.DemoteMasterResponse(); - if (object.deprecated_position != null) - message.deprecated_position = String(object.deprecated_position); - if (object.master_status != null) { - if (typeof object.master_status !== "object") - throw TypeError(".tabletmanagerdata.DemoteMasterResponse.master_status: object expected"); - message.master_status = $root.replicationdata.MasterStatus.fromObject(object.master_status); - } - return message; - }; - - /** - * Creates a plain object from a DemoteMasterResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.DemoteMasterResponse - * @static - * @param {tabletmanagerdata.DemoteMasterResponse} message DemoteMasterResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DemoteMasterResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.deprecated_position = ""; - object.master_status = null; - } - if (message.deprecated_position != null && message.hasOwnProperty("deprecated_position")) - object.deprecated_position = message.deprecated_position; - if (message.master_status != null && message.hasOwnProperty("master_status")) - object.master_status = $root.replicationdata.MasterStatus.toObject(message.master_status, options); - return object; - }; - - /** - * Converts this DemoteMasterResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.DemoteMasterResponse - * @instance - * @returns {Object.} JSON object - */ - DemoteMasterResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DemoteMasterResponse; - })(); - - tabletmanagerdata.UndoDemoteMasterRequest = (function() { - - /** - * Properties of an UndoDemoteMasterRequest. - * @memberof tabletmanagerdata - * @interface IUndoDemoteMasterRequest - */ - - /** - * Constructs a new UndoDemoteMasterRequest. - * @memberof tabletmanagerdata - * @classdesc Represents an UndoDemoteMasterRequest. - * @implements IUndoDemoteMasterRequest - * @constructor - * @param {tabletmanagerdata.IUndoDemoteMasterRequest=} [properties] Properties to set - */ - function UndoDemoteMasterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new UndoDemoteMasterRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {tabletmanagerdata.IUndoDemoteMasterRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.UndoDemoteMasterRequest} UndoDemoteMasterRequest instance - */ - UndoDemoteMasterRequest.create = function create(properties) { - return new UndoDemoteMasterRequest(properties); - }; - - /** - * Encodes the specified UndoDemoteMasterRequest message. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {tabletmanagerdata.IUndoDemoteMasterRequest} message UndoDemoteMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndoDemoteMasterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UndoDemoteMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {tabletmanagerdata.IUndoDemoteMasterRequest} message UndoDemoteMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndoDemoteMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UndoDemoteMasterRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.UndoDemoteMasterRequest} UndoDemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndoDemoteMasterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UndoDemoteMasterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UndoDemoteMasterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.UndoDemoteMasterRequest} UndoDemoteMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndoDemoteMasterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UndoDemoteMasterRequest message. - * @function verify - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UndoDemoteMasterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UndoDemoteMasterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.UndoDemoteMasterRequest} UndoDemoteMasterRequest - */ - UndoDemoteMasterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.UndoDemoteMasterRequest) - return object; - return new $root.tabletmanagerdata.UndoDemoteMasterRequest(); - }; - - /** - * Creates a plain object from an UndoDemoteMasterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @static - * @param {tabletmanagerdata.UndoDemoteMasterRequest} message UndoDemoteMasterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UndoDemoteMasterRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UndoDemoteMasterRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.UndoDemoteMasterRequest - * @instance - * @returns {Object.} JSON object - */ - UndoDemoteMasterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UndoDemoteMasterRequest; - })(); - - tabletmanagerdata.UndoDemoteMasterResponse = (function() { - - /** - * Properties of an UndoDemoteMasterResponse. - * @memberof tabletmanagerdata - * @interface IUndoDemoteMasterResponse - */ - - /** - * Constructs a new UndoDemoteMasterResponse. - * @memberof tabletmanagerdata - * @classdesc Represents an UndoDemoteMasterResponse. - * @implements IUndoDemoteMasterResponse - * @constructor - * @param {tabletmanagerdata.IUndoDemoteMasterResponse=} [properties] Properties to set - */ - function UndoDemoteMasterResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new UndoDemoteMasterResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {tabletmanagerdata.IUndoDemoteMasterResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.UndoDemoteMasterResponse} UndoDemoteMasterResponse instance - */ - UndoDemoteMasterResponse.create = function create(properties) { - return new UndoDemoteMasterResponse(properties); - }; - - /** - * Encodes the specified UndoDemoteMasterResponse message. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {tabletmanagerdata.IUndoDemoteMasterResponse} message UndoDemoteMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndoDemoteMasterResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UndoDemoteMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.UndoDemoteMasterResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {tabletmanagerdata.IUndoDemoteMasterResponse} message UndoDemoteMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UndoDemoteMasterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UndoDemoteMasterResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.UndoDemoteMasterResponse} UndoDemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndoDemoteMasterResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.UndoDemoteMasterResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UndoDemoteMasterResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.UndoDemoteMasterResponse} UndoDemoteMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UndoDemoteMasterResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UndoDemoteMasterResponse message. - * @function verify - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UndoDemoteMasterResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UndoDemoteMasterResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.UndoDemoteMasterResponse} UndoDemoteMasterResponse - */ - UndoDemoteMasterResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.UndoDemoteMasterResponse) - return object; - return new $root.tabletmanagerdata.UndoDemoteMasterResponse(); - }; - - /** - * Creates a plain object from an UndoDemoteMasterResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @static - * @param {tabletmanagerdata.UndoDemoteMasterResponse} message UndoDemoteMasterResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UndoDemoteMasterResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UndoDemoteMasterResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.UndoDemoteMasterResponse - * @instance - * @returns {Object.} JSON object - */ - UndoDemoteMasterResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UndoDemoteMasterResponse; - })(); - - tabletmanagerdata.ReplicaWasPromotedRequest = (function() { - - /** - * Properties of a ReplicaWasPromotedRequest. - * @memberof tabletmanagerdata - * @interface IReplicaWasPromotedRequest - */ - - /** - * Constructs a new ReplicaWasPromotedRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a ReplicaWasPromotedRequest. - * @implements IReplicaWasPromotedRequest - * @constructor - * @param {tabletmanagerdata.IReplicaWasPromotedRequest=} [properties] Properties to set - */ - function ReplicaWasPromotedRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReplicaWasPromotedRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {tabletmanagerdata.IReplicaWasPromotedRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ReplicaWasPromotedRequest} ReplicaWasPromotedRequest instance - */ - ReplicaWasPromotedRequest.create = function create(properties) { - return new ReplicaWasPromotedRequest(properties); - }; - - /** - * Encodes the specified ReplicaWasPromotedRequest message. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {tabletmanagerdata.IReplicaWasPromotedRequest} message ReplicaWasPromotedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasPromotedRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReplicaWasPromotedRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {tabletmanagerdata.IReplicaWasPromotedRequest} message ReplicaWasPromotedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasPromotedRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicaWasPromotedRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReplicaWasPromotedRequest} ReplicaWasPromotedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasPromotedRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReplicaWasPromotedRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicaWasPromotedRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReplicaWasPromotedRequest} ReplicaWasPromotedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasPromotedRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicaWasPromotedRequest message. - * @function verify - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicaWasPromotedRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReplicaWasPromotedRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReplicaWasPromotedRequest} ReplicaWasPromotedRequest - */ - ReplicaWasPromotedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReplicaWasPromotedRequest) - return object; - return new $root.tabletmanagerdata.ReplicaWasPromotedRequest(); - }; - - /** - * Creates a plain object from a ReplicaWasPromotedRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @static - * @param {tabletmanagerdata.ReplicaWasPromotedRequest} message ReplicaWasPromotedRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicaWasPromotedRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReplicaWasPromotedRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReplicaWasPromotedRequest - * @instance - * @returns {Object.} JSON object - */ - ReplicaWasPromotedRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicaWasPromotedRequest; - })(); - - tabletmanagerdata.ReplicaWasPromotedResponse = (function() { - - /** - * Properties of a ReplicaWasPromotedResponse. - * @memberof tabletmanagerdata - * @interface IReplicaWasPromotedResponse - */ - - /** - * Constructs a new ReplicaWasPromotedResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a ReplicaWasPromotedResponse. - * @implements IReplicaWasPromotedResponse - * @constructor - * @param {tabletmanagerdata.IReplicaWasPromotedResponse=} [properties] Properties to set - */ - function ReplicaWasPromotedResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReplicaWasPromotedResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {tabletmanagerdata.IReplicaWasPromotedResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ReplicaWasPromotedResponse} ReplicaWasPromotedResponse instance - */ - ReplicaWasPromotedResponse.create = function create(properties) { - return new ReplicaWasPromotedResponse(properties); - }; - - /** - * Encodes the specified ReplicaWasPromotedResponse message. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {tabletmanagerdata.IReplicaWasPromotedResponse} message ReplicaWasPromotedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasPromotedResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReplicaWasPromotedResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasPromotedResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {tabletmanagerdata.IReplicaWasPromotedResponse} message ReplicaWasPromotedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasPromotedResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicaWasPromotedResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReplicaWasPromotedResponse} ReplicaWasPromotedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasPromotedResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReplicaWasPromotedResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicaWasPromotedResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReplicaWasPromotedResponse} ReplicaWasPromotedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasPromotedResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicaWasPromotedResponse message. - * @function verify - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicaWasPromotedResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReplicaWasPromotedResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReplicaWasPromotedResponse} ReplicaWasPromotedResponse - */ - ReplicaWasPromotedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReplicaWasPromotedResponse) - return object; - return new $root.tabletmanagerdata.ReplicaWasPromotedResponse(); - }; - - /** - * Creates a plain object from a ReplicaWasPromotedResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @static - * @param {tabletmanagerdata.ReplicaWasPromotedResponse} message ReplicaWasPromotedResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicaWasPromotedResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReplicaWasPromotedResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReplicaWasPromotedResponse - * @instance - * @returns {Object.} JSON object - */ - ReplicaWasPromotedResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicaWasPromotedResponse; - })(); - - tabletmanagerdata.SetMasterRequest = (function() { - - /** - * Properties of a SetMasterRequest. - * @memberof tabletmanagerdata - * @interface ISetMasterRequest - * @property {topodata.ITabletAlias|null} [parent] SetMasterRequest parent - * @property {number|Long|null} [time_created_ns] SetMasterRequest time_created_ns - * @property {boolean|null} [force_start_replication] SetMasterRequest force_start_replication - * @property {string|null} [wait_position] SetMasterRequest wait_position - */ - - /** - * Constructs a new SetMasterRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a SetMasterRequest. - * @implements ISetMasterRequest - * @constructor - * @param {tabletmanagerdata.ISetMasterRequest=} [properties] Properties to set - */ - function SetMasterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetMasterRequest parent. - * @member {topodata.ITabletAlias|null|undefined} parent - * @memberof tabletmanagerdata.SetMasterRequest - * @instance - */ - SetMasterRequest.prototype.parent = null; - - /** - * SetMasterRequest time_created_ns. - * @member {number|Long} time_created_ns - * @memberof tabletmanagerdata.SetMasterRequest - * @instance - */ - SetMasterRequest.prototype.time_created_ns = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SetMasterRequest force_start_replication. - * @member {boolean} force_start_replication - * @memberof tabletmanagerdata.SetMasterRequest - * @instance - */ - SetMasterRequest.prototype.force_start_replication = false; - - /** - * SetMasterRequest wait_position. - * @member {string} wait_position - * @memberof tabletmanagerdata.SetMasterRequest - * @instance - */ - SetMasterRequest.prototype.wait_position = ""; - - /** - * Creates a new SetMasterRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {tabletmanagerdata.ISetMasterRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.SetMasterRequest} SetMasterRequest instance - */ - SetMasterRequest.create = function create(properties) { - return new SetMasterRequest(properties); - }; - - /** - * Encodes the specified SetMasterRequest message. Does not implicitly {@link tabletmanagerdata.SetMasterRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {tabletmanagerdata.ISetMasterRequest} message SetMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - $root.topodata.TabletAlias.encode(message.parent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.time_created_ns != null && Object.hasOwnProperty.call(message, "time_created_ns")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.time_created_ns); - if (message.force_start_replication != null && Object.hasOwnProperty.call(message, "force_start_replication")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force_start_replication); - if (message.wait_position != null && Object.hasOwnProperty.call(message, "wait_position")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.wait_position); - return writer; - }; - - /** - * Encodes the specified SetMasterRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.SetMasterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {tabletmanagerdata.ISetMasterRequest} message SetMasterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMasterRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SetMasterRequest} SetMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SetMasterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.time_created_ns = reader.int64(); - break; - case 3: - message.force_start_replication = reader.bool(); - break; - case 4: - message.wait_position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMasterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SetMasterRequest} SetMasterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMasterRequest message. - * @function verify - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMasterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) { - var error = $root.topodata.TabletAlias.verify(message.parent); - if (error) - return "parent." + error; - } - if (message.time_created_ns != null && message.hasOwnProperty("time_created_ns")) - if (!$util.isInteger(message.time_created_ns) && !(message.time_created_ns && $util.isInteger(message.time_created_ns.low) && $util.isInteger(message.time_created_ns.high))) - return "time_created_ns: integer|Long expected"; - if (message.force_start_replication != null && message.hasOwnProperty("force_start_replication")) - if (typeof message.force_start_replication !== "boolean") - return "force_start_replication: boolean expected"; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - if (!$util.isString(message.wait_position)) - return "wait_position: string expected"; - return null; - }; - - /** - * Creates a SetMasterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SetMasterRequest} SetMasterRequest - */ - SetMasterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SetMasterRequest) - return object; - var message = new $root.tabletmanagerdata.SetMasterRequest(); - if (object.parent != null) { - if (typeof object.parent !== "object") - throw TypeError(".tabletmanagerdata.SetMasterRequest.parent: object expected"); - message.parent = $root.topodata.TabletAlias.fromObject(object.parent); - } - if (object.time_created_ns != null) - if ($util.Long) - (message.time_created_ns = $util.Long.fromValue(object.time_created_ns)).unsigned = false; - else if (typeof object.time_created_ns === "string") - message.time_created_ns = parseInt(object.time_created_ns, 10); - else if (typeof object.time_created_ns === "number") - message.time_created_ns = object.time_created_ns; - else if (typeof object.time_created_ns === "object") - message.time_created_ns = new $util.LongBits(object.time_created_ns.low >>> 0, object.time_created_ns.high >>> 0).toNumber(); - if (object.force_start_replication != null) - message.force_start_replication = Boolean(object.force_start_replication); - if (object.wait_position != null) - message.wait_position = String(object.wait_position); - return message; - }; - - /** - * Creates a plain object from a SetMasterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SetMasterRequest - * @static - * @param {tabletmanagerdata.SetMasterRequest} message SetMasterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMasterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.time_created_ns = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time_created_ns = options.longs === String ? "0" : 0; - object.force_start_replication = false; - object.wait_position = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = $root.topodata.TabletAlias.toObject(message.parent, options); - if (message.time_created_ns != null && message.hasOwnProperty("time_created_ns")) - if (typeof message.time_created_ns === "number") - object.time_created_ns = options.longs === String ? String(message.time_created_ns) : message.time_created_ns; - else - object.time_created_ns = options.longs === String ? $util.Long.prototype.toString.call(message.time_created_ns) : options.longs === Number ? new $util.LongBits(message.time_created_ns.low >>> 0, message.time_created_ns.high >>> 0).toNumber() : message.time_created_ns; - if (message.force_start_replication != null && message.hasOwnProperty("force_start_replication")) - object.force_start_replication = message.force_start_replication; - if (message.wait_position != null && message.hasOwnProperty("wait_position")) - object.wait_position = message.wait_position; - return object; - }; - - /** - * Converts this SetMasterRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SetMasterRequest - * @instance - * @returns {Object.} JSON object - */ - SetMasterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetMasterRequest; - })(); - - tabletmanagerdata.SetMasterResponse = (function() { - - /** - * Properties of a SetMasterResponse. - * @memberof tabletmanagerdata - * @interface ISetMasterResponse - */ - - /** - * Constructs a new SetMasterResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a SetMasterResponse. - * @implements ISetMasterResponse - * @constructor - * @param {tabletmanagerdata.ISetMasterResponse=} [properties] Properties to set - */ - function SetMasterResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SetMasterResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {tabletmanagerdata.ISetMasterResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.SetMasterResponse} SetMasterResponse instance - */ - SetMasterResponse.create = function create(properties) { - return new SetMasterResponse(properties); - }; - - /** - * Encodes the specified SetMasterResponse message. Does not implicitly {@link tabletmanagerdata.SetMasterResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {tabletmanagerdata.ISetMasterResponse} message SetMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetMasterResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.SetMasterResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {tabletmanagerdata.ISetMasterResponse} message SetMasterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetMasterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetMasterResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.SetMasterResponse} SetMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.SetMasterResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetMasterResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.SetMasterResponse} SetMasterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetMasterResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetMasterResponse message. - * @function verify - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetMasterResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetMasterResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.SetMasterResponse} SetMasterResponse - */ - SetMasterResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.SetMasterResponse) - return object; - return new $root.tabletmanagerdata.SetMasterResponse(); - }; - - /** - * Creates a plain object from a SetMasterResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.SetMasterResponse - * @static - * @param {tabletmanagerdata.SetMasterResponse} message SetMasterResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetMasterResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetMasterResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.SetMasterResponse - * @instance - * @returns {Object.} JSON object - */ - SetMasterResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetMasterResponse; - })(); - - tabletmanagerdata.ReplicaWasRestartedRequest = (function() { - - /** - * Properties of a ReplicaWasRestartedRequest. - * @memberof tabletmanagerdata - * @interface IReplicaWasRestartedRequest - * @property {topodata.ITabletAlias|null} [parent] ReplicaWasRestartedRequest parent - */ - - /** - * Constructs a new ReplicaWasRestartedRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a ReplicaWasRestartedRequest. - * @implements IReplicaWasRestartedRequest - * @constructor - * @param {tabletmanagerdata.IReplicaWasRestartedRequest=} [properties] Properties to set - */ - function ReplicaWasRestartedRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReplicaWasRestartedRequest parent. - * @member {topodata.ITabletAlias|null|undefined} parent - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @instance - */ - ReplicaWasRestartedRequest.prototype.parent = null; - - /** - * Creates a new ReplicaWasRestartedRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {tabletmanagerdata.IReplicaWasRestartedRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.ReplicaWasRestartedRequest} ReplicaWasRestartedRequest instance - */ - ReplicaWasRestartedRequest.create = function create(properties) { - return new ReplicaWasRestartedRequest(properties); - }; - - /** - * Encodes the specified ReplicaWasRestartedRequest message. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {tabletmanagerdata.IReplicaWasRestartedRequest} message ReplicaWasRestartedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasRestartedRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - $root.topodata.TabletAlias.encode(message.parent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReplicaWasRestartedRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {tabletmanagerdata.IReplicaWasRestartedRequest} message ReplicaWasRestartedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasRestartedRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicaWasRestartedRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReplicaWasRestartedRequest} ReplicaWasRestartedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasRestartedRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReplicaWasRestartedRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicaWasRestartedRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReplicaWasRestartedRequest} ReplicaWasRestartedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasRestartedRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicaWasRestartedRequest message. - * @function verify - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicaWasRestartedRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) { - var error = $root.topodata.TabletAlias.verify(message.parent); - if (error) - return "parent." + error; - } - return null; - }; - - /** - * Creates a ReplicaWasRestartedRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReplicaWasRestartedRequest} ReplicaWasRestartedRequest - */ - ReplicaWasRestartedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReplicaWasRestartedRequest) - return object; - var message = new $root.tabletmanagerdata.ReplicaWasRestartedRequest(); - if (object.parent != null) { - if (typeof object.parent !== "object") - throw TypeError(".tabletmanagerdata.ReplicaWasRestartedRequest.parent: object expected"); - message.parent = $root.topodata.TabletAlias.fromObject(object.parent); - } - return message; - }; - - /** - * Creates a plain object from a ReplicaWasRestartedRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @static - * @param {tabletmanagerdata.ReplicaWasRestartedRequest} message ReplicaWasRestartedRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicaWasRestartedRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = null; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = $root.topodata.TabletAlias.toObject(message.parent, options); - return object; - }; - - /** - * Converts this ReplicaWasRestartedRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReplicaWasRestartedRequest - * @instance - * @returns {Object.} JSON object - */ - ReplicaWasRestartedRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicaWasRestartedRequest; - })(); - - tabletmanagerdata.ReplicaWasRestartedResponse = (function() { - - /** - * Properties of a ReplicaWasRestartedResponse. - * @memberof tabletmanagerdata - * @interface IReplicaWasRestartedResponse - */ - - /** - * Constructs a new ReplicaWasRestartedResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a ReplicaWasRestartedResponse. - * @implements IReplicaWasRestartedResponse - * @constructor - * @param {tabletmanagerdata.IReplicaWasRestartedResponse=} [properties] Properties to set - */ - function ReplicaWasRestartedResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReplicaWasRestartedResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {tabletmanagerdata.IReplicaWasRestartedResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.ReplicaWasRestartedResponse} ReplicaWasRestartedResponse instance - */ - ReplicaWasRestartedResponse.create = function create(properties) { - return new ReplicaWasRestartedResponse(properties); - }; - - /** - * Encodes the specified ReplicaWasRestartedResponse message. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {tabletmanagerdata.IReplicaWasRestartedResponse} message ReplicaWasRestartedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasRestartedResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReplicaWasRestartedResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.ReplicaWasRestartedResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {tabletmanagerdata.IReplicaWasRestartedResponse} message ReplicaWasRestartedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicaWasRestartedResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicaWasRestartedResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.ReplicaWasRestartedResponse} ReplicaWasRestartedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasRestartedResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.ReplicaWasRestartedResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicaWasRestartedResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.ReplicaWasRestartedResponse} ReplicaWasRestartedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicaWasRestartedResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicaWasRestartedResponse message. - * @function verify - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicaWasRestartedResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReplicaWasRestartedResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.ReplicaWasRestartedResponse} ReplicaWasRestartedResponse - */ - ReplicaWasRestartedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.ReplicaWasRestartedResponse) - return object; - return new $root.tabletmanagerdata.ReplicaWasRestartedResponse(); - }; - - /** - * Creates a plain object from a ReplicaWasRestartedResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @static - * @param {tabletmanagerdata.ReplicaWasRestartedResponse} message ReplicaWasRestartedResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicaWasRestartedResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReplicaWasRestartedResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.ReplicaWasRestartedResponse - * @instance - * @returns {Object.} JSON object - */ - ReplicaWasRestartedResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicaWasRestartedResponse; - })(); - - tabletmanagerdata.StopReplicationAndGetStatusRequest = (function() { - - /** - * Properties of a StopReplicationAndGetStatusRequest. - * @memberof tabletmanagerdata - * @interface IStopReplicationAndGetStatusRequest - * @property {replicationdata.StopReplicationMode|null} [stop_replication_mode] StopReplicationAndGetStatusRequest stop_replication_mode - */ - - /** - * Constructs a new StopReplicationAndGetStatusRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a StopReplicationAndGetStatusRequest. - * @implements IStopReplicationAndGetStatusRequest - * @constructor - * @param {tabletmanagerdata.IStopReplicationAndGetStatusRequest=} [properties] Properties to set - */ - function StopReplicationAndGetStatusRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopReplicationAndGetStatusRequest stop_replication_mode. - * @member {replicationdata.StopReplicationMode} stop_replication_mode - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @instance - */ - StopReplicationAndGetStatusRequest.prototype.stop_replication_mode = 0; - - /** - * Creates a new StopReplicationAndGetStatusRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {tabletmanagerdata.IStopReplicationAndGetStatusRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.StopReplicationAndGetStatusRequest} StopReplicationAndGetStatusRequest instance - */ - StopReplicationAndGetStatusRequest.create = function create(properties) { - return new StopReplicationAndGetStatusRequest(properties); - }; - - /** - * Encodes the specified StopReplicationAndGetStatusRequest message. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {tabletmanagerdata.IStopReplicationAndGetStatusRequest} message StopReplicationAndGetStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationAndGetStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stop_replication_mode != null && Object.hasOwnProperty.call(message, "stop_replication_mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.stop_replication_mode); - return writer; - }; - - /** - * Encodes the specified StopReplicationAndGetStatusRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {tabletmanagerdata.IStopReplicationAndGetStatusRequest} message StopReplicationAndGetStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationAndGetStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationAndGetStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StopReplicationAndGetStatusRequest} StopReplicationAndGetStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationAndGetStatusRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StopReplicationAndGetStatusRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stop_replication_mode = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationAndGetStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StopReplicationAndGetStatusRequest} StopReplicationAndGetStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationAndGetStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationAndGetStatusRequest message. - * @function verify - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationAndGetStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stop_replication_mode != null && message.hasOwnProperty("stop_replication_mode")) - switch (message.stop_replication_mode) { - default: - return "stop_replication_mode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a StopReplicationAndGetStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StopReplicationAndGetStatusRequest} StopReplicationAndGetStatusRequest - */ - StopReplicationAndGetStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StopReplicationAndGetStatusRequest) - return object; - var message = new $root.tabletmanagerdata.StopReplicationAndGetStatusRequest(); - switch (object.stop_replication_mode) { - case "IOANDSQLTHREAD": - case 0: - message.stop_replication_mode = 0; - break; - case "IOTHREADONLY": - case 1: - message.stop_replication_mode = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a StopReplicationAndGetStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @static - * @param {tabletmanagerdata.StopReplicationAndGetStatusRequest} message StopReplicationAndGetStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationAndGetStatusRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.stop_replication_mode = options.enums === String ? "IOANDSQLTHREAD" : 0; - if (message.stop_replication_mode != null && message.hasOwnProperty("stop_replication_mode")) - object.stop_replication_mode = options.enums === String ? $root.replicationdata.StopReplicationMode[message.stop_replication_mode] : message.stop_replication_mode; - return object; - }; - - /** - * Converts this StopReplicationAndGetStatusRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StopReplicationAndGetStatusRequest - * @instance - * @returns {Object.} JSON object - */ - StopReplicationAndGetStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationAndGetStatusRequest; - })(); - - tabletmanagerdata.StopReplicationAndGetStatusResponse = (function() { - - /** - * Properties of a StopReplicationAndGetStatusResponse. - * @memberof tabletmanagerdata - * @interface IStopReplicationAndGetStatusResponse - * @property {replicationdata.IStatus|null} [hybrid_status] StopReplicationAndGetStatusResponse hybrid_status - * @property {replicationdata.IStopReplicationStatus|null} [status] StopReplicationAndGetStatusResponse status - */ - - /** - * Constructs a new StopReplicationAndGetStatusResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a StopReplicationAndGetStatusResponse. - * @implements IStopReplicationAndGetStatusResponse - * @constructor - * @param {tabletmanagerdata.IStopReplicationAndGetStatusResponse=} [properties] Properties to set - */ - function StopReplicationAndGetStatusResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopReplicationAndGetStatusResponse hybrid_status. - * @member {replicationdata.IStatus|null|undefined} hybrid_status - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @instance - */ - StopReplicationAndGetStatusResponse.prototype.hybrid_status = null; - - /** - * StopReplicationAndGetStatusResponse status. - * @member {replicationdata.IStopReplicationStatus|null|undefined} status - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @instance - */ - StopReplicationAndGetStatusResponse.prototype.status = null; - - /** - * Creates a new StopReplicationAndGetStatusResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {tabletmanagerdata.IStopReplicationAndGetStatusResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.StopReplicationAndGetStatusResponse} StopReplicationAndGetStatusResponse instance - */ - StopReplicationAndGetStatusResponse.create = function create(properties) { - return new StopReplicationAndGetStatusResponse(properties); - }; - - /** - * Encodes the specified StopReplicationAndGetStatusResponse message. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {tabletmanagerdata.IStopReplicationAndGetStatusResponse} message StopReplicationAndGetStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationAndGetStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hybrid_status != null && Object.hasOwnProperty.call(message, "hybrid_status")) - $root.replicationdata.Status.encode(message.hybrid_status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.replicationdata.StopReplicationStatus.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StopReplicationAndGetStatusResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.StopReplicationAndGetStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {tabletmanagerdata.IStopReplicationAndGetStatusResponse} message StopReplicationAndGetStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationAndGetStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationAndGetStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.StopReplicationAndGetStatusResponse} StopReplicationAndGetStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationAndGetStatusResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.StopReplicationAndGetStatusResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hybrid_status = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - case 2: - message.status = $root.replicationdata.StopReplicationStatus.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationAndGetStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.StopReplicationAndGetStatusResponse} StopReplicationAndGetStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationAndGetStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationAndGetStatusResponse message. - * @function verify - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationAndGetStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hybrid_status != null && message.hasOwnProperty("hybrid_status")) { - var error = $root.replicationdata.Status.verify(message.hybrid_status); - if (error) - return "hybrid_status." + error; - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.replicationdata.StopReplicationStatus.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a StopReplicationAndGetStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.StopReplicationAndGetStatusResponse} StopReplicationAndGetStatusResponse - */ - StopReplicationAndGetStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.StopReplicationAndGetStatusResponse) - return object; - var message = new $root.tabletmanagerdata.StopReplicationAndGetStatusResponse(); - if (object.hybrid_status != null) { - if (typeof object.hybrid_status !== "object") - throw TypeError(".tabletmanagerdata.StopReplicationAndGetStatusResponse.hybrid_status: object expected"); - message.hybrid_status = $root.replicationdata.Status.fromObject(object.hybrid_status); - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".tabletmanagerdata.StopReplicationAndGetStatusResponse.status: object expected"); - message.status = $root.replicationdata.StopReplicationStatus.fromObject(object.status); - } - return message; - }; - - /** - * Creates a plain object from a StopReplicationAndGetStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @static - * @param {tabletmanagerdata.StopReplicationAndGetStatusResponse} message StopReplicationAndGetStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationAndGetStatusResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hybrid_status = null; - object.status = null; - } - if (message.hybrid_status != null && message.hasOwnProperty("hybrid_status")) - object.hybrid_status = $root.replicationdata.Status.toObject(message.hybrid_status, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.replicationdata.StopReplicationStatus.toObject(message.status, options); - return object; - }; - - /** - * Converts this StopReplicationAndGetStatusResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.StopReplicationAndGetStatusResponse - * @instance - * @returns {Object.} JSON object - */ - StopReplicationAndGetStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationAndGetStatusResponse; - })(); - - tabletmanagerdata.PromoteReplicaRequest = (function() { - - /** - * Properties of a PromoteReplicaRequest. - * @memberof tabletmanagerdata - * @interface IPromoteReplicaRequest - */ - - /** - * Constructs a new PromoteReplicaRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a PromoteReplicaRequest. - * @implements IPromoteReplicaRequest - * @constructor - * @param {tabletmanagerdata.IPromoteReplicaRequest=} [properties] Properties to set - */ - function PromoteReplicaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new PromoteReplicaRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {tabletmanagerdata.IPromoteReplicaRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.PromoteReplicaRequest} PromoteReplicaRequest instance - */ - PromoteReplicaRequest.create = function create(properties) { - return new PromoteReplicaRequest(properties); - }; - - /** - * Encodes the specified PromoteReplicaRequest message. Does not implicitly {@link tabletmanagerdata.PromoteReplicaRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {tabletmanagerdata.IPromoteReplicaRequest} message PromoteReplicaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PromoteReplicaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PromoteReplicaRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.PromoteReplicaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {tabletmanagerdata.IPromoteReplicaRequest} message PromoteReplicaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PromoteReplicaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PromoteReplicaRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PromoteReplicaRequest} PromoteReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PromoteReplicaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PromoteReplicaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PromoteReplicaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PromoteReplicaRequest} PromoteReplicaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PromoteReplicaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PromoteReplicaRequest message. - * @function verify - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PromoteReplicaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PromoteReplicaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PromoteReplicaRequest} PromoteReplicaRequest - */ - PromoteReplicaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PromoteReplicaRequest) - return object; - return new $root.tabletmanagerdata.PromoteReplicaRequest(); - }; - - /** - * Creates a plain object from a PromoteReplicaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @static - * @param {tabletmanagerdata.PromoteReplicaRequest} message PromoteReplicaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PromoteReplicaRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PromoteReplicaRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PromoteReplicaRequest - * @instance - * @returns {Object.} JSON object - */ - PromoteReplicaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PromoteReplicaRequest; - })(); - - tabletmanagerdata.PromoteReplicaResponse = (function() { - - /** - * Properties of a PromoteReplicaResponse. - * @memberof tabletmanagerdata - * @interface IPromoteReplicaResponse - * @property {string|null} [position] PromoteReplicaResponse position - */ - - /** - * Constructs a new PromoteReplicaResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a PromoteReplicaResponse. - * @implements IPromoteReplicaResponse - * @constructor - * @param {tabletmanagerdata.IPromoteReplicaResponse=} [properties] Properties to set - */ - function PromoteReplicaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PromoteReplicaResponse position. - * @member {string} position - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @instance - */ - PromoteReplicaResponse.prototype.position = ""; - - /** - * Creates a new PromoteReplicaResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {tabletmanagerdata.IPromoteReplicaResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.PromoteReplicaResponse} PromoteReplicaResponse instance - */ - PromoteReplicaResponse.create = function create(properties) { - return new PromoteReplicaResponse(properties); - }; - - /** - * Encodes the specified PromoteReplicaResponse message. Does not implicitly {@link tabletmanagerdata.PromoteReplicaResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {tabletmanagerdata.IPromoteReplicaResponse} message PromoteReplicaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PromoteReplicaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - return writer; - }; - - /** - * Encodes the specified PromoteReplicaResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.PromoteReplicaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {tabletmanagerdata.IPromoteReplicaResponse} message PromoteReplicaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PromoteReplicaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PromoteReplicaResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.PromoteReplicaResponse} PromoteReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PromoteReplicaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.PromoteReplicaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PromoteReplicaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.PromoteReplicaResponse} PromoteReplicaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PromoteReplicaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PromoteReplicaResponse message. - * @function verify - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PromoteReplicaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates a PromoteReplicaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.PromoteReplicaResponse} PromoteReplicaResponse - */ - PromoteReplicaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.PromoteReplicaResponse) - return object; - var message = new $root.tabletmanagerdata.PromoteReplicaResponse(); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from a PromoteReplicaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @static - * @param {tabletmanagerdata.PromoteReplicaResponse} message PromoteReplicaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PromoteReplicaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.position = ""; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this PromoteReplicaResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.PromoteReplicaResponse - * @instance - * @returns {Object.} JSON object - */ - PromoteReplicaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PromoteReplicaResponse; - })(); - - tabletmanagerdata.BackupRequest = (function() { - - /** - * Properties of a BackupRequest. - * @memberof tabletmanagerdata - * @interface IBackupRequest - * @property {number|Long|null} [concurrency] BackupRequest concurrency - * @property {boolean|null} [allowMaster] BackupRequest allowMaster - */ - - /** - * Constructs a new BackupRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a BackupRequest. - * @implements IBackupRequest - * @constructor - * @param {tabletmanagerdata.IBackupRequest=} [properties] Properties to set - */ - function BackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupRequest concurrency. - * @member {number|Long} concurrency - * @memberof tabletmanagerdata.BackupRequest - * @instance - */ - BackupRequest.prototype.concurrency = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupRequest allowMaster. - * @member {boolean} allowMaster - * @memberof tabletmanagerdata.BackupRequest - * @instance - */ - BackupRequest.prototype.allowMaster = false; - - /** - * Creates a new BackupRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {tabletmanagerdata.IBackupRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.BackupRequest} BackupRequest instance - */ - BackupRequest.create = function create(properties) { - return new BackupRequest(properties); - }; - - /** - * Encodes the specified BackupRequest message. Does not implicitly {@link tabletmanagerdata.BackupRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {tabletmanagerdata.IBackupRequest} message BackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.concurrency != null && Object.hasOwnProperty.call(message, "concurrency")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.concurrency); - if (message.allowMaster != null && Object.hasOwnProperty.call(message, "allowMaster")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowMaster); - return writer; - }; - - /** - * Encodes the specified BackupRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.BackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {tabletmanagerdata.IBackupRequest} message BackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.BackupRequest} BackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.BackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.concurrency = reader.int64(); - break; - case 2: - message.allowMaster = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.BackupRequest} BackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupRequest message. - * @function verify - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (!$util.isInteger(message.concurrency) && !(message.concurrency && $util.isInteger(message.concurrency.low) && $util.isInteger(message.concurrency.high))) - return "concurrency: integer|Long expected"; - if (message.allowMaster != null && message.hasOwnProperty("allowMaster")) - if (typeof message.allowMaster !== "boolean") - return "allowMaster: boolean expected"; - return null; - }; - - /** - * Creates a BackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.BackupRequest} BackupRequest - */ - BackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.BackupRequest) - return object; - var message = new $root.tabletmanagerdata.BackupRequest(); - if (object.concurrency != null) - if ($util.Long) - (message.concurrency = $util.Long.fromValue(object.concurrency)).unsigned = false; - else if (typeof object.concurrency === "string") - message.concurrency = parseInt(object.concurrency, 10); - else if (typeof object.concurrency === "number") - message.concurrency = object.concurrency; - else if (typeof object.concurrency === "object") - message.concurrency = new $util.LongBits(object.concurrency.low >>> 0, object.concurrency.high >>> 0).toNumber(); - if (object.allowMaster != null) - message.allowMaster = Boolean(object.allowMaster); - return message; - }; - - /** - * Creates a plain object from a BackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.BackupRequest - * @static - * @param {tabletmanagerdata.BackupRequest} message BackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.concurrency = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.concurrency = options.longs === String ? "0" : 0; - object.allowMaster = false; - } - if (message.concurrency != null && message.hasOwnProperty("concurrency")) - if (typeof message.concurrency === "number") - object.concurrency = options.longs === String ? String(message.concurrency) : message.concurrency; - else - object.concurrency = options.longs === String ? $util.Long.prototype.toString.call(message.concurrency) : options.longs === Number ? new $util.LongBits(message.concurrency.low >>> 0, message.concurrency.high >>> 0).toNumber() : message.concurrency; - if (message.allowMaster != null && message.hasOwnProperty("allowMaster")) - object.allowMaster = message.allowMaster; - return object; - }; - - /** - * Converts this BackupRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.BackupRequest - * @instance - * @returns {Object.} JSON object - */ - BackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BackupRequest; - })(); - - tabletmanagerdata.BackupResponse = (function() { - - /** - * Properties of a BackupResponse. - * @memberof tabletmanagerdata - * @interface IBackupResponse - * @property {logutil.IEvent|null} [event] BackupResponse event - */ - - /** - * Constructs a new BackupResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a BackupResponse. - * @implements IBackupResponse - * @constructor - * @param {tabletmanagerdata.IBackupResponse=} [properties] Properties to set - */ - function BackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupResponse event. - * @member {logutil.IEvent|null|undefined} event - * @memberof tabletmanagerdata.BackupResponse - * @instance - */ - BackupResponse.prototype.event = null; - - /** - * Creates a new BackupResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {tabletmanagerdata.IBackupResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.BackupResponse} BackupResponse instance - */ - BackupResponse.create = function create(properties) { - return new BackupResponse(properties); - }; - - /** - * Encodes the specified BackupResponse message. Does not implicitly {@link tabletmanagerdata.BackupResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {tabletmanagerdata.IBackupResponse} message BackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.logutil.Event.encode(message.event, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.BackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {tabletmanagerdata.IBackupResponse} message BackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.BackupResponse} BackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.BackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event = $root.logutil.Event.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.BackupResponse} BackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupResponse message. - * @function verify - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.logutil.Event.verify(message.event); - if (error) - return "event." + error; - } - return null; - }; - - /** - * Creates a BackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.BackupResponse} BackupResponse - */ - BackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.BackupResponse) - return object; - var message = new $root.tabletmanagerdata.BackupResponse(); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".tabletmanagerdata.BackupResponse.event: object expected"); - message.event = $root.logutil.Event.fromObject(object.event); - } - return message; - }; - - /** - * Creates a plain object from a BackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.BackupResponse - * @static - * @param {tabletmanagerdata.BackupResponse} message BackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.event = null; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.logutil.Event.toObject(message.event, options); - return object; - }; - - /** - * Converts this BackupResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.BackupResponse - * @instance - * @returns {Object.} JSON object - */ - BackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BackupResponse; - })(); - - tabletmanagerdata.RestoreFromBackupRequest = (function() { - - /** - * Properties of a RestoreFromBackupRequest. - * @memberof tabletmanagerdata - * @interface IRestoreFromBackupRequest - */ - - /** - * Constructs a new RestoreFromBackupRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a RestoreFromBackupRequest. - * @implements IRestoreFromBackupRequest - * @constructor - * @param {tabletmanagerdata.IRestoreFromBackupRequest=} [properties] Properties to set - */ - function RestoreFromBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RestoreFromBackupRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {tabletmanagerdata.IRestoreFromBackupRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.RestoreFromBackupRequest} RestoreFromBackupRequest instance - */ - RestoreFromBackupRequest.create = function create(properties) { - return new RestoreFromBackupRequest(properties); - }; - - /** - * Encodes the specified RestoreFromBackupRequest message. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {tabletmanagerdata.IRestoreFromBackupRequest} message RestoreFromBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreFromBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RestoreFromBackupRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {tabletmanagerdata.IRestoreFromBackupRequest} message RestoreFromBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreFromBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.RestoreFromBackupRequest} RestoreFromBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreFromBackupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.RestoreFromBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreFromBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.RestoreFromBackupRequest} RestoreFromBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreFromBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreFromBackupRequest message. - * @function verify - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreFromBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RestoreFromBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.RestoreFromBackupRequest} RestoreFromBackupRequest - */ - RestoreFromBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.RestoreFromBackupRequest) - return object; - return new $root.tabletmanagerdata.RestoreFromBackupRequest(); - }; - - /** - * Creates a plain object from a RestoreFromBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @static - * @param {tabletmanagerdata.RestoreFromBackupRequest} message RestoreFromBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreFromBackupRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RestoreFromBackupRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.RestoreFromBackupRequest - * @instance - * @returns {Object.} JSON object - */ - RestoreFromBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RestoreFromBackupRequest; - })(); - - tabletmanagerdata.RestoreFromBackupResponse = (function() { - - /** - * Properties of a RestoreFromBackupResponse. - * @memberof tabletmanagerdata - * @interface IRestoreFromBackupResponse - * @property {logutil.IEvent|null} [event] RestoreFromBackupResponse event - */ - - /** - * Constructs a new RestoreFromBackupResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a RestoreFromBackupResponse. - * @implements IRestoreFromBackupResponse - * @constructor - * @param {tabletmanagerdata.IRestoreFromBackupResponse=} [properties] Properties to set - */ - function RestoreFromBackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreFromBackupResponse event. - * @member {logutil.IEvent|null|undefined} event - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @instance - */ - RestoreFromBackupResponse.prototype.event = null; - - /** - * Creates a new RestoreFromBackupResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {tabletmanagerdata.IRestoreFromBackupResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.RestoreFromBackupResponse} RestoreFromBackupResponse instance - */ - RestoreFromBackupResponse.create = function create(properties) { - return new RestoreFromBackupResponse(properties); - }; - - /** - * Encodes the specified RestoreFromBackupResponse message. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {tabletmanagerdata.IRestoreFromBackupResponse} message RestoreFromBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreFromBackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.logutil.Event.encode(message.event, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreFromBackupResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.RestoreFromBackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {tabletmanagerdata.IRestoreFromBackupResponse} message RestoreFromBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreFromBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.RestoreFromBackupResponse} RestoreFromBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreFromBackupResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.RestoreFromBackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event = $root.logutil.Event.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreFromBackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.RestoreFromBackupResponse} RestoreFromBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreFromBackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreFromBackupResponse message. - * @function verify - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreFromBackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.logutil.Event.verify(message.event); - if (error) - return "event." + error; - } - return null; - }; - - /** - * Creates a RestoreFromBackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.RestoreFromBackupResponse} RestoreFromBackupResponse - */ - RestoreFromBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.RestoreFromBackupResponse) - return object; - var message = new $root.tabletmanagerdata.RestoreFromBackupResponse(); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".tabletmanagerdata.RestoreFromBackupResponse.event: object expected"); - message.event = $root.logutil.Event.fromObject(object.event); - } - return message; - }; - - /** - * Creates a plain object from a RestoreFromBackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @static - * @param {tabletmanagerdata.RestoreFromBackupResponse} message RestoreFromBackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreFromBackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.event = null; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.logutil.Event.toObject(message.event, options); - return object; - }; - - /** - * Converts this RestoreFromBackupResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.RestoreFromBackupResponse - * @instance - * @returns {Object.} JSON object - */ - RestoreFromBackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RestoreFromBackupResponse; - })(); - - tabletmanagerdata.VExecRequest = (function() { - - /** - * Properties of a VExecRequest. - * @memberof tabletmanagerdata - * @interface IVExecRequest - * @property {string|null} [query] VExecRequest query - * @property {string|null} [workflow] VExecRequest workflow - * @property {string|null} [keyspace] VExecRequest keyspace - */ - - /** - * Constructs a new VExecRequest. - * @memberof tabletmanagerdata - * @classdesc Represents a VExecRequest. - * @implements IVExecRequest - * @constructor - * @param {tabletmanagerdata.IVExecRequest=} [properties] Properties to set - */ - function VExecRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VExecRequest query. - * @member {string} query - * @memberof tabletmanagerdata.VExecRequest - * @instance - */ - VExecRequest.prototype.query = ""; - - /** - * VExecRequest workflow. - * @member {string} workflow - * @memberof tabletmanagerdata.VExecRequest - * @instance - */ - VExecRequest.prototype.workflow = ""; - - /** - * VExecRequest keyspace. - * @member {string} keyspace - * @memberof tabletmanagerdata.VExecRequest - * @instance - */ - VExecRequest.prototype.keyspace = ""; - - /** - * Creates a new VExecRequest instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.IVExecRequest=} [properties] Properties to set - * @returns {tabletmanagerdata.VExecRequest} VExecRequest instance - */ - VExecRequest.create = function create(properties) { - return new VExecRequest(properties); - }; - - /** - * Encodes the specified VExecRequest message. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.IVExecRequest} message VExecRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.workflow); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified VExecRequest message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.IVExecRequest} message VExecRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VExecRequest message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VExecRequest} VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VExecRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.string(); - break; - case 2: - message.workflow = reader.string(); - break; - case 3: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VExecRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VExecRequest} VExecRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VExecRequest message. - * @function verify - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VExecRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.workflow != null && message.hasOwnProperty("workflow")) - if (!$util.isString(message.workflow)) - return "workflow: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a VExecRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VExecRequest} VExecRequest - */ - VExecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VExecRequest) - return object; - var message = new $root.tabletmanagerdata.VExecRequest(); - if (object.query != null) - message.query = String(object.query); - if (object.workflow != null) - message.workflow = String(object.workflow); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a VExecRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VExecRequest - * @static - * @param {tabletmanagerdata.VExecRequest} message VExecRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VExecRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.query = ""; - object.workflow = ""; - object.keyspace = ""; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.workflow != null && message.hasOwnProperty("workflow")) - object.workflow = message.workflow; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this VExecRequest to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VExecRequest - * @instance - * @returns {Object.} JSON object - */ - VExecRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VExecRequest; - })(); - - tabletmanagerdata.VExecResponse = (function() { - - /** - * Properties of a VExecResponse. - * @memberof tabletmanagerdata - * @interface IVExecResponse - * @property {query.IQueryResult|null} [result] VExecResponse result - */ - - /** - * Constructs a new VExecResponse. - * @memberof tabletmanagerdata - * @classdesc Represents a VExecResponse. - * @implements IVExecResponse - * @constructor - * @param {tabletmanagerdata.IVExecResponse=} [properties] Properties to set - */ - function VExecResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VExecResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof tabletmanagerdata.VExecResponse - * @instance - */ - VExecResponse.prototype.result = null; - - /** - * Creates a new VExecResponse instance using the specified properties. - * @function create - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.IVExecResponse=} [properties] Properties to set - * @returns {tabletmanagerdata.VExecResponse} VExecResponse instance - */ - VExecResponse.create = function create(properties) { - return new VExecResponse(properties); - }; - - /** - * Encodes the specified VExecResponse message. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @function encode - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.IVExecResponse} message VExecResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VExecResponse message, length delimited. Does not implicitly {@link tabletmanagerdata.VExecResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.IVExecResponse} message VExecResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VExecResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VExecResponse message from the specified reader or buffer. - * @function decode - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tabletmanagerdata.VExecResponse} VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tabletmanagerdata.VExecResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VExecResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tabletmanagerdata.VExecResponse} VExecResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VExecResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VExecResponse message. - * @function verify - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VExecResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a VExecResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {Object.} object Plain object - * @returns {tabletmanagerdata.VExecResponse} VExecResponse - */ - VExecResponse.fromObject = function fromObject(object) { - if (object instanceof $root.tabletmanagerdata.VExecResponse) - return object; - var message = new $root.tabletmanagerdata.VExecResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tabletmanagerdata.VExecResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a VExecResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof tabletmanagerdata.VExecResponse - * @static - * @param {tabletmanagerdata.VExecResponse} message VExecResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VExecResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this VExecResponse to JSON. - * @function toJSON - * @memberof tabletmanagerdata.VExecResponse - * @instance - * @returns {Object.} JSON object - */ - VExecResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VExecResponse; - })(); - - return tabletmanagerdata; -})(); - -$root.query = (function() { - - /** - * Namespace query. - * @exports query - * @namespace - */ - var query = {}; - - query.Target = (function() { - - /** - * Properties of a Target. - * @memberof query - * @interface ITarget - * @property {string|null} [keyspace] Target keyspace - * @property {string|null} [shard] Target shard - * @property {topodata.TabletType|null} [tablet_type] Target tablet_type - * @property {string|null} [cell] Target cell - */ - - /** - * Constructs a new Target. - * @memberof query - * @classdesc Represents a Target. - * @implements ITarget - * @constructor - * @param {query.ITarget=} [properties] Properties to set - */ - function Target(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Target keyspace. - * @member {string} keyspace - * @memberof query.Target - * @instance - */ - Target.prototype.keyspace = ""; - - /** - * Target shard. - * @member {string} shard - * @memberof query.Target - * @instance - */ - Target.prototype.shard = ""; - - /** - * Target tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof query.Target - * @instance - */ - Target.prototype.tablet_type = 0; - - /** - * Target cell. - * @member {string} cell - * @memberof query.Target - * @instance - */ - Target.prototype.cell = ""; - - /** - * Creates a new Target instance using the specified properties. - * @function create - * @memberof query.Target - * @static - * @param {query.ITarget=} [properties] Properties to set - * @returns {query.Target} Target instance - */ - Target.create = function create(properties) { - return new Target(properties); - }; - - /** - * Encodes the specified Target message. Does not implicitly {@link query.Target.verify|verify} messages. - * @function encode - * @memberof query.Target - * @static - * @param {query.ITarget} message Target message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Target.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cell); - return writer; - }; - - /** - * Encodes the specified Target message, length delimited. Does not implicitly {@link query.Target.verify|verify} messages. - * @function encodeDelimited - * @memberof query.Target - * @static - * @param {query.ITarget} message Target message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Target.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Target message from the specified reader or buffer. - * @function decode - * @memberof query.Target - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.Target} Target - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Target.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Target(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.tablet_type = reader.int32(); - break; - case 4: - message.cell = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Target message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.Target - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Target} Target - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Target.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Target message. - * @function verify - * @memberof query.Target - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Target.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - return null; - }; - - /** - * Creates a Target message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.Target - * @static - * @param {Object.} object Plain object - * @returns {query.Target} Target - */ - Target.fromObject = function fromObject(object) { - if (object instanceof $root.query.Target) - return object; - var message = new $root.query.Target(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.cell != null) - message.cell = String(object.cell); - return message; - }; - - /** - * Creates a plain object from a Target message. Also converts values to other types if specified. - * @function toObject - * @memberof query.Target - * @static - * @param {query.Target} message Target - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Target.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.cell = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - return object; - }; - - /** - * Converts this Target to JSON. - * @function toJSON - * @memberof query.Target - * @instance - * @returns {Object.} JSON object - */ - Target.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Target; - })(); - - query.VTGateCallerID = (function() { - - /** - * Properties of a VTGateCallerID. - * @memberof query - * @interface IVTGateCallerID - * @property {string|null} [username] VTGateCallerID username - * @property {Array.|null} [groups] VTGateCallerID groups - */ - - /** - * Constructs a new VTGateCallerID. - * @memberof query - * @classdesc Represents a VTGateCallerID. - * @implements IVTGateCallerID - * @constructor - * @param {query.IVTGateCallerID=} [properties] Properties to set - */ - function VTGateCallerID(properties) { - this.groups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VTGateCallerID username. - * @member {string} username - * @memberof query.VTGateCallerID - * @instance - */ - VTGateCallerID.prototype.username = ""; - - /** - * VTGateCallerID groups. - * @member {Array.} groups - * @memberof query.VTGateCallerID - * @instance - */ - VTGateCallerID.prototype.groups = $util.emptyArray; - - /** - * Creates a new VTGateCallerID instance using the specified properties. - * @function create - * @memberof query.VTGateCallerID - * @static - * @param {query.IVTGateCallerID=} [properties] Properties to set - * @returns {query.VTGateCallerID} VTGateCallerID instance - */ - VTGateCallerID.create = function create(properties) { - return new VTGateCallerID(properties); - }; - - /** - * Encodes the specified VTGateCallerID message. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. - * @function encode - * @memberof query.VTGateCallerID - * @static - * @param {query.IVTGateCallerID} message VTGateCallerID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VTGateCallerID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.groups != null && message.groups.length) - for (var i = 0; i < message.groups.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.groups[i]); - return writer; - }; - - /** - * Encodes the specified VTGateCallerID message, length delimited. Does not implicitly {@link query.VTGateCallerID.verify|verify} messages. - * @function encodeDelimited - * @memberof query.VTGateCallerID - * @static - * @param {query.IVTGateCallerID} message VTGateCallerID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VTGateCallerID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VTGateCallerID message from the specified reader or buffer. - * @function decode - * @memberof query.VTGateCallerID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.VTGateCallerID} VTGateCallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VTGateCallerID.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.VTGateCallerID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.username = reader.string(); - break; - case 2: - if (!(message.groups && message.groups.length)) - message.groups = []; - message.groups.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VTGateCallerID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.VTGateCallerID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.VTGateCallerID} VTGateCallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VTGateCallerID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VTGateCallerID message. - * @function verify - * @memberof query.VTGateCallerID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VTGateCallerID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.groups != null && message.hasOwnProperty("groups")) { - if (!Array.isArray(message.groups)) - return "groups: array expected"; - for (var i = 0; i < message.groups.length; ++i) - if (!$util.isString(message.groups[i])) - return "groups: string[] expected"; - } - return null; - }; - - /** - * Creates a VTGateCallerID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.VTGateCallerID - * @static - * @param {Object.} object Plain object - * @returns {query.VTGateCallerID} VTGateCallerID - */ - VTGateCallerID.fromObject = function fromObject(object) { - if (object instanceof $root.query.VTGateCallerID) - return object; - var message = new $root.query.VTGateCallerID(); - if (object.username != null) - message.username = String(object.username); - if (object.groups) { - if (!Array.isArray(object.groups)) - throw TypeError(".query.VTGateCallerID.groups: array expected"); - message.groups = []; - for (var i = 0; i < object.groups.length; ++i) - message.groups[i] = String(object.groups[i]); - } - return message; - }; - - /** - * Creates a plain object from a VTGateCallerID message. Also converts values to other types if specified. - * @function toObject - * @memberof query.VTGateCallerID - * @static - * @param {query.VTGateCallerID} message VTGateCallerID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VTGateCallerID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.groups = []; - if (options.defaults) - object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.groups && message.groups.length) { - object.groups = []; - for (var j = 0; j < message.groups.length; ++j) - object.groups[j] = message.groups[j]; - } - return object; - }; - - /** - * Converts this VTGateCallerID to JSON. - * @function toJSON - * @memberof query.VTGateCallerID - * @instance - * @returns {Object.} JSON object - */ - VTGateCallerID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VTGateCallerID; - })(); - - query.EventToken = (function() { - - /** - * Properties of an EventToken. - * @memberof query - * @interface IEventToken - * @property {number|Long|null} [timestamp] EventToken timestamp - * @property {string|null} [shard] EventToken shard - * @property {string|null} [position] EventToken position - */ - - /** - * Constructs a new EventToken. - * @memberof query - * @classdesc Represents an EventToken. - * @implements IEventToken - * @constructor - * @param {query.IEventToken=} [properties] Properties to set - */ - function EventToken(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventToken timestamp. - * @member {number|Long} timestamp - * @memberof query.EventToken - * @instance - */ - EventToken.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * EventToken shard. - * @member {string} shard - * @memberof query.EventToken - * @instance - */ - EventToken.prototype.shard = ""; - - /** - * EventToken position. - * @member {string} position - * @memberof query.EventToken - * @instance - */ - EventToken.prototype.position = ""; - - /** - * Creates a new EventToken instance using the specified properties. - * @function create - * @memberof query.EventToken - * @static - * @param {query.IEventToken=} [properties] Properties to set - * @returns {query.EventToken} EventToken instance - */ - EventToken.create = function create(properties) { - return new EventToken(properties); - }; - - /** - * Encodes the specified EventToken message. Does not implicitly {@link query.EventToken.verify|verify} messages. - * @function encode - * @memberof query.EventToken - * @static - * @param {query.IEventToken} message EventToken message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventToken.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.position); - return writer; - }; - - /** - * Encodes the specified EventToken message, length delimited. Does not implicitly {@link query.EventToken.verify|verify} messages. - * @function encodeDelimited - * @memberof query.EventToken - * @static - * @param {query.IEventToken} message EventToken message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventToken message from the specified reader or buffer. - * @function decode - * @memberof query.EventToken - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.EventToken} EventToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventToken.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.EventToken(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = reader.int64(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventToken message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.EventToken - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.EventToken} EventToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventToken.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventToken message. - * @function verify - * @memberof query.EventToken - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventToken.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - return null; - }; - - /** - * Creates an EventToken message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.EventToken - * @static - * @param {Object.} object Plain object - * @returns {query.EventToken} EventToken - */ - EventToken.fromObject = function fromObject(object) { - if (object instanceof $root.query.EventToken) - return object; - var message = new $root.query.EventToken(); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); - if (object.shard != null) - message.shard = String(object.shard); - if (object.position != null) - message.position = String(object.position); - return message; - }; - - /** - * Creates a plain object from an EventToken message. Also converts values to other types if specified. - * @function toObject - * @memberof query.EventToken - * @static - * @param {query.EventToken} message EventToken - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventToken.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.shard = ""; - object.position = ""; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - return object; - }; - - /** - * Converts this EventToken to JSON. - * @function toJSON - * @memberof query.EventToken - * @instance - * @returns {Object.} JSON object - */ - EventToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EventToken; - })(); - - /** - * MySqlFlag enum. - * @name query.MySqlFlag - * @enum {number} - * @property {number} EMPTY=0 EMPTY value - * @property {number} NOT_NULL_FLAG=1 NOT_NULL_FLAG value - * @property {number} PRI_KEY_FLAG=2 PRI_KEY_FLAG value - * @property {number} UNIQUE_KEY_FLAG=4 UNIQUE_KEY_FLAG value - * @property {number} MULTIPLE_KEY_FLAG=8 MULTIPLE_KEY_FLAG value - * @property {number} BLOB_FLAG=16 BLOB_FLAG value - * @property {number} UNSIGNED_FLAG=32 UNSIGNED_FLAG value - * @property {number} ZEROFILL_FLAG=64 ZEROFILL_FLAG value - * @property {number} BINARY_FLAG=128 BINARY_FLAG value - * @property {number} ENUM_FLAG=256 ENUM_FLAG value - * @property {number} AUTO_INCREMENT_FLAG=512 AUTO_INCREMENT_FLAG value - * @property {number} TIMESTAMP_FLAG=1024 TIMESTAMP_FLAG value - * @property {number} SET_FLAG=2048 SET_FLAG value - * @property {number} NO_DEFAULT_VALUE_FLAG=4096 NO_DEFAULT_VALUE_FLAG value - * @property {number} ON_UPDATE_NOW_FLAG=8192 ON_UPDATE_NOW_FLAG value - * @property {number} NUM_FLAG=32768 NUM_FLAG value - * @property {number} PART_KEY_FLAG=16384 PART_KEY_FLAG value - * @property {number} GROUP_FLAG=32768 GROUP_FLAG value - * @property {number} UNIQUE_FLAG=65536 UNIQUE_FLAG value - * @property {number} BINCMP_FLAG=131072 BINCMP_FLAG value - */ - query.MySqlFlag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EMPTY"] = 0; - values[valuesById[1] = "NOT_NULL_FLAG"] = 1; - values[valuesById[2] = "PRI_KEY_FLAG"] = 2; - values[valuesById[4] = "UNIQUE_KEY_FLAG"] = 4; - values[valuesById[8] = "MULTIPLE_KEY_FLAG"] = 8; - values[valuesById[16] = "BLOB_FLAG"] = 16; - values[valuesById[32] = "UNSIGNED_FLAG"] = 32; - values[valuesById[64] = "ZEROFILL_FLAG"] = 64; - values[valuesById[128] = "BINARY_FLAG"] = 128; - values[valuesById[256] = "ENUM_FLAG"] = 256; - values[valuesById[512] = "AUTO_INCREMENT_FLAG"] = 512; - values[valuesById[1024] = "TIMESTAMP_FLAG"] = 1024; - values[valuesById[2048] = "SET_FLAG"] = 2048; - values[valuesById[4096] = "NO_DEFAULT_VALUE_FLAG"] = 4096; - values[valuesById[8192] = "ON_UPDATE_NOW_FLAG"] = 8192; - values[valuesById[32768] = "NUM_FLAG"] = 32768; - values[valuesById[16384] = "PART_KEY_FLAG"] = 16384; - values["GROUP_FLAG"] = 32768; - values[valuesById[65536] = "UNIQUE_FLAG"] = 65536; - values[valuesById[131072] = "BINCMP_FLAG"] = 131072; - return values; - })(); - - /** - * Flag enum. - * @name query.Flag - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} ISINTEGRAL=256 ISINTEGRAL value - * @property {number} ISUNSIGNED=512 ISUNSIGNED value - * @property {number} ISFLOAT=1024 ISFLOAT value - * @property {number} ISQUOTED=2048 ISQUOTED value - * @property {number} ISTEXT=4096 ISTEXT value - * @property {number} ISBINARY=8192 ISBINARY value - */ - query.Flag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[256] = "ISINTEGRAL"] = 256; - values[valuesById[512] = "ISUNSIGNED"] = 512; - values[valuesById[1024] = "ISFLOAT"] = 1024; - values[valuesById[2048] = "ISQUOTED"] = 2048; - values[valuesById[4096] = "ISTEXT"] = 4096; - values[valuesById[8192] = "ISBINARY"] = 8192; - return values; - })(); - - /** - * Type enum. - * @name query.Type - * @enum {number} - * @property {number} NULL_TYPE=0 NULL_TYPE value - * @property {number} INT8=257 INT8 value - * @property {number} UINT8=770 UINT8 value - * @property {number} INT16=259 INT16 value - * @property {number} UINT16=772 UINT16 value - * @property {number} INT24=261 INT24 value - * @property {number} UINT24=774 UINT24 value - * @property {number} INT32=263 INT32 value - * @property {number} UINT32=776 UINT32 value - * @property {number} INT64=265 INT64 value - * @property {number} UINT64=778 UINT64 value - * @property {number} FLOAT32=1035 FLOAT32 value - * @property {number} FLOAT64=1036 FLOAT64 value - * @property {number} TIMESTAMP=2061 TIMESTAMP value - * @property {number} DATE=2062 DATE value - * @property {number} TIME=2063 TIME value - * @property {number} DATETIME=2064 DATETIME value - * @property {number} YEAR=785 YEAR value - * @property {number} DECIMAL=18 DECIMAL value - * @property {number} TEXT=6163 TEXT value - * @property {number} BLOB=10260 BLOB value - * @property {number} VARCHAR=6165 VARCHAR value - * @property {number} VARBINARY=10262 VARBINARY value - * @property {number} CHAR=6167 CHAR value - * @property {number} BINARY=10264 BINARY value - * @property {number} BIT=2073 BIT value - * @property {number} ENUM=2074 ENUM value - * @property {number} SET=2075 SET value - * @property {number} TUPLE=28 TUPLE value - * @property {number} GEOMETRY=2077 GEOMETRY value - * @property {number} JSON=2078 JSON value - * @property {number} EXPRESSION=31 EXPRESSION value - */ - query.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_TYPE"] = 0; - values[valuesById[257] = "INT8"] = 257; - values[valuesById[770] = "UINT8"] = 770; - values[valuesById[259] = "INT16"] = 259; - values[valuesById[772] = "UINT16"] = 772; - values[valuesById[261] = "INT24"] = 261; - values[valuesById[774] = "UINT24"] = 774; - values[valuesById[263] = "INT32"] = 263; - values[valuesById[776] = "UINT32"] = 776; - values[valuesById[265] = "INT64"] = 265; - values[valuesById[778] = "UINT64"] = 778; - values[valuesById[1035] = "FLOAT32"] = 1035; - values[valuesById[1036] = "FLOAT64"] = 1036; - values[valuesById[2061] = "TIMESTAMP"] = 2061; - values[valuesById[2062] = "DATE"] = 2062; - values[valuesById[2063] = "TIME"] = 2063; - values[valuesById[2064] = "DATETIME"] = 2064; - values[valuesById[785] = "YEAR"] = 785; - values[valuesById[18] = "DECIMAL"] = 18; - values[valuesById[6163] = "TEXT"] = 6163; - values[valuesById[10260] = "BLOB"] = 10260; - values[valuesById[6165] = "VARCHAR"] = 6165; - values[valuesById[10262] = "VARBINARY"] = 10262; - values[valuesById[6167] = "CHAR"] = 6167; - values[valuesById[10264] = "BINARY"] = 10264; - values[valuesById[2073] = "BIT"] = 2073; - values[valuesById[2074] = "ENUM"] = 2074; - values[valuesById[2075] = "SET"] = 2075; - values[valuesById[28] = "TUPLE"] = 28; - values[valuesById[2077] = "GEOMETRY"] = 2077; - values[valuesById[2078] = "JSON"] = 2078; - values[valuesById[31] = "EXPRESSION"] = 31; - return values; - })(); - - query.Value = (function() { - - /** - * Properties of a Value. - * @memberof query - * @interface IValue - * @property {query.Type|null} [type] Value type - * @property {Uint8Array|null} [value] Value value - */ - - /** - * Constructs a new Value. - * @memberof query - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {query.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Value type. - * @member {query.Type} type - * @memberof query.Value - * @instance - */ - Value.prototype.type = 0; - - /** - * Value value. - * @member {Uint8Array} value - * @memberof query.Value - * @instance - */ - Value.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof query.Value - * @static - * @param {query.IValue=} [properties] Properties to set - * @returns {query.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link query.Value.verify|verify} messages. - * @function encode - * @memberof query.Value - * @static - * @param {query.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link query.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof query.Value - * @static - * @param {query.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof query.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof query.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.Value - * @static - * @param {Object.} object Plain object - * @returns {query.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.query.Value) - return object; - var message = new $root.query.Value(); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - } - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof query.Value - * @static - * @param {query.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "NULL_TYPE" : 0; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof query.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Value; - })(); - - query.BindVariable = (function() { - - /** - * Properties of a BindVariable. - * @memberof query - * @interface IBindVariable - * @property {query.Type|null} [type] BindVariable type - * @property {Uint8Array|null} [value] BindVariable value - * @property {Array.|null} [values] BindVariable values - */ - - /** - * Constructs a new BindVariable. - * @memberof query - * @classdesc Represents a BindVariable. - * @implements IBindVariable - * @constructor - * @param {query.IBindVariable=} [properties] Properties to set - */ - function BindVariable(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BindVariable type. - * @member {query.Type} type - * @memberof query.BindVariable - * @instance - */ - BindVariable.prototype.type = 0; - - /** - * BindVariable value. - * @member {Uint8Array} value - * @memberof query.BindVariable - * @instance - */ - BindVariable.prototype.value = $util.newBuffer([]); - - /** - * BindVariable values. - * @member {Array.} values - * @memberof query.BindVariable - * @instance - */ - BindVariable.prototype.values = $util.emptyArray; - - /** - * Creates a new BindVariable instance using the specified properties. - * @function create - * @memberof query.BindVariable - * @static - * @param {query.IBindVariable=} [properties] Properties to set - * @returns {query.BindVariable} BindVariable instance - */ - BindVariable.create = function create(properties) { - return new BindVariable(properties); - }; - - /** - * Encodes the specified BindVariable message. Does not implicitly {@link query.BindVariable.verify|verify} messages. - * @function encode - * @memberof query.BindVariable - * @static - * @param {query.IBindVariable} message BindVariable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindVariable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.query.Value.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BindVariable message, length delimited. Does not implicitly {@link query.BindVariable.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BindVariable - * @static - * @param {query.IBindVariable} message BindVariable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindVariable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BindVariable message from the specified reader or buffer. - * @function decode - * @memberof query.BindVariable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BindVariable} BindVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindVariable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BindVariable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.query.Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BindVariable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BindVariable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BindVariable} BindVariable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindVariable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BindVariable message. - * @function verify - * @memberof query.BindVariable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindVariable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.query.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * Creates a BindVariable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BindVariable - * @static - * @param {Object.} object Plain object - * @returns {query.BindVariable} BindVariable - */ - BindVariable.fromObject = function fromObject(object) { - if (object instanceof $root.query.BindVariable) - return object; - var message = new $root.query.BindVariable(); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - } - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".query.BindVariable.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".query.BindVariable.values: object expected"); - message.values[i] = $root.query.Value.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BindVariable message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BindVariable - * @static - * @param {query.BindVariable} message BindVariable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindVariable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.type = options.enums === String ? "NULL_TYPE" : 0; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.query.Value.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this BindVariable to JSON. - * @function toJSON - * @memberof query.BindVariable - * @instance - * @returns {Object.} JSON object - */ - BindVariable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BindVariable; - })(); - - query.BoundQuery = (function() { - - /** - * Properties of a BoundQuery. - * @memberof query - * @interface IBoundQuery - * @property {string|null} [sql] BoundQuery sql - * @property {Object.|null} [bind_variables] BoundQuery bind_variables - */ - - /** - * Constructs a new BoundQuery. - * @memberof query - * @classdesc Represents a BoundQuery. - * @implements IBoundQuery - * @constructor - * @param {query.IBoundQuery=} [properties] Properties to set - */ - function BoundQuery(properties) { - this.bind_variables = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BoundQuery sql. - * @member {string} sql - * @memberof query.BoundQuery - * @instance - */ - BoundQuery.prototype.sql = ""; - - /** - * BoundQuery bind_variables. - * @member {Object.} bind_variables - * @memberof query.BoundQuery - * @instance - */ - BoundQuery.prototype.bind_variables = $util.emptyObject; - - /** - * Creates a new BoundQuery instance using the specified properties. - * @function create - * @memberof query.BoundQuery - * @static - * @param {query.IBoundQuery=} [properties] Properties to set - * @returns {query.BoundQuery} BoundQuery instance - */ - BoundQuery.create = function create(properties) { - return new BoundQuery(properties); - }; - - /** - * Encodes the specified BoundQuery message. Does not implicitly {@link query.BoundQuery.verify|verify} messages. - * @function encode - * @memberof query.BoundQuery - * @static - * @param {query.IBoundQuery} message BoundQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoundQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sql); - if (message.bind_variables != null && Object.hasOwnProperty.call(message, "bind_variables")) - for (var keys = Object.keys(message.bind_variables), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.query.BindVariable.encode(message.bind_variables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified BoundQuery message, length delimited. Does not implicitly {@link query.BoundQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BoundQuery - * @static - * @param {query.IBoundQuery} message BoundQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoundQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BoundQuery message from the specified reader or buffer. - * @function decode - * @memberof query.BoundQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BoundQuery} BoundQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoundQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BoundQuery(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sql = reader.string(); - break; - case 2: - if (message.bind_variables === $util.emptyObject) - message.bind_variables = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.query.BindVariable.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.bind_variables[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BoundQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BoundQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BoundQuery} BoundQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoundQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BoundQuery message. - * @function verify - * @memberof query.BoundQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoundQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sql != null && message.hasOwnProperty("sql")) - if (!$util.isString(message.sql)) - return "sql: string expected"; - if (message.bind_variables != null && message.hasOwnProperty("bind_variables")) { - if (!$util.isObject(message.bind_variables)) - return "bind_variables: object expected"; - var key = Object.keys(message.bind_variables); - for (var i = 0; i < key.length; ++i) { - var error = $root.query.BindVariable.verify(message.bind_variables[key[i]]); - if (error) - return "bind_variables." + error; - } - } - return null; - }; - - /** - * Creates a BoundQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BoundQuery - * @static - * @param {Object.} object Plain object - * @returns {query.BoundQuery} BoundQuery - */ - BoundQuery.fromObject = function fromObject(object) { - if (object instanceof $root.query.BoundQuery) - return object; - var message = new $root.query.BoundQuery(); - if (object.sql != null) - message.sql = String(object.sql); - if (object.bind_variables) { - if (typeof object.bind_variables !== "object") - throw TypeError(".query.BoundQuery.bind_variables: object expected"); - message.bind_variables = {}; - for (var keys = Object.keys(object.bind_variables), i = 0; i < keys.length; ++i) { - if (typeof object.bind_variables[keys[i]] !== "object") - throw TypeError(".query.BoundQuery.bind_variables: object expected"); - message.bind_variables[keys[i]] = $root.query.BindVariable.fromObject(object.bind_variables[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a BoundQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BoundQuery - * @static - * @param {query.BoundQuery} message BoundQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoundQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.bind_variables = {}; - if (options.defaults) - object.sql = ""; - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = message.sql; - var keys2; - if (message.bind_variables && (keys2 = Object.keys(message.bind_variables)).length) { - object.bind_variables = {}; - for (var j = 0; j < keys2.length; ++j) - object.bind_variables[keys2[j]] = $root.query.BindVariable.toObject(message.bind_variables[keys2[j]], options); - } - return object; - }; - - /** - * Converts this BoundQuery to JSON. - * @function toJSON - * @memberof query.BoundQuery - * @instance - * @returns {Object.} JSON object - */ - BoundQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BoundQuery; - })(); - - query.ExecuteOptions = (function() { - - /** - * Properties of an ExecuteOptions. - * @memberof query - * @interface IExecuteOptions - * @property {query.ExecuteOptions.IncludedFields|null} [included_fields] ExecuteOptions included_fields - * @property {boolean|null} [client_found_rows] ExecuteOptions client_found_rows - * @property {query.ExecuteOptions.Workload|null} [workload] ExecuteOptions workload - * @property {number|Long|null} [sql_select_limit] ExecuteOptions sql_select_limit - * @property {query.ExecuteOptions.TransactionIsolation|null} [transaction_isolation] ExecuteOptions transaction_isolation - * @property {boolean|null} [skip_query_plan_cache] ExecuteOptions skip_query_plan_cache - * @property {query.ExecuteOptions.PlannerVersion|null} [planner_version] ExecuteOptions planner_version - * @property {boolean|null} [has_created_temp_tables] ExecuteOptions has_created_temp_tables - */ - - /** - * Constructs a new ExecuteOptions. - * @memberof query - * @classdesc Represents an ExecuteOptions. - * @implements IExecuteOptions - * @constructor - * @param {query.IExecuteOptions=} [properties] Properties to set - */ - function ExecuteOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOptions included_fields. - * @member {query.ExecuteOptions.IncludedFields} included_fields - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.included_fields = 0; - - /** - * ExecuteOptions client_found_rows. - * @member {boolean} client_found_rows - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.client_found_rows = false; - - /** - * ExecuteOptions workload. - * @member {query.ExecuteOptions.Workload} workload - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.workload = 0; - - /** - * ExecuteOptions sql_select_limit. - * @member {number|Long} sql_select_limit - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.sql_select_limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExecuteOptions transaction_isolation. - * @member {query.ExecuteOptions.TransactionIsolation} transaction_isolation - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.transaction_isolation = 0; - - /** - * ExecuteOptions skip_query_plan_cache. - * @member {boolean} skip_query_plan_cache - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.skip_query_plan_cache = false; - - /** - * ExecuteOptions planner_version. - * @member {query.ExecuteOptions.PlannerVersion} planner_version - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.planner_version = 0; - - /** - * ExecuteOptions has_created_temp_tables. - * @member {boolean} has_created_temp_tables - * @memberof query.ExecuteOptions - * @instance - */ - ExecuteOptions.prototype.has_created_temp_tables = false; - - /** - * Creates a new ExecuteOptions instance using the specified properties. - * @function create - * @memberof query.ExecuteOptions - * @static - * @param {query.IExecuteOptions=} [properties] Properties to set - * @returns {query.ExecuteOptions} ExecuteOptions instance - */ - ExecuteOptions.create = function create(properties) { - return new ExecuteOptions(properties); - }; - - /** - * Encodes the specified ExecuteOptions message. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. - * @function encode - * @memberof query.ExecuteOptions - * @static - * @param {query.IExecuteOptions} message ExecuteOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.included_fields != null && Object.hasOwnProperty.call(message, "included_fields")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.included_fields); - if (message.client_found_rows != null && Object.hasOwnProperty.call(message, "client_found_rows")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_found_rows); - if (message.workload != null && Object.hasOwnProperty.call(message, "workload")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.workload); - if (message.sql_select_limit != null && Object.hasOwnProperty.call(message, "sql_select_limit")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.sql_select_limit); - if (message.transaction_isolation != null && Object.hasOwnProperty.call(message, "transaction_isolation")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.transaction_isolation); - if (message.skip_query_plan_cache != null && Object.hasOwnProperty.call(message, "skip_query_plan_cache")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.skip_query_plan_cache); - if (message.planner_version != null && Object.hasOwnProperty.call(message, "planner_version")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.planner_version); - if (message.has_created_temp_tables != null && Object.hasOwnProperty.call(message, "has_created_temp_tables")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.has_created_temp_tables); - return writer; - }; - - /** - * Encodes the specified ExecuteOptions message, length delimited. Does not implicitly {@link query.ExecuteOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ExecuteOptions - * @static - * @param {query.IExecuteOptions} message ExecuteOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOptions message from the specified reader or buffer. - * @function decode - * @memberof query.ExecuteOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteOptions} ExecuteOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.included_fields = reader.int32(); - break; - case 5: - message.client_found_rows = reader.bool(); - break; - case 6: - message.workload = reader.int32(); - break; - case 8: - message.sql_select_limit = reader.int64(); - break; - case 9: - message.transaction_isolation = reader.int32(); - break; - case 10: - message.skip_query_plan_cache = reader.bool(); - break; - case 11: - message.planner_version = reader.int32(); - break; - case 12: - message.has_created_temp_tables = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ExecuteOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteOptions} ExecuteOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOptions message. - * @function verify - * @memberof query.ExecuteOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.included_fields != null && message.hasOwnProperty("included_fields")) - switch (message.included_fields) { - default: - return "included_fields: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.client_found_rows != null && message.hasOwnProperty("client_found_rows")) - if (typeof message.client_found_rows !== "boolean") - return "client_found_rows: boolean expected"; - if (message.workload != null && message.hasOwnProperty("workload")) - switch (message.workload) { - default: - return "workload: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sql_select_limit != null && message.hasOwnProperty("sql_select_limit")) - if (!$util.isInteger(message.sql_select_limit) && !(message.sql_select_limit && $util.isInteger(message.sql_select_limit.low) && $util.isInteger(message.sql_select_limit.high))) - return "sql_select_limit: integer|Long expected"; - if (message.transaction_isolation != null && message.hasOwnProperty("transaction_isolation")) - switch (message.transaction_isolation) { - default: - return "transaction_isolation: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.skip_query_plan_cache != null && message.hasOwnProperty("skip_query_plan_cache")) - if (typeof message.skip_query_plan_cache !== "boolean") - return "skip_query_plan_cache: boolean expected"; - if (message.planner_version != null && message.hasOwnProperty("planner_version")) - switch (message.planner_version) { - default: - return "planner_version: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.has_created_temp_tables != null && message.hasOwnProperty("has_created_temp_tables")) - if (typeof message.has_created_temp_tables !== "boolean") - return "has_created_temp_tables: boolean expected"; - return null; - }; - - /** - * Creates an ExecuteOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ExecuteOptions - * @static - * @param {Object.} object Plain object - * @returns {query.ExecuteOptions} ExecuteOptions - */ - ExecuteOptions.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteOptions) - return object; - var message = new $root.query.ExecuteOptions(); - switch (object.included_fields) { - case "TYPE_AND_NAME": - case 0: - message.included_fields = 0; - break; - case "TYPE_ONLY": - case 1: - message.included_fields = 1; - break; - case "ALL": - case 2: - message.included_fields = 2; - break; - } - if (object.client_found_rows != null) - message.client_found_rows = Boolean(object.client_found_rows); - switch (object.workload) { - case "UNSPECIFIED": - case 0: - message.workload = 0; - break; - case "OLTP": - case 1: - message.workload = 1; - break; - case "OLAP": - case 2: - message.workload = 2; - break; - case "DBA": - case 3: - message.workload = 3; - break; - } - if (object.sql_select_limit != null) - if ($util.Long) - (message.sql_select_limit = $util.Long.fromValue(object.sql_select_limit)).unsigned = false; - else if (typeof object.sql_select_limit === "string") - message.sql_select_limit = parseInt(object.sql_select_limit, 10); - else if (typeof object.sql_select_limit === "number") - message.sql_select_limit = object.sql_select_limit; - else if (typeof object.sql_select_limit === "object") - message.sql_select_limit = new $util.LongBits(object.sql_select_limit.low >>> 0, object.sql_select_limit.high >>> 0).toNumber(); - switch (object.transaction_isolation) { - case "DEFAULT": - case 0: - message.transaction_isolation = 0; - break; - case "REPEATABLE_READ": - case 1: - message.transaction_isolation = 1; - break; - case "READ_COMMITTED": - case 2: - message.transaction_isolation = 2; - break; - case "READ_UNCOMMITTED": - case 3: - message.transaction_isolation = 3; - break; - case "SERIALIZABLE": - case 4: - message.transaction_isolation = 4; - break; - case "CONSISTENT_SNAPSHOT_READ_ONLY": - case 5: - message.transaction_isolation = 5; - break; - case "AUTOCOMMIT": - case 6: - message.transaction_isolation = 6; - break; - } - if (object.skip_query_plan_cache != null) - message.skip_query_plan_cache = Boolean(object.skip_query_plan_cache); - switch (object.planner_version) { - case "DEFAULT_PLANNER": - case 0: - message.planner_version = 0; - break; - case "V3": - case 1: - message.planner_version = 1; - break; - case "Gen4": - case 2: - message.planner_version = 2; - break; - case "Gen4Greedy": - case 3: - message.planner_version = 3; - break; - case "Gen4Left2Right": - case 4: - message.planner_version = 4; - break; - case "Gen4WithFallback": - case 5: - message.planner_version = 5; - break; - } - if (object.has_created_temp_tables != null) - message.has_created_temp_tables = Boolean(object.has_created_temp_tables); - return message; - }; - - /** - * Creates a plain object from an ExecuteOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ExecuteOptions - * @static - * @param {query.ExecuteOptions} message ExecuteOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.included_fields = options.enums === String ? "TYPE_AND_NAME" : 0; - object.client_found_rows = false; - object.workload = options.enums === String ? "UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sql_select_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sql_select_limit = options.longs === String ? "0" : 0; - object.transaction_isolation = options.enums === String ? "DEFAULT" : 0; - object.skip_query_plan_cache = false; - object.planner_version = options.enums === String ? "DEFAULT_PLANNER" : 0; - object.has_created_temp_tables = false; - } - if (message.included_fields != null && message.hasOwnProperty("included_fields")) - object.included_fields = options.enums === String ? $root.query.ExecuteOptions.IncludedFields[message.included_fields] : message.included_fields; - if (message.client_found_rows != null && message.hasOwnProperty("client_found_rows")) - object.client_found_rows = message.client_found_rows; - if (message.workload != null && message.hasOwnProperty("workload")) - object.workload = options.enums === String ? $root.query.ExecuteOptions.Workload[message.workload] : message.workload; - if (message.sql_select_limit != null && message.hasOwnProperty("sql_select_limit")) - if (typeof message.sql_select_limit === "number") - object.sql_select_limit = options.longs === String ? String(message.sql_select_limit) : message.sql_select_limit; - else - object.sql_select_limit = options.longs === String ? $util.Long.prototype.toString.call(message.sql_select_limit) : options.longs === Number ? new $util.LongBits(message.sql_select_limit.low >>> 0, message.sql_select_limit.high >>> 0).toNumber() : message.sql_select_limit; - if (message.transaction_isolation != null && message.hasOwnProperty("transaction_isolation")) - object.transaction_isolation = options.enums === String ? $root.query.ExecuteOptions.TransactionIsolation[message.transaction_isolation] : message.transaction_isolation; - if (message.skip_query_plan_cache != null && message.hasOwnProperty("skip_query_plan_cache")) - object.skip_query_plan_cache = message.skip_query_plan_cache; - if (message.planner_version != null && message.hasOwnProperty("planner_version")) - object.planner_version = options.enums === String ? $root.query.ExecuteOptions.PlannerVersion[message.planner_version] : message.planner_version; - if (message.has_created_temp_tables != null && message.hasOwnProperty("has_created_temp_tables")) - object.has_created_temp_tables = message.has_created_temp_tables; - return object; - }; - - /** - * Converts this ExecuteOptions to JSON. - * @function toJSON - * @memberof query.ExecuteOptions - * @instance - * @returns {Object.} JSON object - */ - ExecuteOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * IncludedFields enum. - * @name query.ExecuteOptions.IncludedFields - * @enum {number} - * @property {number} TYPE_AND_NAME=0 TYPE_AND_NAME value - * @property {number} TYPE_ONLY=1 TYPE_ONLY value - * @property {number} ALL=2 ALL value - */ - ExecuteOptions.IncludedFields = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_AND_NAME"] = 0; - values[valuesById[1] = "TYPE_ONLY"] = 1; - values[valuesById[2] = "ALL"] = 2; - return values; - })(); - - /** - * Workload enum. - * @name query.ExecuteOptions.Workload - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} OLTP=1 OLTP value - * @property {number} OLAP=2 OLAP value - * @property {number} DBA=3 DBA value - */ - ExecuteOptions.Workload = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "OLTP"] = 1; - values[valuesById[2] = "OLAP"] = 2; - values[valuesById[3] = "DBA"] = 3; - return values; - })(); - - /** - * TransactionIsolation enum. - * @name query.ExecuteOptions.TransactionIsolation - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} REPEATABLE_READ=1 REPEATABLE_READ value - * @property {number} READ_COMMITTED=2 READ_COMMITTED value - * @property {number} READ_UNCOMMITTED=3 READ_UNCOMMITTED value - * @property {number} SERIALIZABLE=4 SERIALIZABLE value - * @property {number} CONSISTENT_SNAPSHOT_READ_ONLY=5 CONSISTENT_SNAPSHOT_READ_ONLY value - * @property {number} AUTOCOMMIT=6 AUTOCOMMIT value - */ - ExecuteOptions.TransactionIsolation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "REPEATABLE_READ"] = 1; - values[valuesById[2] = "READ_COMMITTED"] = 2; - values[valuesById[3] = "READ_UNCOMMITTED"] = 3; - values[valuesById[4] = "SERIALIZABLE"] = 4; - values[valuesById[5] = "CONSISTENT_SNAPSHOT_READ_ONLY"] = 5; - values[valuesById[6] = "AUTOCOMMIT"] = 6; - return values; - })(); - - /** - * PlannerVersion enum. - * @name query.ExecuteOptions.PlannerVersion - * @enum {number} - * @property {number} DEFAULT_PLANNER=0 DEFAULT_PLANNER value - * @property {number} V3=1 V3 value - * @property {number} Gen4=2 Gen4 value - * @property {number} Gen4Greedy=3 Gen4Greedy value - * @property {number} Gen4Left2Right=4 Gen4Left2Right value - * @property {number} Gen4WithFallback=5 Gen4WithFallback value - */ - ExecuteOptions.PlannerVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT_PLANNER"] = 0; - values[valuesById[1] = "V3"] = 1; - values[valuesById[2] = "Gen4"] = 2; - values[valuesById[3] = "Gen4Greedy"] = 3; - values[valuesById[4] = "Gen4Left2Right"] = 4; - values[valuesById[5] = "Gen4WithFallback"] = 5; - return values; - })(); - - return ExecuteOptions; - })(); - - query.Field = (function() { - - /** - * Properties of a Field. - * @memberof query - * @interface IField - * @property {string|null} [name] Field name - * @property {query.Type|null} [type] Field type - * @property {string|null} [table] Field table - * @property {string|null} [org_table] Field org_table - * @property {string|null} [database] Field database - * @property {string|null} [org_name] Field org_name - * @property {number|null} [column_length] Field column_length - * @property {number|null} [charset] Field charset - * @property {number|null} [decimals] Field decimals - * @property {number|null} [flags] Field flags - * @property {string|null} [column_type] Field column_type - */ - - /** - * Constructs a new Field. - * @memberof query - * @classdesc Represents a Field. - * @implements IField - * @constructor - * @param {query.IField=} [properties] Properties to set - */ - function Field(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Field name. - * @member {string} name - * @memberof query.Field - * @instance - */ - Field.prototype.name = ""; - - /** - * Field type. - * @member {query.Type} type - * @memberof query.Field - * @instance - */ - Field.prototype.type = 0; - - /** - * Field table. - * @member {string} table - * @memberof query.Field - * @instance - */ - Field.prototype.table = ""; - - /** - * Field org_table. - * @member {string} org_table - * @memberof query.Field - * @instance - */ - Field.prototype.org_table = ""; - - /** - * Field database. - * @member {string} database - * @memberof query.Field - * @instance - */ - Field.prototype.database = ""; - - /** - * Field org_name. - * @member {string} org_name - * @memberof query.Field - * @instance - */ - Field.prototype.org_name = ""; - - /** - * Field column_length. - * @member {number} column_length - * @memberof query.Field - * @instance - */ - Field.prototype.column_length = 0; - - /** - * Field charset. - * @member {number} charset - * @memberof query.Field - * @instance - */ - Field.prototype.charset = 0; - - /** - * Field decimals. - * @member {number} decimals - * @memberof query.Field - * @instance - */ - Field.prototype.decimals = 0; - - /** - * Field flags. - * @member {number} flags - * @memberof query.Field - * @instance - */ - Field.prototype.flags = 0; - - /** - * Field column_type. - * @member {string} column_type - * @memberof query.Field - * @instance - */ - Field.prototype.column_type = ""; - - /** - * Creates a new Field instance using the specified properties. - * @function create - * @memberof query.Field - * @static - * @param {query.IField=} [properties] Properties to set - * @returns {query.Field} Field instance - */ - Field.create = function create(properties) { - return new Field(properties); - }; - - /** - * Encodes the specified Field message. Does not implicitly {@link query.Field.verify|verify} messages. - * @function encode - * @memberof query.Field - * @static - * @param {query.IField} message Field message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Field.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.table); - if (message.org_table != null && Object.hasOwnProperty.call(message, "org_table")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.org_table); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); - if (message.org_name != null && Object.hasOwnProperty.call(message, "org_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.org_name); - if (message.column_length != null && Object.hasOwnProperty.call(message, "column_length")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.column_length); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.charset); - if (message.decimals != null && Object.hasOwnProperty.call(message, "decimals")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.decimals); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.flags); - if (message.column_type != null && Object.hasOwnProperty.call(message, "column_type")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.column_type); - return writer; - }; - - /** - * Encodes the specified Field message, length delimited. Does not implicitly {@link query.Field.verify|verify} messages. - * @function encodeDelimited - * @memberof query.Field - * @static - * @param {query.IField} message Field message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Field.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Field message from the specified reader or buffer. - * @function decode - * @memberof query.Field - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.Field} Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Field.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Field(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.table = reader.string(); - break; - case 4: - message.org_table = reader.string(); - break; - case 5: - message.database = reader.string(); - break; - case 6: - message.org_name = reader.string(); - break; - case 7: - message.column_length = reader.uint32(); - break; - case 8: - message.charset = reader.uint32(); - break; - case 9: - message.decimals = reader.uint32(); - break; - case 10: - message.flags = reader.uint32(); - break; - case 11: - message.column_type = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Field message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.Field - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Field} Field - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Field.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Field message. - * @function verify - * @memberof query.Field - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Field.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - break; - } - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.org_table != null && message.hasOwnProperty("org_table")) - if (!$util.isString(message.org_table)) - return "org_table: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.org_name != null && message.hasOwnProperty("org_name")) - if (!$util.isString(message.org_name)) - return "org_name: string expected"; - if (message.column_length != null && message.hasOwnProperty("column_length")) - if (!$util.isInteger(message.column_length)) - return "column_length: integer expected"; - if (message.charset != null && message.hasOwnProperty("charset")) - if (!$util.isInteger(message.charset)) - return "charset: integer expected"; - if (message.decimals != null && message.hasOwnProperty("decimals")) - if (!$util.isInteger(message.decimals)) - return "decimals: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - if (message.column_type != null && message.hasOwnProperty("column_type")) - if (!$util.isString(message.column_type)) - return "column_type: string expected"; - return null; - }; - - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.Field - * @static - * @param {Object.} object Plain object - * @returns {query.Field} Field - */ - Field.fromObject = function fromObject(object) { - if (object instanceof $root.query.Field) - return object; - var message = new $root.query.Field(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - } - if (object.table != null) - message.table = String(object.table); - if (object.org_table != null) - message.org_table = String(object.org_table); - if (object.database != null) - message.database = String(object.database); - if (object.org_name != null) - message.org_name = String(object.org_name); - if (object.column_length != null) - message.column_length = object.column_length >>> 0; - if (object.charset != null) - message.charset = object.charset >>> 0; - if (object.decimals != null) - message.decimals = object.decimals >>> 0; - if (object.flags != null) - message.flags = object.flags >>> 0; - if (object.column_type != null) - message.column_type = String(object.column_type); - return message; - }; - - /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @function toObject - * @memberof query.Field - * @static - * @param {query.Field} message Field - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Field.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "NULL_TYPE" : 0; - object.table = ""; - object.org_table = ""; - object.database = ""; - object.org_name = ""; - object.column_length = 0; - object.charset = 0; - object.decimals = 0; - object.flags = 0; - object.column_type = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.org_table != null && message.hasOwnProperty("org_table")) - object.org_table = message.org_table; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.org_name != null && message.hasOwnProperty("org_name")) - object.org_name = message.org_name; - if (message.column_length != null && message.hasOwnProperty("column_length")) - object.column_length = message.column_length; - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = message.charset; - if (message.decimals != null && message.hasOwnProperty("decimals")) - object.decimals = message.decimals; - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - if (message.column_type != null && message.hasOwnProperty("column_type")) - object.column_type = message.column_type; - return object; - }; - - /** - * Converts this Field to JSON. - * @function toJSON - * @memberof query.Field - * @instance - * @returns {Object.} JSON object - */ - Field.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Field; - })(); - - query.Row = (function() { - - /** - * Properties of a Row. - * @memberof query - * @interface IRow - * @property {Array.|null} [lengths] Row lengths - * @property {Uint8Array|null} [values] Row values - */ - - /** - * Constructs a new Row. - * @memberof query - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {query.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.lengths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Row lengths. - * @member {Array.} lengths - * @memberof query.Row - * @instance - */ - Row.prototype.lengths = $util.emptyArray; - - /** - * Row values. - * @member {Uint8Array} values - * @memberof query.Row - * @instance - */ - Row.prototype.values = $util.newBuffer([]); - - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof query.Row - * @static - * @param {query.IRow=} [properties] Properties to set - * @returns {query.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; - - /** - * Encodes the specified Row message. Does not implicitly {@link query.Row.verify|verify} messages. - * @function encode - * @memberof query.Row - * @static - * @param {query.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lengths != null && message.lengths.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.lengths.length; ++i) - writer.sint64(message.lengths[i]); - writer.ldelim(); - } - if (message.values != null && Object.hasOwnProperty.call(message, "values")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.values); - return writer; - }; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link query.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof query.Row - * @static - * @param {query.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof query.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.lengths && message.lengths.length)) - message.lengths = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.lengths.push(reader.sint64()); - } else - message.lengths.push(reader.sint64()); - break; - case 2: - message.values = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Row message. - * @function verify - * @memberof query.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lengths != null && message.hasOwnProperty("lengths")) { - if (!Array.isArray(message.lengths)) - return "lengths: array expected"; - for (var i = 0; i < message.lengths.length; ++i) - if (!$util.isInteger(message.lengths[i]) && !(message.lengths[i] && $util.isInteger(message.lengths[i].low) && $util.isInteger(message.lengths[i].high))) - return "lengths: integer|Long[] expected"; - } - if (message.values != null && message.hasOwnProperty("values")) - if (!(message.values && typeof message.values.length === "number" || $util.isString(message.values))) - return "values: buffer expected"; - return null; - }; - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.Row - * @static - * @param {Object.} object Plain object - * @returns {query.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.query.Row) - return object; - var message = new $root.query.Row(); - if (object.lengths) { - if (!Array.isArray(object.lengths)) - throw TypeError(".query.Row.lengths: array expected"); - message.lengths = []; - for (var i = 0; i < object.lengths.length; ++i) - if ($util.Long) - (message.lengths[i] = $util.Long.fromValue(object.lengths[i])).unsigned = false; - else if (typeof object.lengths[i] === "string") - message.lengths[i] = parseInt(object.lengths[i], 10); - else if (typeof object.lengths[i] === "number") - message.lengths[i] = object.lengths[i]; - else if (typeof object.lengths[i] === "object") - message.lengths[i] = new $util.LongBits(object.lengths[i].low >>> 0, object.lengths[i].high >>> 0).toNumber(); - } - if (object.values != null) - if (typeof object.values === "string") - $util.base64.decode(object.values, message.values = $util.newBuffer($util.base64.length(object.values)), 0); - else if (object.values.length) - message.values = object.values; - return message; - }; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof query.Row - * @static - * @param {query.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.lengths = []; - if (options.defaults) - if (options.bytes === String) - object.values = ""; - else { - object.values = []; - if (options.bytes !== Array) - object.values = $util.newBuffer(object.values); - } - if (message.lengths && message.lengths.length) { - object.lengths = []; - for (var j = 0; j < message.lengths.length; ++j) - if (typeof message.lengths[j] === "number") - object.lengths[j] = options.longs === String ? String(message.lengths[j]) : message.lengths[j]; - else - object.lengths[j] = options.longs === String ? $util.Long.prototype.toString.call(message.lengths[j]) : options.longs === Number ? new $util.LongBits(message.lengths[j].low >>> 0, message.lengths[j].high >>> 0).toNumber() : message.lengths[j]; - } - if (message.values != null && message.hasOwnProperty("values")) - object.values = options.bytes === String ? $util.base64.encode(message.values, 0, message.values.length) : options.bytes === Array ? Array.prototype.slice.call(message.values) : message.values; - return object; - }; - - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof query.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Row; - })(); - - query.QueryResult = (function() { - - /** - * Properties of a QueryResult. - * @memberof query - * @interface IQueryResult - * @property {Array.|null} [fields] QueryResult fields - * @property {number|Long|null} [rows_affected] QueryResult rows_affected - * @property {number|Long|null} [insert_id] QueryResult insert_id - * @property {Array.|null} [rows] QueryResult rows - */ - - /** - * Constructs a new QueryResult. - * @memberof query - * @classdesc Represents a QueryResult. - * @implements IQueryResult - * @constructor - * @param {query.IQueryResult=} [properties] Properties to set - */ - function QueryResult(properties) { - this.fields = []; - this.rows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryResult fields. - * @member {Array.} fields - * @memberof query.QueryResult - * @instance - */ - QueryResult.prototype.fields = $util.emptyArray; - - /** - * QueryResult rows_affected. - * @member {number|Long} rows_affected - * @memberof query.QueryResult - * @instance - */ - QueryResult.prototype.rows_affected = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryResult insert_id. - * @member {number|Long} insert_id - * @memberof query.QueryResult - * @instance - */ - QueryResult.prototype.insert_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryResult rows. - * @member {Array.} rows - * @memberof query.QueryResult - * @instance - */ - QueryResult.prototype.rows = $util.emptyArray; - - /** - * Creates a new QueryResult instance using the specified properties. - * @function create - * @memberof query.QueryResult - * @static - * @param {query.IQueryResult=} [properties] Properties to set - * @returns {query.QueryResult} QueryResult instance - */ - QueryResult.create = function create(properties) { - return new QueryResult(properties); - }; - - /** - * Encodes the specified QueryResult message. Does not implicitly {@link query.QueryResult.verify|verify} messages. - * @function encode - * @memberof query.QueryResult - * @static - * @param {query.IQueryResult} message QueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rows_affected != null && Object.hasOwnProperty.call(message, "rows_affected")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rows_affected); - if (message.insert_id != null && Object.hasOwnProperty.call(message, "insert_id")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.insert_id); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link query.QueryResult.verify|verify} messages. - * @function encodeDelimited - * @memberof query.QueryResult - * @static - * @param {query.IQueryResult} message QueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryResult message from the specified reader or buffer. - * @function decode - * @memberof query.QueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.QueryResult} QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.QueryResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 2: - message.rows_affected = reader.uint64(); - break; - case 3: - message.insert_id = reader.uint64(); - break; - case 4: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.query.Row.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.QueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.QueryResult} QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryResult message. - * @function verify - * @memberof query.QueryResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.rows_affected != null && message.hasOwnProperty("rows_affected")) - if (!$util.isInteger(message.rows_affected) && !(message.rows_affected && $util.isInteger(message.rows_affected.low) && $util.isInteger(message.rows_affected.high))) - return "rows_affected: integer|Long expected"; - if (message.insert_id != null && message.hasOwnProperty("insert_id")) - if (!$util.isInteger(message.insert_id) && !(message.insert_id && $util.isInteger(message.insert_id.low) && $util.isInteger(message.insert_id.high))) - return "insert_id: integer|Long expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.query.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - return null; - }; - - /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.QueryResult - * @static - * @param {Object.} object Plain object - * @returns {query.QueryResult} QueryResult - */ - QueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.query.QueryResult) - return object; - var message = new $root.query.QueryResult(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".query.QueryResult.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".query.QueryResult.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - if (object.rows_affected != null) - if ($util.Long) - (message.rows_affected = $util.Long.fromValue(object.rows_affected)).unsigned = true; - else if (typeof object.rows_affected === "string") - message.rows_affected = parseInt(object.rows_affected, 10); - else if (typeof object.rows_affected === "number") - message.rows_affected = object.rows_affected; - else if (typeof object.rows_affected === "object") - message.rows_affected = new $util.LongBits(object.rows_affected.low >>> 0, object.rows_affected.high >>> 0).toNumber(true); - if (object.insert_id != null) - if ($util.Long) - (message.insert_id = $util.Long.fromValue(object.insert_id)).unsigned = true; - else if (typeof object.insert_id === "string") - message.insert_id = parseInt(object.insert_id, 10); - else if (typeof object.insert_id === "number") - message.insert_id = object.insert_id; - else if (typeof object.insert_id === "object") - message.insert_id = new $util.LongBits(object.insert_id.low >>> 0, object.insert_id.high >>> 0).toNumber(true); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".query.QueryResult.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".query.QueryResult.rows: object expected"); - message.rows[i] = $root.query.Row.fromObject(object.rows[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @function toObject - * @memberof query.QueryResult - * @static - * @param {query.QueryResult} message QueryResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.rows = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.rows_affected = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rows_affected = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.insert_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.insert_id = options.longs === String ? "0" : 0; - } - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - if (message.rows_affected != null && message.hasOwnProperty("rows_affected")) - if (typeof message.rows_affected === "number") - object.rows_affected = options.longs === String ? String(message.rows_affected) : message.rows_affected; - else - object.rows_affected = options.longs === String ? $util.Long.prototype.toString.call(message.rows_affected) : options.longs === Number ? new $util.LongBits(message.rows_affected.low >>> 0, message.rows_affected.high >>> 0).toNumber(true) : message.rows_affected; - if (message.insert_id != null && message.hasOwnProperty("insert_id")) - if (typeof message.insert_id === "number") - object.insert_id = options.longs === String ? String(message.insert_id) : message.insert_id; - else - object.insert_id = options.longs === String ? $util.Long.prototype.toString.call(message.insert_id) : options.longs === Number ? new $util.LongBits(message.insert_id.low >>> 0, message.insert_id.high >>> 0).toNumber(true) : message.insert_id; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.query.Row.toObject(message.rows[j], options); - } - return object; - }; - - /** - * Converts this QueryResult to JSON. - * @function toJSON - * @memberof query.QueryResult - * @instance - * @returns {Object.} JSON object - */ - QueryResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryResult; - })(); - - query.QueryWarning = (function() { - - /** - * Properties of a QueryWarning. - * @memberof query - * @interface IQueryWarning - * @property {number|null} [code] QueryWarning code - * @property {string|null} [message] QueryWarning message - */ - - /** - * Constructs a new QueryWarning. - * @memberof query - * @classdesc Represents a QueryWarning. - * @implements IQueryWarning - * @constructor - * @param {query.IQueryWarning=} [properties] Properties to set - */ - function QueryWarning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryWarning code. - * @member {number} code - * @memberof query.QueryWarning - * @instance - */ - QueryWarning.prototype.code = 0; - - /** - * QueryWarning message. - * @member {string} message - * @memberof query.QueryWarning - * @instance - */ - QueryWarning.prototype.message = ""; - - /** - * Creates a new QueryWarning instance using the specified properties. - * @function create - * @memberof query.QueryWarning - * @static - * @param {query.IQueryWarning=} [properties] Properties to set - * @returns {query.QueryWarning} QueryWarning instance - */ - QueryWarning.create = function create(properties) { - return new QueryWarning(properties); - }; - - /** - * Encodes the specified QueryWarning message. Does not implicitly {@link query.QueryWarning.verify|verify} messages. - * @function encode - * @memberof query.QueryWarning - * @static - * @param {query.IQueryWarning} message QueryWarning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryWarning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - return writer; - }; - - /** - * Encodes the specified QueryWarning message, length delimited. Does not implicitly {@link query.QueryWarning.verify|verify} messages. - * @function encodeDelimited - * @memberof query.QueryWarning - * @static - * @param {query.IQueryWarning} message QueryWarning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryWarning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryWarning message from the specified reader or buffer. - * @function decode - * @memberof query.QueryWarning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.QueryWarning} QueryWarning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryWarning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.QueryWarning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint32(); - break; - case 2: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryWarning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.QueryWarning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.QueryWarning} QueryWarning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryWarning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryWarning message. - * @function verify - * @memberof query.QueryWarning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryWarning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a QueryWarning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.QueryWarning - * @static - * @param {Object.} object Plain object - * @returns {query.QueryWarning} QueryWarning - */ - QueryWarning.fromObject = function fromObject(object) { - if (object instanceof $root.query.QueryWarning) - return object; - var message = new $root.query.QueryWarning(); - if (object.code != null) - message.code = object.code >>> 0; - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a QueryWarning message. Also converts values to other types if specified. - * @function toObject - * @memberof query.QueryWarning - * @static - * @param {query.QueryWarning} message QueryWarning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryWarning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this QueryWarning to JSON. - * @function toJSON - * @memberof query.QueryWarning - * @instance - * @returns {Object.} JSON object - */ - QueryWarning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryWarning; - })(); - - query.StreamEvent = (function() { - - /** - * Properties of a StreamEvent. - * @memberof query - * @interface IStreamEvent - * @property {Array.|null} [statements] StreamEvent statements - * @property {query.IEventToken|null} [event_token] StreamEvent event_token - */ - - /** - * Constructs a new StreamEvent. - * @memberof query - * @classdesc Represents a StreamEvent. - * @implements IStreamEvent - * @constructor - * @param {query.IStreamEvent=} [properties] Properties to set - */ - function StreamEvent(properties) { - this.statements = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamEvent statements. - * @member {Array.} statements - * @memberof query.StreamEvent - * @instance - */ - StreamEvent.prototype.statements = $util.emptyArray; - - /** - * StreamEvent event_token. - * @member {query.IEventToken|null|undefined} event_token - * @memberof query.StreamEvent - * @instance - */ - StreamEvent.prototype.event_token = null; - - /** - * Creates a new StreamEvent instance using the specified properties. - * @function create - * @memberof query.StreamEvent - * @static - * @param {query.IStreamEvent=} [properties] Properties to set - * @returns {query.StreamEvent} StreamEvent instance - */ - StreamEvent.create = function create(properties) { - return new StreamEvent(properties); - }; - - /** - * Encodes the specified StreamEvent message. Does not implicitly {@link query.StreamEvent.verify|verify} messages. - * @function encode - * @memberof query.StreamEvent - * @static - * @param {query.IStreamEvent} message StreamEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.statements != null && message.statements.length) - for (var i = 0; i < message.statements.length; ++i) - $root.query.StreamEvent.Statement.encode(message.statements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.event_token != null && Object.hasOwnProperty.call(message, "event_token")) - $root.query.EventToken.encode(message.event_token, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamEvent message, length delimited. Does not implicitly {@link query.StreamEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamEvent - * @static - * @param {query.IStreamEvent} message StreamEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamEvent message from the specified reader or buffer. - * @function decode - * @memberof query.StreamEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamEvent} StreamEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.statements && message.statements.length)) - message.statements = []; - message.statements.push($root.query.StreamEvent.Statement.decode(reader, reader.uint32())); - break; - case 2: - message.event_token = $root.query.EventToken.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamEvent} StreamEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamEvent message. - * @function verify - * @memberof query.StreamEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.statements != null && message.hasOwnProperty("statements")) { - if (!Array.isArray(message.statements)) - return "statements: array expected"; - for (var i = 0; i < message.statements.length; ++i) { - var error = $root.query.StreamEvent.Statement.verify(message.statements[i]); - if (error) - return "statements." + error; - } - } - if (message.event_token != null && message.hasOwnProperty("event_token")) { - var error = $root.query.EventToken.verify(message.event_token); - if (error) - return "event_token." + error; - } - return null; - }; - - /** - * Creates a StreamEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamEvent - * @static - * @param {Object.} object Plain object - * @returns {query.StreamEvent} StreamEvent - */ - StreamEvent.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamEvent) - return object; - var message = new $root.query.StreamEvent(); - if (object.statements) { - if (!Array.isArray(object.statements)) - throw TypeError(".query.StreamEvent.statements: array expected"); - message.statements = []; - for (var i = 0; i < object.statements.length; ++i) { - if (typeof object.statements[i] !== "object") - throw TypeError(".query.StreamEvent.statements: object expected"); - message.statements[i] = $root.query.StreamEvent.Statement.fromObject(object.statements[i]); - } - } - if (object.event_token != null) { - if (typeof object.event_token !== "object") - throw TypeError(".query.StreamEvent.event_token: object expected"); - message.event_token = $root.query.EventToken.fromObject(object.event_token); - } - return message; - }; - - /** - * Creates a plain object from a StreamEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamEvent - * @static - * @param {query.StreamEvent} message StreamEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.statements = []; - if (options.defaults) - object.event_token = null; - if (message.statements && message.statements.length) { - object.statements = []; - for (var j = 0; j < message.statements.length; ++j) - object.statements[j] = $root.query.StreamEvent.Statement.toObject(message.statements[j], options); - } - if (message.event_token != null && message.hasOwnProperty("event_token")) - object.event_token = $root.query.EventToken.toObject(message.event_token, options); - return object; - }; - - /** - * Converts this StreamEvent to JSON. - * @function toJSON - * @memberof query.StreamEvent - * @instance - * @returns {Object.} JSON object - */ - StreamEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - StreamEvent.Statement = (function() { - - /** - * Properties of a Statement. - * @memberof query.StreamEvent - * @interface IStatement - * @property {query.StreamEvent.Statement.Category|null} [category] Statement category - * @property {string|null} [table_name] Statement table_name - * @property {Array.|null} [primary_key_fields] Statement primary_key_fields - * @property {Array.|null} [primary_key_values] Statement primary_key_values - * @property {Uint8Array|null} [sql] Statement sql - */ - - /** - * Constructs a new Statement. - * @memberof query.StreamEvent - * @classdesc Represents a Statement. - * @implements IStatement - * @constructor - * @param {query.StreamEvent.IStatement=} [properties] Properties to set - */ - function Statement(properties) { - this.primary_key_fields = []; - this.primary_key_values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Statement category. - * @member {query.StreamEvent.Statement.Category} category - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.category = 0; - - /** - * Statement table_name. - * @member {string} table_name - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.table_name = ""; - - /** - * Statement primary_key_fields. - * @member {Array.} primary_key_fields - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.primary_key_fields = $util.emptyArray; - - /** - * Statement primary_key_values. - * @member {Array.} primary_key_values - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.primary_key_values = $util.emptyArray; - - /** - * Statement sql. - * @member {Uint8Array} sql - * @memberof query.StreamEvent.Statement - * @instance - */ - Statement.prototype.sql = $util.newBuffer([]); - - /** - * Creates a new Statement instance using the specified properties. - * @function create - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.IStatement=} [properties] Properties to set - * @returns {query.StreamEvent.Statement} Statement instance - */ - Statement.create = function create(properties) { - return new Statement(properties); - }; - - /** - * Encodes the specified Statement message. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @function encode - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table_name); - if (message.primary_key_fields != null && message.primary_key_fields.length) - for (var i = 0; i < message.primary_key_fields.length; ++i) - $root.query.Field.encode(message.primary_key_fields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.primary_key_values != null && message.primary_key_values.length) - for (var i = 0; i < message.primary_key_values.length; ++i) - $root.query.Row.encode(message.primary_key_values[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.sql); - return writer; - }; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link query.StreamEvent.Statement.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @function decode - * @memberof query.StreamEvent.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamEvent.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamEvent.Statement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32(); - break; - case 2: - message.table_name = reader.string(); - break; - case 3: - if (!(message.primary_key_fields && message.primary_key_fields.length)) - message.primary_key_fields = []; - message.primary_key_fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.primary_key_values && message.primary_key_values.length)) - message.primary_key_values = []; - message.primary_key_values.push($root.query.Row.decode(reader, reader.uint32())); - break; - case 5: - message.sql = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamEvent.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamEvent.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Statement message. - * @function verify - * @memberof query.StreamEvent.Statement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Statement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.category != null && message.hasOwnProperty("category")) - switch (message.category) { - default: - return "category: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.primary_key_fields != null && message.hasOwnProperty("primary_key_fields")) { - if (!Array.isArray(message.primary_key_fields)) - return "primary_key_fields: array expected"; - for (var i = 0; i < message.primary_key_fields.length; ++i) { - var error = $root.query.Field.verify(message.primary_key_fields[i]); - if (error) - return "primary_key_fields." + error; - } - } - if (message.primary_key_values != null && message.hasOwnProperty("primary_key_values")) { - if (!Array.isArray(message.primary_key_values)) - return "primary_key_values: array expected"; - for (var i = 0; i < message.primary_key_values.length; ++i) { - var error = $root.query.Row.verify(message.primary_key_values[i]); - if (error) - return "primary_key_values." + error; - } - } - if (message.sql != null && message.hasOwnProperty("sql")) - if (!(message.sql && typeof message.sql.length === "number" || $util.isString(message.sql))) - return "sql: buffer expected"; - return null; - }; - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamEvent.Statement - * @static - * @param {Object.} object Plain object - * @returns {query.StreamEvent.Statement} Statement - */ - Statement.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamEvent.Statement) - return object; - var message = new $root.query.StreamEvent.Statement(); - switch (object.category) { - case "Error": - case 0: - message.category = 0; - break; - case "DML": - case 1: - message.category = 1; - break; - case "DDL": - case 2: - message.category = 2; - break; - } - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.primary_key_fields) { - if (!Array.isArray(object.primary_key_fields)) - throw TypeError(".query.StreamEvent.Statement.primary_key_fields: array expected"); - message.primary_key_fields = []; - for (var i = 0; i < object.primary_key_fields.length; ++i) { - if (typeof object.primary_key_fields[i] !== "object") - throw TypeError(".query.StreamEvent.Statement.primary_key_fields: object expected"); - message.primary_key_fields[i] = $root.query.Field.fromObject(object.primary_key_fields[i]); - } - } - if (object.primary_key_values) { - if (!Array.isArray(object.primary_key_values)) - throw TypeError(".query.StreamEvent.Statement.primary_key_values: array expected"); - message.primary_key_values = []; - for (var i = 0; i < object.primary_key_values.length; ++i) { - if (typeof object.primary_key_values[i] !== "object") - throw TypeError(".query.StreamEvent.Statement.primary_key_values: object expected"); - message.primary_key_values[i] = $root.query.Row.fromObject(object.primary_key_values[i]); - } - } - if (object.sql != null) - if (typeof object.sql === "string") - $util.base64.decode(object.sql, message.sql = $util.newBuffer($util.base64.length(object.sql)), 0); - else if (object.sql.length) - message.sql = object.sql; - return message; - }; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamEvent.Statement - * @static - * @param {query.StreamEvent.Statement} message Statement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Statement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.primary_key_fields = []; - object.primary_key_values = []; - } - if (options.defaults) { - object.category = options.enums === String ? "Error" : 0; - object.table_name = ""; - if (options.bytes === String) - object.sql = ""; - else { - object.sql = []; - if (options.bytes !== Array) - object.sql = $util.newBuffer(object.sql); - } - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = options.enums === String ? $root.query.StreamEvent.Statement.Category[message.category] : message.category; - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.primary_key_fields && message.primary_key_fields.length) { - object.primary_key_fields = []; - for (var j = 0; j < message.primary_key_fields.length; ++j) - object.primary_key_fields[j] = $root.query.Field.toObject(message.primary_key_fields[j], options); - } - if (message.primary_key_values && message.primary_key_values.length) { - object.primary_key_values = []; - for (var j = 0; j < message.primary_key_values.length; ++j) - object.primary_key_values[j] = $root.query.Row.toObject(message.primary_key_values[j], options); - } - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = options.bytes === String ? $util.base64.encode(message.sql, 0, message.sql.length) : options.bytes === Array ? Array.prototype.slice.call(message.sql) : message.sql; - return object; - }; - - /** - * Converts this Statement to JSON. - * @function toJSON - * @memberof query.StreamEvent.Statement - * @instance - * @returns {Object.} JSON object - */ - Statement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Category enum. - * @name query.StreamEvent.Statement.Category - * @enum {number} - * @property {number} Error=0 Error value - * @property {number} DML=1 DML value - * @property {number} DDL=2 DDL value - */ - Statement.Category = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "Error"] = 0; - values[valuesById[1] = "DML"] = 1; - values[valuesById[2] = "DDL"] = 2; - return values; - })(); - - return Statement; - })(); - - return StreamEvent; - })(); - - query.ExecuteRequest = (function() { - - /** - * Properties of an ExecuteRequest. - * @memberof query - * @interface IExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ExecuteRequest target - * @property {query.IBoundQuery|null} [query] ExecuteRequest query - * @property {number|Long|null} [transaction_id] ExecuteRequest transaction_id - * @property {query.IExecuteOptions|null} [options] ExecuteRequest options - * @property {number|Long|null} [reserved_id] ExecuteRequest reserved_id - */ - - /** - * Constructs a new ExecuteRequest. - * @memberof query - * @classdesc Represents an ExecuteRequest. - * @implements IExecuteRequest - * @constructor - * @param {query.IExecuteRequest=} [properties] Properties to set - */ - function ExecuteRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.effective_caller_id = null; - - /** - * ExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.immediate_caller_id = null; - - /** - * ExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.target = null; - - /** - * ExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.query = null; - - /** - * ExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.options = null; - - /** - * ExecuteRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ExecuteRequest - * @instance - */ - ExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ExecuteRequest instance using the specified properties. - * @function create - * @memberof query.ExecuteRequest - * @static - * @param {query.IExecuteRequest=} [properties] Properties to set - * @returns {query.ExecuteRequest} ExecuteRequest instance - */ - ExecuteRequest.create = function create(properties) { - return new ExecuteRequest(properties); - }; - - /** - * Encodes the specified ExecuteRequest message. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. - * @function encode - * @memberof query.ExecuteRequest - * @static - * @param {query.IExecuteRequest} message ExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transaction_id); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.reserved_id); - return writer; - }; - - /** - * Encodes the specified ExecuteRequest message, length delimited. Does not implicitly {@link query.ExecuteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ExecuteRequest - * @static - * @param {query.IExecuteRequest} message ExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteRequest} ExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.transaction_id = reader.int64(); - break; - case 6: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 7: - message.reserved_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteRequest} ExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteRequest message. - * @function verify - * @memberof query.ExecuteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - return null; - }; - - /** - * Creates an ExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ExecuteRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ExecuteRequest} ExecuteRequest - */ - ExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteRequest) - return object; - var message = new $root.query.ExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an ExecuteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ExecuteRequest - * @static - * @param {query.ExecuteRequest} message ExecuteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - return object; - }; - - /** - * Converts this ExecuteRequest to JSON. - * @function toJSON - * @memberof query.ExecuteRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteRequest; - })(); - - query.ExecuteResponse = (function() { - - /** - * Properties of an ExecuteResponse. - * @memberof query - * @interface IExecuteResponse - * @property {query.IQueryResult|null} [result] ExecuteResponse result - */ - - /** - * Constructs a new ExecuteResponse. - * @memberof query - * @classdesc Represents an ExecuteResponse. - * @implements IExecuteResponse - * @constructor - * @param {query.IExecuteResponse=} [properties] Properties to set - */ - function ExecuteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ExecuteResponse - * @instance - */ - ExecuteResponse.prototype.result = null; - - /** - * Creates a new ExecuteResponse instance using the specified properties. - * @function create - * @memberof query.ExecuteResponse - * @static - * @param {query.IExecuteResponse=} [properties] Properties to set - * @returns {query.ExecuteResponse} ExecuteResponse instance - */ - ExecuteResponse.create = function create(properties) { - return new ExecuteResponse(properties); - }; - - /** - * Encodes the specified ExecuteResponse message. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. - * @function encode - * @memberof query.ExecuteResponse - * @static - * @param {query.IExecuteResponse} message ExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteResponse message, length delimited. Does not implicitly {@link query.ExecuteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ExecuteResponse - * @static - * @param {query.IExecuteResponse} message ExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteResponse} ExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteResponse} ExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteResponse message. - * @function verify - * @memberof query.ExecuteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates an ExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ExecuteResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ExecuteResponse} ExecuteResponse - */ - ExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteResponse) - return object; - var message = new $root.query.ExecuteResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ExecuteResponse - * @static - * @param {query.ExecuteResponse} message ExecuteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this ExecuteResponse to JSON. - * @function toJSON - * @memberof query.ExecuteResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteResponse; - })(); - - query.ResultWithError = (function() { - - /** - * Properties of a ResultWithError. - * @memberof query - * @interface IResultWithError - * @property {vtrpc.IRPCError|null} [error] ResultWithError error - * @property {query.IQueryResult|null} [result] ResultWithError result - */ - - /** - * Constructs a new ResultWithError. - * @memberof query - * @classdesc Represents a ResultWithError. - * @implements IResultWithError - * @constructor - * @param {query.IResultWithError=} [properties] Properties to set - */ - function ResultWithError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResultWithError error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ResultWithError - * @instance - */ - ResultWithError.prototype.error = null; - - /** - * ResultWithError result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ResultWithError - * @instance - */ - ResultWithError.prototype.result = null; - - /** - * Creates a new ResultWithError instance using the specified properties. - * @function create - * @memberof query.ResultWithError - * @static - * @param {query.IResultWithError=} [properties] Properties to set - * @returns {query.ResultWithError} ResultWithError instance - */ - ResultWithError.create = function create(properties) { - return new ResultWithError(properties); - }; - - /** - * Encodes the specified ResultWithError message. Does not implicitly {@link query.ResultWithError.verify|verify} messages. - * @function encode - * @memberof query.ResultWithError - * @static - * @param {query.IResultWithError} message ResultWithError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResultWithError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResultWithError message, length delimited. Does not implicitly {@link query.ResultWithError.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ResultWithError - * @static - * @param {query.IResultWithError} message ResultWithError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResultWithError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResultWithError message from the specified reader or buffer. - * @function decode - * @memberof query.ResultWithError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ResultWithError} ResultWithError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResultWithError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ResultWithError(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); - break; - case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResultWithError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ResultWithError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ResultWithError} ResultWithError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResultWithError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResultWithError message. - * @function verify - * @memberof query.ResultWithError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResultWithError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a ResultWithError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ResultWithError - * @static - * @param {Object.} object Plain object - * @returns {query.ResultWithError} ResultWithError - */ - ResultWithError.fromObject = function fromObject(object) { - if (object instanceof $root.query.ResultWithError) - return object; - var message = new $root.query.ResultWithError(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ResultWithError.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ResultWithError.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a ResultWithError message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ResultWithError - * @static - * @param {query.ResultWithError} message ResultWithError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResultWithError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.error = null; - object.result = null; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this ResultWithError to JSON. - * @function toJSON - * @memberof query.ResultWithError - * @instance - * @returns {Object.} JSON object - */ - ResultWithError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResultWithError; - })(); - - query.ExecuteBatchRequest = (function() { - - /** - * Properties of an ExecuteBatchRequest. - * @memberof query - * @interface IExecuteBatchRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ExecuteBatchRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ExecuteBatchRequest immediate_caller_id - * @property {query.ITarget|null} [target] ExecuteBatchRequest target - * @property {Array.|null} [queries] ExecuteBatchRequest queries - * @property {boolean|null} [as_transaction] ExecuteBatchRequest as_transaction - * @property {number|Long|null} [transaction_id] ExecuteBatchRequest transaction_id - * @property {query.IExecuteOptions|null} [options] ExecuteBatchRequest options - */ - - /** - * Constructs a new ExecuteBatchRequest. - * @memberof query - * @classdesc Represents an ExecuteBatchRequest. - * @implements IExecuteBatchRequest - * @constructor - * @param {query.IExecuteBatchRequest=} [properties] Properties to set - */ - function ExecuteBatchRequest(properties) { - this.queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteBatchRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.effective_caller_id = null; - - /** - * ExecuteBatchRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.immediate_caller_id = null; - - /** - * ExecuteBatchRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.target = null; - - /** - * ExecuteBatchRequest queries. - * @member {Array.} queries - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.queries = $util.emptyArray; - - /** - * ExecuteBatchRequest as_transaction. - * @member {boolean} as_transaction - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.as_transaction = false; - - /** - * ExecuteBatchRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExecuteBatchRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ExecuteBatchRequest - * @instance - */ - ExecuteBatchRequest.prototype.options = null; - - /** - * Creates a new ExecuteBatchRequest instance using the specified properties. - * @function create - * @memberof query.ExecuteBatchRequest - * @static - * @param {query.IExecuteBatchRequest=} [properties] Properties to set - * @returns {query.ExecuteBatchRequest} ExecuteBatchRequest instance - */ - ExecuteBatchRequest.create = function create(properties) { - return new ExecuteBatchRequest(properties); - }; - - /** - * Encodes the specified ExecuteBatchRequest message. Does not implicitly {@link query.ExecuteBatchRequest.verify|verify} messages. - * @function encode - * @memberof query.ExecuteBatchRequest - * @static - * @param {query.IExecuteBatchRequest} message ExecuteBatchRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteBatchRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.queries != null && message.queries.length) - for (var i = 0; i < message.queries.length; ++i) - $root.query.BoundQuery.encode(message.queries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.as_transaction != null && Object.hasOwnProperty.call(message, "as_transaction")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.as_transaction); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.transaction_id); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteBatchRequest message, length delimited. Does not implicitly {@link query.ExecuteBatchRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ExecuteBatchRequest - * @static - * @param {query.IExecuteBatchRequest} message ExecuteBatchRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteBatchRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteBatchRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ExecuteBatchRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteBatchRequest} ExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteBatchRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteBatchRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.queries && message.queries.length)) - message.queries = []; - message.queries.push($root.query.BoundQuery.decode(reader, reader.uint32())); - break; - case 5: - message.as_transaction = reader.bool(); - break; - case 6: - message.transaction_id = reader.int64(); - break; - case 7: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteBatchRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ExecuteBatchRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteBatchRequest} ExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteBatchRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteBatchRequest message. - * @function verify - * @memberof query.ExecuteBatchRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteBatchRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.queries != null && message.hasOwnProperty("queries")) { - if (!Array.isArray(message.queries)) - return "queries: array expected"; - for (var i = 0; i < message.queries.length; ++i) { - var error = $root.query.BoundQuery.verify(message.queries[i]); - if (error) - return "queries." + error; - } - } - if (message.as_transaction != null && message.hasOwnProperty("as_transaction")) - if (typeof message.as_transaction !== "boolean") - return "as_transaction: boolean expected"; - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExecuteBatchRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ExecuteBatchRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ExecuteBatchRequest} ExecuteBatchRequest - */ - ExecuteBatchRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteBatchRequest) - return object; - var message = new $root.query.ExecuteBatchRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ExecuteBatchRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ExecuteBatchRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ExecuteBatchRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.queries) { - if (!Array.isArray(object.queries)) - throw TypeError(".query.ExecuteBatchRequest.queries: array expected"); - message.queries = []; - for (var i = 0; i < object.queries.length; ++i) { - if (typeof object.queries[i] !== "object") - throw TypeError(".query.ExecuteBatchRequest.queries: object expected"); - message.queries[i] = $root.query.BoundQuery.fromObject(object.queries[i]); - } - } - if (object.as_transaction != null) - message.as_transaction = Boolean(object.as_transaction); - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ExecuteBatchRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteBatchRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ExecuteBatchRequest - * @static - * @param {query.ExecuteBatchRequest} message ExecuteBatchRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteBatchRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.as_transaction = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.queries && message.queries.length) { - object.queries = []; - for (var j = 0; j < message.queries.length; ++j) - object.queries[j] = $root.query.BoundQuery.toObject(message.queries[j], options); - } - if (message.as_transaction != null && message.hasOwnProperty("as_transaction")) - object.as_transaction = message.as_transaction; - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExecuteBatchRequest to JSON. - * @function toJSON - * @memberof query.ExecuteBatchRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteBatchRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteBatchRequest; - })(); - - query.ExecuteBatchResponse = (function() { - - /** - * Properties of an ExecuteBatchResponse. - * @memberof query - * @interface IExecuteBatchResponse - * @property {Array.|null} [results] ExecuteBatchResponse results - */ - - /** - * Constructs a new ExecuteBatchResponse. - * @memberof query - * @classdesc Represents an ExecuteBatchResponse. - * @implements IExecuteBatchResponse - * @constructor - * @param {query.IExecuteBatchResponse=} [properties] Properties to set - */ - function ExecuteBatchResponse(properties) { - this.results = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteBatchResponse results. - * @member {Array.} results - * @memberof query.ExecuteBatchResponse - * @instance - */ - ExecuteBatchResponse.prototype.results = $util.emptyArray; - - /** - * Creates a new ExecuteBatchResponse instance using the specified properties. - * @function create - * @memberof query.ExecuteBatchResponse - * @static - * @param {query.IExecuteBatchResponse=} [properties] Properties to set - * @returns {query.ExecuteBatchResponse} ExecuteBatchResponse instance - */ - ExecuteBatchResponse.create = function create(properties) { - return new ExecuteBatchResponse(properties); - }; - - /** - * Encodes the specified ExecuteBatchResponse message. Does not implicitly {@link query.ExecuteBatchResponse.verify|verify} messages. - * @function encode - * @memberof query.ExecuteBatchResponse - * @static - * @param {query.IExecuteBatchResponse} message ExecuteBatchResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteBatchResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.query.QueryResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteBatchResponse message, length delimited. Does not implicitly {@link query.ExecuteBatchResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ExecuteBatchResponse - * @static - * @param {query.IExecuteBatchResponse} message ExecuteBatchResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteBatchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteBatchResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ExecuteBatchResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ExecuteBatchResponse} ExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteBatchResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ExecuteBatchResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.query.QueryResult.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteBatchResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ExecuteBatchResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ExecuteBatchResponse} ExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteBatchResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteBatchResponse message. - * @function verify - * @memberof query.ExecuteBatchResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteBatchResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.query.QueryResult.verify(message.results[i]); - if (error) - return "results." + error; - } - } - return null; - }; - - /** - * Creates an ExecuteBatchResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ExecuteBatchResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ExecuteBatchResponse} ExecuteBatchResponse - */ - ExecuteBatchResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ExecuteBatchResponse) - return object; - var message = new $root.query.ExecuteBatchResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".query.ExecuteBatchResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".query.ExecuteBatchResponse.results: object expected"); - message.results[i] = $root.query.QueryResult.fromObject(object.results[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExecuteBatchResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ExecuteBatchResponse - * @static - * @param {query.ExecuteBatchResponse} message ExecuteBatchResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteBatchResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.query.QueryResult.toObject(message.results[j], options); - } - return object; - }; - - /** - * Converts this ExecuteBatchResponse to JSON. - * @function toJSON - * @memberof query.ExecuteBatchResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteBatchResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteBatchResponse; - })(); - - query.StreamExecuteRequest = (function() { - - /** - * Properties of a StreamExecuteRequest. - * @memberof query - * @interface IStreamExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] StreamExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] StreamExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] StreamExecuteRequest target - * @property {query.IBoundQuery|null} [query] StreamExecuteRequest query - * @property {query.IExecuteOptions|null} [options] StreamExecuteRequest options - * @property {number|Long|null} [transaction_id] StreamExecuteRequest transaction_id - */ - - /** - * Constructs a new StreamExecuteRequest. - * @memberof query - * @classdesc Represents a StreamExecuteRequest. - * @implements IStreamExecuteRequest - * @constructor - * @param {query.IStreamExecuteRequest=} [properties] Properties to set - */ - function StreamExecuteRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.effective_caller_id = null; - - /** - * StreamExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.immediate_caller_id = null; - - /** - * StreamExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.target = null; - - /** - * StreamExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.query = null; - - /** - * StreamExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.options = null; - - /** - * StreamExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.StreamExecuteRequest - * @instance - */ - StreamExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new StreamExecuteRequest instance using the specified properties. - * @function create - * @memberof query.StreamExecuteRequest - * @static - * @param {query.IStreamExecuteRequest=} [properties] Properties to set - * @returns {query.StreamExecuteRequest} StreamExecuteRequest instance - */ - StreamExecuteRequest.create = function create(properties) { - return new StreamExecuteRequest(properties); - }; - - /** - * Encodes the specified StreamExecuteRequest message. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. - * @function encode - * @memberof query.StreamExecuteRequest - * @static - * @param {query.IStreamExecuteRequest} message StreamExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamExecuteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.transaction_id); - return writer; - }; - - /** - * Encodes the specified StreamExecuteRequest message, length delimited. Does not implicitly {@link query.StreamExecuteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamExecuteRequest - * @static - * @param {query.IStreamExecuteRequest} message StreamExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer. - * @function decode - * @memberof query.StreamExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamExecuteRequest} StreamExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamExecuteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamExecuteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - message.transaction_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamExecuteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamExecuteRequest} StreamExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamExecuteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamExecuteRequest message. - * @function verify - * @memberof query.StreamExecuteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamExecuteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - return null; - }; - - /** - * Creates a StreamExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamExecuteRequest - * @static - * @param {Object.} object Plain object - * @returns {query.StreamExecuteRequest} StreamExecuteRequest - */ - StreamExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamExecuteRequest) - return object; - var message = new $root.query.StreamExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.StreamExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.StreamExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.StreamExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.StreamExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.StreamExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a StreamExecuteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamExecuteRequest - * @static - * @param {query.StreamExecuteRequest} message StreamExecuteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamExecuteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - return object; - }; - - /** - * Converts this StreamExecuteRequest to JSON. - * @function toJSON - * @memberof query.StreamExecuteRequest - * @instance - * @returns {Object.} JSON object - */ - StreamExecuteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamExecuteRequest; - })(); - - query.StreamExecuteResponse = (function() { - - /** - * Properties of a StreamExecuteResponse. - * @memberof query - * @interface IStreamExecuteResponse - * @property {query.IQueryResult|null} [result] StreamExecuteResponse result - */ - - /** - * Constructs a new StreamExecuteResponse. - * @memberof query - * @classdesc Represents a StreamExecuteResponse. - * @implements IStreamExecuteResponse - * @constructor - * @param {query.IStreamExecuteResponse=} [properties] Properties to set - */ - function StreamExecuteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.StreamExecuteResponse - * @instance - */ - StreamExecuteResponse.prototype.result = null; - - /** - * Creates a new StreamExecuteResponse instance using the specified properties. - * @function create - * @memberof query.StreamExecuteResponse - * @static - * @param {query.IStreamExecuteResponse=} [properties] Properties to set - * @returns {query.StreamExecuteResponse} StreamExecuteResponse instance - */ - StreamExecuteResponse.create = function create(properties) { - return new StreamExecuteResponse(properties); - }; - - /** - * Encodes the specified StreamExecuteResponse message. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. - * @function encode - * @memberof query.StreamExecuteResponse - * @static - * @param {query.IStreamExecuteResponse} message StreamExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamExecuteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamExecuteResponse message, length delimited. Does not implicitly {@link query.StreamExecuteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamExecuteResponse - * @static - * @param {query.IStreamExecuteResponse} message StreamExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer. - * @function decode - * @memberof query.StreamExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamExecuteResponse} StreamExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamExecuteResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamExecuteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamExecuteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamExecuteResponse} StreamExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamExecuteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamExecuteResponse message. - * @function verify - * @memberof query.StreamExecuteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamExecuteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a StreamExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamExecuteResponse - * @static - * @param {Object.} object Plain object - * @returns {query.StreamExecuteResponse} StreamExecuteResponse - */ - StreamExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamExecuteResponse) - return object; - var message = new $root.query.StreamExecuteResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.StreamExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a StreamExecuteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamExecuteResponse - * @static - * @param {query.StreamExecuteResponse} message StreamExecuteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamExecuteResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this StreamExecuteResponse to JSON. - * @function toJSON - * @memberof query.StreamExecuteResponse - * @instance - * @returns {Object.} JSON object - */ - StreamExecuteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamExecuteResponse; - })(); - - query.BeginRequest = (function() { - - /** - * Properties of a BeginRequest. - * @memberof query - * @interface IBeginRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginRequest immediate_caller_id - * @property {query.ITarget|null} [target] BeginRequest target - * @property {query.IExecuteOptions|null} [options] BeginRequest options - */ - - /** - * Constructs a new BeginRequest. - * @memberof query - * @classdesc Represents a BeginRequest. - * @implements IBeginRequest - * @constructor - * @param {query.IBeginRequest=} [properties] Properties to set - */ - function BeginRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BeginRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.BeginRequest - * @instance - */ - BeginRequest.prototype.effective_caller_id = null; - - /** - * BeginRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.BeginRequest - * @instance - */ - BeginRequest.prototype.immediate_caller_id = null; - - /** - * BeginRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.BeginRequest - * @instance - */ - BeginRequest.prototype.target = null; - - /** - * BeginRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.BeginRequest - * @instance - */ - BeginRequest.prototype.options = null; - - /** - * Creates a new BeginRequest instance using the specified properties. - * @function create - * @memberof query.BeginRequest - * @static - * @param {query.IBeginRequest=} [properties] Properties to set - * @returns {query.BeginRequest} BeginRequest instance - */ - BeginRequest.create = function create(properties) { - return new BeginRequest(properties); - }; - - /** - * Encodes the specified BeginRequest message. Does not implicitly {@link query.BeginRequest.verify|verify} messages. - * @function encode - * @memberof query.BeginRequest - * @static - * @param {query.IBeginRequest} message BeginRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BeginRequest message, length delimited. Does not implicitly {@link query.BeginRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginRequest - * @static - * @param {query.IBeginRequest} message BeginRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginRequest message from the specified reader or buffer. - * @function decode - * @memberof query.BeginRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginRequest} BeginRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BeginRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginRequest} BeginRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BeginRequest message. - * @function verify - * @memberof query.BeginRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BeginRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a BeginRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginRequest - * @static - * @param {Object.} object Plain object - * @returns {query.BeginRequest} BeginRequest - */ - BeginRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginRequest) - return object; - var message = new $root.query.BeginRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.BeginRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.BeginRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.BeginRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.BeginRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a BeginRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginRequest - * @static - * @param {query.BeginRequest} message BeginRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BeginRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this BeginRequest to JSON. - * @function toJSON - * @memberof query.BeginRequest - * @instance - * @returns {Object.} JSON object - */ - BeginRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginRequest; - })(); - - query.BeginResponse = (function() { - - /** - * Properties of a BeginResponse. - * @memberof query - * @interface IBeginResponse - * @property {number|Long|null} [transaction_id] BeginResponse transaction_id - * @property {topodata.ITabletAlias|null} [tablet_alias] BeginResponse tablet_alias - */ - - /** - * Constructs a new BeginResponse. - * @memberof query - * @classdesc Represents a BeginResponse. - * @implements IBeginResponse - * @constructor - * @param {query.IBeginResponse=} [properties] Properties to set - */ - function BeginResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BeginResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.BeginResponse - * @instance - */ - BeginResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BeginResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.BeginResponse - * @instance - */ - BeginResponse.prototype.tablet_alias = null; - - /** - * Creates a new BeginResponse instance using the specified properties. - * @function create - * @memberof query.BeginResponse - * @static - * @param {query.IBeginResponse=} [properties] Properties to set - * @returns {query.BeginResponse} BeginResponse instance - */ - BeginResponse.create = function create(properties) { - return new BeginResponse(properties); - }; - - /** - * Encodes the specified BeginResponse message. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @function encode - * @memberof query.BeginResponse - * @static - * @param {query.IBeginResponse} message BeginResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transaction_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BeginResponse message, length delimited. Does not implicitly {@link query.BeginResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginResponse - * @static - * @param {query.IBeginResponse} message BeginResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginResponse message from the specified reader or buffer. - * @function decode - * @memberof query.BeginResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginResponse} BeginResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.transaction_id = reader.int64(); - break; - case 2: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BeginResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginResponse} BeginResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BeginResponse message. - * @function verify - * @memberof query.BeginResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BeginResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a BeginResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginResponse - * @static - * @param {Object.} object Plain object - * @returns {query.BeginResponse} BeginResponse - */ - BeginResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginResponse) - return object; - var message = new $root.query.BeginResponse(); - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.BeginResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a BeginResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginResponse - * @static - * @param {query.BeginResponse} message BeginResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BeginResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this BeginResponse to JSON. - * @function toJSON - * @memberof query.BeginResponse - * @instance - * @returns {Object.} JSON object - */ - BeginResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginResponse; - })(); - - query.CommitRequest = (function() { - - /** - * Properties of a CommitRequest. - * @memberof query - * @interface ICommitRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] CommitRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] CommitRequest immediate_caller_id - * @property {query.ITarget|null} [target] CommitRequest target - * @property {number|Long|null} [transaction_id] CommitRequest transaction_id - */ - - /** - * Constructs a new CommitRequest. - * @memberof query - * @classdesc Represents a CommitRequest. - * @implements ICommitRequest - * @constructor - * @param {query.ICommitRequest=} [properties] Properties to set - */ - function CommitRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.CommitRequest - * @instance - */ - CommitRequest.prototype.effective_caller_id = null; - - /** - * CommitRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.CommitRequest - * @instance - */ - CommitRequest.prototype.immediate_caller_id = null; - - /** - * CommitRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.CommitRequest - * @instance - */ - CommitRequest.prototype.target = null; - - /** - * CommitRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.CommitRequest - * @instance - */ - CommitRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CommitRequest instance using the specified properties. - * @function create - * @memberof query.CommitRequest - * @static - * @param {query.ICommitRequest=} [properties] Properties to set - * @returns {query.CommitRequest} CommitRequest instance - */ - CommitRequest.create = function create(properties) { - return new CommitRequest(properties); - }; - - /** - * Encodes the specified CommitRequest message. Does not implicitly {@link query.CommitRequest.verify|verify} messages. - * @function encode - * @memberof query.CommitRequest - * @static - * @param {query.ICommitRequest} message CommitRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - return writer; - }; - - /** - * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link query.CommitRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.CommitRequest - * @static - * @param {query.ICommitRequest} message CommitRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitRequest message from the specified reader or buffer. - * @function decode - * @memberof query.CommitRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.CommitRequest} CommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.CommitRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitRequest} CommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitRequest message. - * @function verify - * @memberof query.CommitRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - return null; - }; - - /** - * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.CommitRequest - * @static - * @param {Object.} object Plain object - * @returns {query.CommitRequest} CommitRequest - */ - CommitRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitRequest) - return object; - var message = new $root.query.CommitRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.CommitRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.CommitRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.CommitRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CommitRequest - * @static - * @param {query.CommitRequest} message CommitRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - return object; - }; - - /** - * Converts this CommitRequest to JSON. - * @function toJSON - * @memberof query.CommitRequest - * @instance - * @returns {Object.} JSON object - */ - CommitRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitRequest; - })(); - - query.CommitResponse = (function() { - - /** - * Properties of a CommitResponse. - * @memberof query - * @interface ICommitResponse - * @property {number|Long|null} [reserved_id] CommitResponse reserved_id - */ - - /** - * Constructs a new CommitResponse. - * @memberof query - * @classdesc Represents a CommitResponse. - * @implements ICommitResponse - * @constructor - * @param {query.ICommitResponse=} [properties] Properties to set - */ - function CommitResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.CommitResponse - * @instance - */ - CommitResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CommitResponse instance using the specified properties. - * @function create - * @memberof query.CommitResponse - * @static - * @param {query.ICommitResponse=} [properties] Properties to set - * @returns {query.CommitResponse} CommitResponse instance - */ - CommitResponse.create = function create(properties) { - return new CommitResponse(properties); - }; - - /** - * Encodes the specified CommitResponse message. Does not implicitly {@link query.CommitResponse.verify|verify} messages. - * @function encode - * @memberof query.CommitResponse - * @static - * @param {query.ICommitResponse} message CommitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.reserved_id); - return writer; - }; - - /** - * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link query.CommitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.CommitResponse - * @static - * @param {query.ICommitResponse} message CommitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitResponse message from the specified reader or buffer. - * @function decode - * @memberof query.CommitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.CommitResponse} CommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reserved_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.CommitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitResponse} CommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitResponse message. - * @function verify - * @memberof query.CommitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - return null; - }; - - /** - * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.CommitResponse - * @static - * @param {Object.} object Plain object - * @returns {query.CommitResponse} CommitResponse - */ - CommitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitResponse) - return object; - var message = new $root.query.CommitResponse(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CommitResponse - * @static - * @param {query.CommitResponse} message CommitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - return object; - }; - - /** - * Converts this CommitResponse to JSON. - * @function toJSON - * @memberof query.CommitResponse - * @instance - * @returns {Object.} JSON object - */ - CommitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitResponse; - })(); - - query.RollbackRequest = (function() { - - /** - * Properties of a RollbackRequest. - * @memberof query - * @interface IRollbackRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] RollbackRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] RollbackRequest immediate_caller_id - * @property {query.ITarget|null} [target] RollbackRequest target - * @property {number|Long|null} [transaction_id] RollbackRequest transaction_id - */ - - /** - * Constructs a new RollbackRequest. - * @memberof query - * @classdesc Represents a RollbackRequest. - * @implements IRollbackRequest - * @constructor - * @param {query.IRollbackRequest=} [properties] Properties to set - */ - function RollbackRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RollbackRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.effective_caller_id = null; - - /** - * RollbackRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.immediate_caller_id = null; - - /** - * RollbackRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.target = null; - - /** - * RollbackRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.RollbackRequest - * @instance - */ - RollbackRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new RollbackRequest instance using the specified properties. - * @function create - * @memberof query.RollbackRequest - * @static - * @param {query.IRollbackRequest=} [properties] Properties to set - * @returns {query.RollbackRequest} RollbackRequest instance - */ - RollbackRequest.create = function create(properties) { - return new RollbackRequest(properties); - }; - - /** - * Encodes the specified RollbackRequest message. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. - * @function encode - * @memberof query.RollbackRequest - * @static - * @param {query.IRollbackRequest} message RollbackRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - return writer; - }; - - /** - * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link query.RollbackRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.RollbackRequest - * @static - * @param {query.IRollbackRequest} message RollbackRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RollbackRequest message from the specified reader or buffer. - * @function decode - * @memberof query.RollbackRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackRequest} RollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.RollbackRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackRequest} RollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackRequest message. - * @function verify - * @memberof query.RollbackRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - return null; - }; - - /** - * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.RollbackRequest - * @static - * @param {Object.} object Plain object - * @returns {query.RollbackRequest} RollbackRequest - */ - RollbackRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackRequest) - return object; - var message = new $root.query.RollbackRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.RollbackRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.RollbackRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.RollbackRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.RollbackRequest - * @static - * @param {query.RollbackRequest} message RollbackRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - return object; - }; - - /** - * Converts this RollbackRequest to JSON. - * @function toJSON - * @memberof query.RollbackRequest - * @instance - * @returns {Object.} JSON object - */ - RollbackRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RollbackRequest; - })(); - - query.RollbackResponse = (function() { - - /** - * Properties of a RollbackResponse. - * @memberof query - * @interface IRollbackResponse - * @property {number|Long|null} [reserved_id] RollbackResponse reserved_id - */ - - /** - * Constructs a new RollbackResponse. - * @memberof query - * @classdesc Represents a RollbackResponse. - * @implements IRollbackResponse - * @constructor - * @param {query.IRollbackResponse=} [properties] Properties to set - */ - function RollbackResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RollbackResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.RollbackResponse - * @instance - */ - RollbackResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new RollbackResponse instance using the specified properties. - * @function create - * @memberof query.RollbackResponse - * @static - * @param {query.IRollbackResponse=} [properties] Properties to set - * @returns {query.RollbackResponse} RollbackResponse instance - */ - RollbackResponse.create = function create(properties) { - return new RollbackResponse(properties); - }; - - /** - * Encodes the specified RollbackResponse message. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. - * @function encode - * @memberof query.RollbackResponse - * @static - * @param {query.IRollbackResponse} message RollbackResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.reserved_id); - return writer; - }; - - /** - * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link query.RollbackResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.RollbackResponse - * @static - * @param {query.IRollbackResponse} message RollbackResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RollbackResponse message from the specified reader or buffer. - * @function decode - * @memberof query.RollbackResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackResponse} RollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reserved_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.RollbackResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackResponse} RollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackResponse message. - * @function verify - * @memberof query.RollbackResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - return null; - }; - - /** - * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.RollbackResponse - * @static - * @param {Object.} object Plain object - * @returns {query.RollbackResponse} RollbackResponse - */ - RollbackResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackResponse) - return object; - var message = new $root.query.RollbackResponse(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.RollbackResponse - * @static - * @param {query.RollbackResponse} message RollbackResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - return object; - }; - - /** - * Converts this RollbackResponse to JSON. - * @function toJSON - * @memberof query.RollbackResponse - * @instance - * @returns {Object.} JSON object - */ - RollbackResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RollbackResponse; - })(); - - query.PrepareRequest = (function() { - - /** - * Properties of a PrepareRequest. - * @memberof query - * @interface IPrepareRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] PrepareRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] PrepareRequest immediate_caller_id - * @property {query.ITarget|null} [target] PrepareRequest target - * @property {number|Long|null} [transaction_id] PrepareRequest transaction_id - * @property {string|null} [dtid] PrepareRequest dtid - */ - - /** - * Constructs a new PrepareRequest. - * @memberof query - * @classdesc Represents a PrepareRequest. - * @implements IPrepareRequest - * @constructor - * @param {query.IPrepareRequest=} [properties] Properties to set - */ - function PrepareRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrepareRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.effective_caller_id = null; - - /** - * PrepareRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.immediate_caller_id = null; - - /** - * PrepareRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.target = null; - - /** - * PrepareRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PrepareRequest dtid. - * @member {string} dtid - * @memberof query.PrepareRequest - * @instance - */ - PrepareRequest.prototype.dtid = ""; - - /** - * Creates a new PrepareRequest instance using the specified properties. - * @function create - * @memberof query.PrepareRequest - * @static - * @param {query.IPrepareRequest=} [properties] Properties to set - * @returns {query.PrepareRequest} PrepareRequest instance - */ - PrepareRequest.create = function create(properties) { - return new PrepareRequest(properties); - }; - - /** - * Encodes the specified PrepareRequest message. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. - * @function encode - * @memberof query.PrepareRequest - * @static - * @param {query.IPrepareRequest} message PrepareRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrepareRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified PrepareRequest message, length delimited. Does not implicitly {@link query.PrepareRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.PrepareRequest - * @static - * @param {query.IPrepareRequest} message PrepareRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrepareRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrepareRequest message from the specified reader or buffer. - * @function decode - * @memberof query.PrepareRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.PrepareRequest} PrepareRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrepareRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.PrepareRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrepareRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.PrepareRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.PrepareRequest} PrepareRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrepareRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrepareRequest message. - * @function verify - * @memberof query.PrepareRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrepareRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a PrepareRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.PrepareRequest - * @static - * @param {Object.} object Plain object - * @returns {query.PrepareRequest} PrepareRequest - */ - PrepareRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.PrepareRequest) - return object; - var message = new $root.query.PrepareRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.PrepareRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.PrepareRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.PrepareRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a PrepareRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.PrepareRequest - * @static - * @param {query.PrepareRequest} message PrepareRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrepareRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this PrepareRequest to JSON. - * @function toJSON - * @memberof query.PrepareRequest - * @instance - * @returns {Object.} JSON object - */ - PrepareRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PrepareRequest; - })(); - - query.PrepareResponse = (function() { - - /** - * Properties of a PrepareResponse. - * @memberof query - * @interface IPrepareResponse - */ - - /** - * Constructs a new PrepareResponse. - * @memberof query - * @classdesc Represents a PrepareResponse. - * @implements IPrepareResponse - * @constructor - * @param {query.IPrepareResponse=} [properties] Properties to set - */ - function PrepareResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new PrepareResponse instance using the specified properties. - * @function create - * @memberof query.PrepareResponse - * @static - * @param {query.IPrepareResponse=} [properties] Properties to set - * @returns {query.PrepareResponse} PrepareResponse instance - */ - PrepareResponse.create = function create(properties) { - return new PrepareResponse(properties); - }; - - /** - * Encodes the specified PrepareResponse message. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. - * @function encode - * @memberof query.PrepareResponse - * @static - * @param {query.IPrepareResponse} message PrepareResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrepareResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PrepareResponse message, length delimited. Does not implicitly {@link query.PrepareResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.PrepareResponse - * @static - * @param {query.IPrepareResponse} message PrepareResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrepareResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrepareResponse message from the specified reader or buffer. - * @function decode - * @memberof query.PrepareResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.PrepareResponse} PrepareResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrepareResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.PrepareResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrepareResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.PrepareResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.PrepareResponse} PrepareResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrepareResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrepareResponse message. - * @function verify - * @memberof query.PrepareResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrepareResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PrepareResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.PrepareResponse - * @static - * @param {Object.} object Plain object - * @returns {query.PrepareResponse} PrepareResponse - */ - PrepareResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.PrepareResponse) - return object; - return new $root.query.PrepareResponse(); - }; - - /** - * Creates a plain object from a PrepareResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.PrepareResponse - * @static - * @param {query.PrepareResponse} message PrepareResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrepareResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PrepareResponse to JSON. - * @function toJSON - * @memberof query.PrepareResponse - * @instance - * @returns {Object.} JSON object - */ - PrepareResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PrepareResponse; - })(); - - query.CommitPreparedRequest = (function() { - - /** - * Properties of a CommitPreparedRequest. - * @memberof query - * @interface ICommitPreparedRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] CommitPreparedRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] CommitPreparedRequest immediate_caller_id - * @property {query.ITarget|null} [target] CommitPreparedRequest target - * @property {string|null} [dtid] CommitPreparedRequest dtid - */ - - /** - * Constructs a new CommitPreparedRequest. - * @memberof query - * @classdesc Represents a CommitPreparedRequest. - * @implements ICommitPreparedRequest - * @constructor - * @param {query.ICommitPreparedRequest=} [properties] Properties to set - */ - function CommitPreparedRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitPreparedRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.CommitPreparedRequest - * @instance - */ - CommitPreparedRequest.prototype.effective_caller_id = null; - - /** - * CommitPreparedRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.CommitPreparedRequest - * @instance - */ - CommitPreparedRequest.prototype.immediate_caller_id = null; - - /** - * CommitPreparedRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.CommitPreparedRequest - * @instance - */ - CommitPreparedRequest.prototype.target = null; - - /** - * CommitPreparedRequest dtid. - * @member {string} dtid - * @memberof query.CommitPreparedRequest - * @instance - */ - CommitPreparedRequest.prototype.dtid = ""; - - /** - * Creates a new CommitPreparedRequest instance using the specified properties. - * @function create - * @memberof query.CommitPreparedRequest - * @static - * @param {query.ICommitPreparedRequest=} [properties] Properties to set - * @returns {query.CommitPreparedRequest} CommitPreparedRequest instance - */ - CommitPreparedRequest.create = function create(properties) { - return new CommitPreparedRequest(properties); - }; - - /** - * Encodes the specified CommitPreparedRequest message. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. - * @function encode - * @memberof query.CommitPreparedRequest - * @static - * @param {query.ICommitPreparedRequest} message CommitPreparedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitPreparedRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified CommitPreparedRequest message, length delimited. Does not implicitly {@link query.CommitPreparedRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.CommitPreparedRequest - * @static - * @param {query.ICommitPreparedRequest} message CommitPreparedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitPreparedRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer. - * @function decode - * @memberof query.CommitPreparedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.CommitPreparedRequest} CommitPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitPreparedRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitPreparedRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitPreparedRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.CommitPreparedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitPreparedRequest} CommitPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitPreparedRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitPreparedRequest message. - * @function verify - * @memberof query.CommitPreparedRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitPreparedRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a CommitPreparedRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.CommitPreparedRequest - * @static - * @param {Object.} object Plain object - * @returns {query.CommitPreparedRequest} CommitPreparedRequest - */ - CommitPreparedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitPreparedRequest) - return object; - var message = new $root.query.CommitPreparedRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.CommitPreparedRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.CommitPreparedRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.CommitPreparedRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a CommitPreparedRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CommitPreparedRequest - * @static - * @param {query.CommitPreparedRequest} message CommitPreparedRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitPreparedRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this CommitPreparedRequest to JSON. - * @function toJSON - * @memberof query.CommitPreparedRequest - * @instance - * @returns {Object.} JSON object - */ - CommitPreparedRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitPreparedRequest; - })(); - - query.CommitPreparedResponse = (function() { - - /** - * Properties of a CommitPreparedResponse. - * @memberof query - * @interface ICommitPreparedResponse - */ - - /** - * Constructs a new CommitPreparedResponse. - * @memberof query - * @classdesc Represents a CommitPreparedResponse. - * @implements ICommitPreparedResponse - * @constructor - * @param {query.ICommitPreparedResponse=} [properties] Properties to set - */ - function CommitPreparedResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new CommitPreparedResponse instance using the specified properties. - * @function create - * @memberof query.CommitPreparedResponse - * @static - * @param {query.ICommitPreparedResponse=} [properties] Properties to set - * @returns {query.CommitPreparedResponse} CommitPreparedResponse instance - */ - CommitPreparedResponse.create = function create(properties) { - return new CommitPreparedResponse(properties); - }; - - /** - * Encodes the specified CommitPreparedResponse message. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. - * @function encode - * @memberof query.CommitPreparedResponse - * @static - * @param {query.ICommitPreparedResponse} message CommitPreparedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitPreparedResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified CommitPreparedResponse message, length delimited. Does not implicitly {@link query.CommitPreparedResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.CommitPreparedResponse - * @static - * @param {query.ICommitPreparedResponse} message CommitPreparedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitPreparedResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer. - * @function decode - * @memberof query.CommitPreparedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.CommitPreparedResponse} CommitPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitPreparedResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CommitPreparedResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitPreparedResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.CommitPreparedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CommitPreparedResponse} CommitPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitPreparedResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitPreparedResponse message. - * @function verify - * @memberof query.CommitPreparedResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitPreparedResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a CommitPreparedResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.CommitPreparedResponse - * @static - * @param {Object.} object Plain object - * @returns {query.CommitPreparedResponse} CommitPreparedResponse - */ - CommitPreparedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.CommitPreparedResponse) - return object; - return new $root.query.CommitPreparedResponse(); - }; - - /** - * Creates a plain object from a CommitPreparedResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CommitPreparedResponse - * @static - * @param {query.CommitPreparedResponse} message CommitPreparedResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitPreparedResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this CommitPreparedResponse to JSON. - * @function toJSON - * @memberof query.CommitPreparedResponse - * @instance - * @returns {Object.} JSON object - */ - CommitPreparedResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitPreparedResponse; - })(); - - query.RollbackPreparedRequest = (function() { - - /** - * Properties of a RollbackPreparedRequest. - * @memberof query - * @interface IRollbackPreparedRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] RollbackPreparedRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] RollbackPreparedRequest immediate_caller_id - * @property {query.ITarget|null} [target] RollbackPreparedRequest target - * @property {number|Long|null} [transaction_id] RollbackPreparedRequest transaction_id - * @property {string|null} [dtid] RollbackPreparedRequest dtid - */ - - /** - * Constructs a new RollbackPreparedRequest. - * @memberof query - * @classdesc Represents a RollbackPreparedRequest. - * @implements IRollbackPreparedRequest - * @constructor - * @param {query.IRollbackPreparedRequest=} [properties] Properties to set - */ - function RollbackPreparedRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RollbackPreparedRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.effective_caller_id = null; - - /** - * RollbackPreparedRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.immediate_caller_id = null; - - /** - * RollbackPreparedRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.target = null; - - /** - * RollbackPreparedRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RollbackPreparedRequest dtid. - * @member {string} dtid - * @memberof query.RollbackPreparedRequest - * @instance - */ - RollbackPreparedRequest.prototype.dtid = ""; - - /** - * Creates a new RollbackPreparedRequest instance using the specified properties. - * @function create - * @memberof query.RollbackPreparedRequest - * @static - * @param {query.IRollbackPreparedRequest=} [properties] Properties to set - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest instance - */ - RollbackPreparedRequest.create = function create(properties) { - return new RollbackPreparedRequest(properties); - }; - - /** - * Encodes the specified RollbackPreparedRequest message. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. - * @function encode - * @memberof query.RollbackPreparedRequest - * @static - * @param {query.IRollbackPreparedRequest} message RollbackPreparedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackPreparedRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified RollbackPreparedRequest message, length delimited. Does not implicitly {@link query.RollbackPreparedRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.RollbackPreparedRequest - * @static - * @param {query.IRollbackPreparedRequest} message RollbackPreparedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackPreparedRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer. - * @function decode - * @memberof query.RollbackPreparedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackPreparedRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackPreparedRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackPreparedRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.RollbackPreparedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackPreparedRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackPreparedRequest message. - * @function verify - * @memberof query.RollbackPreparedRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackPreparedRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a RollbackPreparedRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.RollbackPreparedRequest - * @static - * @param {Object.} object Plain object - * @returns {query.RollbackPreparedRequest} RollbackPreparedRequest - */ - RollbackPreparedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackPreparedRequest) - return object; - var message = new $root.query.RollbackPreparedRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.RollbackPreparedRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.RollbackPreparedRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.RollbackPreparedRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a RollbackPreparedRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.RollbackPreparedRequest - * @static - * @param {query.RollbackPreparedRequest} message RollbackPreparedRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackPreparedRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this RollbackPreparedRequest to JSON. - * @function toJSON - * @memberof query.RollbackPreparedRequest - * @instance - * @returns {Object.} JSON object - */ - RollbackPreparedRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RollbackPreparedRequest; - })(); - - query.RollbackPreparedResponse = (function() { - - /** - * Properties of a RollbackPreparedResponse. - * @memberof query - * @interface IRollbackPreparedResponse - */ - - /** - * Constructs a new RollbackPreparedResponse. - * @memberof query - * @classdesc Represents a RollbackPreparedResponse. - * @implements IRollbackPreparedResponse - * @constructor - * @param {query.IRollbackPreparedResponse=} [properties] Properties to set - */ - function RollbackPreparedResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RollbackPreparedResponse instance using the specified properties. - * @function create - * @memberof query.RollbackPreparedResponse - * @static - * @param {query.IRollbackPreparedResponse=} [properties] Properties to set - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse instance - */ - RollbackPreparedResponse.create = function create(properties) { - return new RollbackPreparedResponse(properties); - }; - - /** - * Encodes the specified RollbackPreparedResponse message. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. - * @function encode - * @memberof query.RollbackPreparedResponse - * @static - * @param {query.IRollbackPreparedResponse} message RollbackPreparedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackPreparedResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RollbackPreparedResponse message, length delimited. Does not implicitly {@link query.RollbackPreparedResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.RollbackPreparedResponse - * @static - * @param {query.IRollbackPreparedResponse} message RollbackPreparedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackPreparedResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer. - * @function decode - * @memberof query.RollbackPreparedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackPreparedResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RollbackPreparedResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackPreparedResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.RollbackPreparedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackPreparedResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackPreparedResponse message. - * @function verify - * @memberof query.RollbackPreparedResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackPreparedResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RollbackPreparedResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.RollbackPreparedResponse - * @static - * @param {Object.} object Plain object - * @returns {query.RollbackPreparedResponse} RollbackPreparedResponse - */ - RollbackPreparedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.RollbackPreparedResponse) - return object; - return new $root.query.RollbackPreparedResponse(); - }; - - /** - * Creates a plain object from a RollbackPreparedResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.RollbackPreparedResponse - * @static - * @param {query.RollbackPreparedResponse} message RollbackPreparedResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackPreparedResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RollbackPreparedResponse to JSON. - * @function toJSON - * @memberof query.RollbackPreparedResponse - * @instance - * @returns {Object.} JSON object - */ - RollbackPreparedResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RollbackPreparedResponse; - })(); - - query.CreateTransactionRequest = (function() { - - /** - * Properties of a CreateTransactionRequest. - * @memberof query - * @interface ICreateTransactionRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] CreateTransactionRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] CreateTransactionRequest immediate_caller_id - * @property {query.ITarget|null} [target] CreateTransactionRequest target - * @property {string|null} [dtid] CreateTransactionRequest dtid - * @property {Array.|null} [participants] CreateTransactionRequest participants - */ - - /** - * Constructs a new CreateTransactionRequest. - * @memberof query - * @classdesc Represents a CreateTransactionRequest. - * @implements ICreateTransactionRequest - * @constructor - * @param {query.ICreateTransactionRequest=} [properties] Properties to set - */ - function CreateTransactionRequest(properties) { - this.participants = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTransactionRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.effective_caller_id = null; - - /** - * CreateTransactionRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.immediate_caller_id = null; - - /** - * CreateTransactionRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.target = null; - - /** - * CreateTransactionRequest dtid. - * @member {string} dtid - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.dtid = ""; - - /** - * CreateTransactionRequest participants. - * @member {Array.} participants - * @memberof query.CreateTransactionRequest - * @instance - */ - CreateTransactionRequest.prototype.participants = $util.emptyArray; - - /** - * Creates a new CreateTransactionRequest instance using the specified properties. - * @function create - * @memberof query.CreateTransactionRequest - * @static - * @param {query.ICreateTransactionRequest=} [properties] Properties to set - * @returns {query.CreateTransactionRequest} CreateTransactionRequest instance - */ - CreateTransactionRequest.create = function create(properties) { - return new CreateTransactionRequest(properties); - }; - - /** - * Encodes the specified CreateTransactionRequest message. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. - * @function encode - * @memberof query.CreateTransactionRequest - * @static - * @param {query.ICreateTransactionRequest} message CreateTransactionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTransactionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); - if (message.participants != null && message.participants.length) - for (var i = 0; i < message.participants.length; ++i) - $root.query.Target.encode(message.participants[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTransactionRequest message, length delimited. Does not implicitly {@link query.CreateTransactionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.CreateTransactionRequest - * @static - * @param {query.ICreateTransactionRequest} message CreateTransactionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer. - * @function decode - * @memberof query.CreateTransactionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.CreateTransactionRequest} CreateTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTransactionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CreateTransactionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.dtid = reader.string(); - break; - case 5: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.query.Target.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTransactionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.CreateTransactionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CreateTransactionRequest} CreateTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTransactionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTransactionRequest message. - * @function verify - * @memberof query.CreateTransactionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTransactionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - if (message.participants != null && message.hasOwnProperty("participants")) { - if (!Array.isArray(message.participants)) - return "participants: array expected"; - for (var i = 0; i < message.participants.length; ++i) { - var error = $root.query.Target.verify(message.participants[i]); - if (error) - return "participants." + error; - } - } - return null; - }; - - /** - * Creates a CreateTransactionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.CreateTransactionRequest - * @static - * @param {Object.} object Plain object - * @returns {query.CreateTransactionRequest} CreateTransactionRequest - */ - CreateTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.CreateTransactionRequest) - return object; - var message = new $root.query.CreateTransactionRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.CreateTransactionRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.CreateTransactionRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.CreateTransactionRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.dtid != null) - message.dtid = String(object.dtid); - if (object.participants) { - if (!Array.isArray(object.participants)) - throw TypeError(".query.CreateTransactionRequest.participants: array expected"); - message.participants = []; - for (var i = 0; i < object.participants.length; ++i) { - if (typeof object.participants[i] !== "object") - throw TypeError(".query.CreateTransactionRequest.participants: object expected"); - message.participants[i] = $root.query.Target.fromObject(object.participants[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CreateTransactionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CreateTransactionRequest - * @static - * @param {query.CreateTransactionRequest} message CreateTransactionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTransactionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.participants = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - if (message.participants && message.participants.length) { - object.participants = []; - for (var j = 0; j < message.participants.length; ++j) - object.participants[j] = $root.query.Target.toObject(message.participants[j], options); - } - return object; - }; - - /** - * Converts this CreateTransactionRequest to JSON. - * @function toJSON - * @memberof query.CreateTransactionRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTransactionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateTransactionRequest; - })(); - - query.CreateTransactionResponse = (function() { - - /** - * Properties of a CreateTransactionResponse. - * @memberof query - * @interface ICreateTransactionResponse - */ - - /** - * Constructs a new CreateTransactionResponse. - * @memberof query - * @classdesc Represents a CreateTransactionResponse. - * @implements ICreateTransactionResponse - * @constructor - * @param {query.ICreateTransactionResponse=} [properties] Properties to set - */ - function CreateTransactionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new CreateTransactionResponse instance using the specified properties. - * @function create - * @memberof query.CreateTransactionResponse - * @static - * @param {query.ICreateTransactionResponse=} [properties] Properties to set - * @returns {query.CreateTransactionResponse} CreateTransactionResponse instance - */ - CreateTransactionResponse.create = function create(properties) { - return new CreateTransactionResponse(properties); - }; - - /** - * Encodes the specified CreateTransactionResponse message. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. - * @function encode - * @memberof query.CreateTransactionResponse - * @static - * @param {query.ICreateTransactionResponse} message CreateTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTransactionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified CreateTransactionResponse message, length delimited. Does not implicitly {@link query.CreateTransactionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.CreateTransactionResponse - * @static - * @param {query.ICreateTransactionResponse} message CreateTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer. - * @function decode - * @memberof query.CreateTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.CreateTransactionResponse} CreateTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTransactionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.CreateTransactionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTransactionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.CreateTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.CreateTransactionResponse} CreateTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTransactionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTransactionResponse message. - * @function verify - * @memberof query.CreateTransactionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTransactionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a CreateTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.CreateTransactionResponse - * @static - * @param {Object.} object Plain object - * @returns {query.CreateTransactionResponse} CreateTransactionResponse - */ - CreateTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.CreateTransactionResponse) - return object; - return new $root.query.CreateTransactionResponse(); - }; - - /** - * Creates a plain object from a CreateTransactionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.CreateTransactionResponse - * @static - * @param {query.CreateTransactionResponse} message CreateTransactionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTransactionResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this CreateTransactionResponse to JSON. - * @function toJSON - * @memberof query.CreateTransactionResponse - * @instance - * @returns {Object.} JSON object - */ - CreateTransactionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateTransactionResponse; - })(); - - query.StartCommitRequest = (function() { - - /** - * Properties of a StartCommitRequest. - * @memberof query - * @interface IStartCommitRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] StartCommitRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] StartCommitRequest immediate_caller_id - * @property {query.ITarget|null} [target] StartCommitRequest target - * @property {number|Long|null} [transaction_id] StartCommitRequest transaction_id - * @property {string|null} [dtid] StartCommitRequest dtid - */ - - /** - * Constructs a new StartCommitRequest. - * @memberof query - * @classdesc Represents a StartCommitRequest. - * @implements IStartCommitRequest - * @constructor - * @param {query.IStartCommitRequest=} [properties] Properties to set - */ - function StartCommitRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StartCommitRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.effective_caller_id = null; - - /** - * StartCommitRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.immediate_caller_id = null; - - /** - * StartCommitRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.target = null; - - /** - * StartCommitRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StartCommitRequest dtid. - * @member {string} dtid - * @memberof query.StartCommitRequest - * @instance - */ - StartCommitRequest.prototype.dtid = ""; - - /** - * Creates a new StartCommitRequest instance using the specified properties. - * @function create - * @memberof query.StartCommitRequest - * @static - * @param {query.IStartCommitRequest=} [properties] Properties to set - * @returns {query.StartCommitRequest} StartCommitRequest instance - */ - StartCommitRequest.create = function create(properties) { - return new StartCommitRequest(properties); - }; - - /** - * Encodes the specified StartCommitRequest message. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. - * @function encode - * @memberof query.StartCommitRequest - * @static - * @param {query.IStartCommitRequest} message StartCommitRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartCommitRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified StartCommitRequest message, length delimited. Does not implicitly {@link query.StartCommitRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StartCommitRequest - * @static - * @param {query.IStartCommitRequest} message StartCommitRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartCommitRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartCommitRequest message from the specified reader or buffer. - * @function decode - * @memberof query.StartCommitRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StartCommitRequest} StartCommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartCommitRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StartCommitRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartCommitRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StartCommitRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StartCommitRequest} StartCommitRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartCommitRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartCommitRequest message. - * @function verify - * @memberof query.StartCommitRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartCommitRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a StartCommitRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StartCommitRequest - * @static - * @param {Object.} object Plain object - * @returns {query.StartCommitRequest} StartCommitRequest - */ - StartCommitRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.StartCommitRequest) - return object; - var message = new $root.query.StartCommitRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.StartCommitRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.StartCommitRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.StartCommitRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a StartCommitRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StartCommitRequest - * @static - * @param {query.StartCommitRequest} message StartCommitRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartCommitRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this StartCommitRequest to JSON. - * @function toJSON - * @memberof query.StartCommitRequest - * @instance - * @returns {Object.} JSON object - */ - StartCommitRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StartCommitRequest; - })(); - - query.StartCommitResponse = (function() { - - /** - * Properties of a StartCommitResponse. - * @memberof query - * @interface IStartCommitResponse - */ - - /** - * Constructs a new StartCommitResponse. - * @memberof query - * @classdesc Represents a StartCommitResponse. - * @implements IStartCommitResponse - * @constructor - * @param {query.IStartCommitResponse=} [properties] Properties to set - */ - function StartCommitResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StartCommitResponse instance using the specified properties. - * @function create - * @memberof query.StartCommitResponse - * @static - * @param {query.IStartCommitResponse=} [properties] Properties to set - * @returns {query.StartCommitResponse} StartCommitResponse instance - */ - StartCommitResponse.create = function create(properties) { - return new StartCommitResponse(properties); - }; - - /** - * Encodes the specified StartCommitResponse message. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. - * @function encode - * @memberof query.StartCommitResponse - * @static - * @param {query.IStartCommitResponse} message StartCommitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartCommitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StartCommitResponse message, length delimited. Does not implicitly {@link query.StartCommitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StartCommitResponse - * @static - * @param {query.IStartCommitResponse} message StartCommitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartCommitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartCommitResponse message from the specified reader or buffer. - * @function decode - * @memberof query.StartCommitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StartCommitResponse} StartCommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartCommitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StartCommitResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartCommitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StartCommitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StartCommitResponse} StartCommitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartCommitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartCommitResponse message. - * @function verify - * @memberof query.StartCommitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartCommitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StartCommitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StartCommitResponse - * @static - * @param {Object.} object Plain object - * @returns {query.StartCommitResponse} StartCommitResponse - */ - StartCommitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.StartCommitResponse) - return object; - return new $root.query.StartCommitResponse(); - }; - - /** - * Creates a plain object from a StartCommitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StartCommitResponse - * @static - * @param {query.StartCommitResponse} message StartCommitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartCommitResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StartCommitResponse to JSON. - * @function toJSON - * @memberof query.StartCommitResponse - * @instance - * @returns {Object.} JSON object - */ - StartCommitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StartCommitResponse; - })(); - - query.SetRollbackRequest = (function() { - - /** - * Properties of a SetRollbackRequest. - * @memberof query - * @interface ISetRollbackRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] SetRollbackRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] SetRollbackRequest immediate_caller_id - * @property {query.ITarget|null} [target] SetRollbackRequest target - * @property {number|Long|null} [transaction_id] SetRollbackRequest transaction_id - * @property {string|null} [dtid] SetRollbackRequest dtid - */ - - /** - * Constructs a new SetRollbackRequest. - * @memberof query - * @classdesc Represents a SetRollbackRequest. - * @implements ISetRollbackRequest - * @constructor - * @param {query.ISetRollbackRequest=} [properties] Properties to set - */ - function SetRollbackRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetRollbackRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.effective_caller_id = null; - - /** - * SetRollbackRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.immediate_caller_id = null; - - /** - * SetRollbackRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.target = null; - - /** - * SetRollbackRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SetRollbackRequest dtid. - * @member {string} dtid - * @memberof query.SetRollbackRequest - * @instance - */ - SetRollbackRequest.prototype.dtid = ""; - - /** - * Creates a new SetRollbackRequest instance using the specified properties. - * @function create - * @memberof query.SetRollbackRequest - * @static - * @param {query.ISetRollbackRequest=} [properties] Properties to set - * @returns {query.SetRollbackRequest} SetRollbackRequest instance - */ - SetRollbackRequest.create = function create(properties) { - return new SetRollbackRequest(properties); - }; - - /** - * Encodes the specified SetRollbackRequest message. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. - * @function encode - * @memberof query.SetRollbackRequest - * @static - * @param {query.ISetRollbackRequest} message SetRollbackRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetRollbackRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified SetRollbackRequest message, length delimited. Does not implicitly {@link query.SetRollbackRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.SetRollbackRequest - * @static - * @param {query.ISetRollbackRequest} message SetRollbackRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetRollbackRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetRollbackRequest message from the specified reader or buffer. - * @function decode - * @memberof query.SetRollbackRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.SetRollbackRequest} SetRollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetRollbackRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.SetRollbackRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetRollbackRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.SetRollbackRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.SetRollbackRequest} SetRollbackRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetRollbackRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetRollbackRequest message. - * @function verify - * @memberof query.SetRollbackRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetRollbackRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a SetRollbackRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.SetRollbackRequest - * @static - * @param {Object.} object Plain object - * @returns {query.SetRollbackRequest} SetRollbackRequest - */ - SetRollbackRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.SetRollbackRequest) - return object; - var message = new $root.query.SetRollbackRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.SetRollbackRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.SetRollbackRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.SetRollbackRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a SetRollbackRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.SetRollbackRequest - * @static - * @param {query.SetRollbackRequest} message SetRollbackRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetRollbackRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this SetRollbackRequest to JSON. - * @function toJSON - * @memberof query.SetRollbackRequest - * @instance - * @returns {Object.} JSON object - */ - SetRollbackRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetRollbackRequest; - })(); - - query.SetRollbackResponse = (function() { - - /** - * Properties of a SetRollbackResponse. - * @memberof query - * @interface ISetRollbackResponse - */ - - /** - * Constructs a new SetRollbackResponse. - * @memberof query - * @classdesc Represents a SetRollbackResponse. - * @implements ISetRollbackResponse - * @constructor - * @param {query.ISetRollbackResponse=} [properties] Properties to set - */ - function SetRollbackResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SetRollbackResponse instance using the specified properties. - * @function create - * @memberof query.SetRollbackResponse - * @static - * @param {query.ISetRollbackResponse=} [properties] Properties to set - * @returns {query.SetRollbackResponse} SetRollbackResponse instance - */ - SetRollbackResponse.create = function create(properties) { - return new SetRollbackResponse(properties); - }; - - /** - * Encodes the specified SetRollbackResponse message. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. - * @function encode - * @memberof query.SetRollbackResponse - * @static - * @param {query.ISetRollbackResponse} message SetRollbackResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetRollbackResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetRollbackResponse message, length delimited. Does not implicitly {@link query.SetRollbackResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.SetRollbackResponse - * @static - * @param {query.ISetRollbackResponse} message SetRollbackResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetRollbackResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetRollbackResponse message from the specified reader or buffer. - * @function decode - * @memberof query.SetRollbackResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.SetRollbackResponse} SetRollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetRollbackResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.SetRollbackResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetRollbackResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.SetRollbackResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.SetRollbackResponse} SetRollbackResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetRollbackResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetRollbackResponse message. - * @function verify - * @memberof query.SetRollbackResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetRollbackResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetRollbackResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.SetRollbackResponse - * @static - * @param {Object.} object Plain object - * @returns {query.SetRollbackResponse} SetRollbackResponse - */ - SetRollbackResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.SetRollbackResponse) - return object; - return new $root.query.SetRollbackResponse(); - }; - - /** - * Creates a plain object from a SetRollbackResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.SetRollbackResponse - * @static - * @param {query.SetRollbackResponse} message SetRollbackResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetRollbackResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetRollbackResponse to JSON. - * @function toJSON - * @memberof query.SetRollbackResponse - * @instance - * @returns {Object.} JSON object - */ - SetRollbackResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SetRollbackResponse; - })(); - - query.ConcludeTransactionRequest = (function() { - - /** - * Properties of a ConcludeTransactionRequest. - * @memberof query - * @interface IConcludeTransactionRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ConcludeTransactionRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ConcludeTransactionRequest immediate_caller_id - * @property {query.ITarget|null} [target] ConcludeTransactionRequest target - * @property {string|null} [dtid] ConcludeTransactionRequest dtid - */ - - /** - * Constructs a new ConcludeTransactionRequest. - * @memberof query - * @classdesc Represents a ConcludeTransactionRequest. - * @implements IConcludeTransactionRequest - * @constructor - * @param {query.IConcludeTransactionRequest=} [properties] Properties to set - */ - function ConcludeTransactionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConcludeTransactionRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ConcludeTransactionRequest - * @instance - */ - ConcludeTransactionRequest.prototype.effective_caller_id = null; - - /** - * ConcludeTransactionRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ConcludeTransactionRequest - * @instance - */ - ConcludeTransactionRequest.prototype.immediate_caller_id = null; - - /** - * ConcludeTransactionRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ConcludeTransactionRequest - * @instance - */ - ConcludeTransactionRequest.prototype.target = null; - - /** - * ConcludeTransactionRequest dtid. - * @member {string} dtid - * @memberof query.ConcludeTransactionRequest - * @instance - */ - ConcludeTransactionRequest.prototype.dtid = ""; - - /** - * Creates a new ConcludeTransactionRequest instance using the specified properties. - * @function create - * @memberof query.ConcludeTransactionRequest - * @static - * @param {query.IConcludeTransactionRequest=} [properties] Properties to set - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest instance - */ - ConcludeTransactionRequest.create = function create(properties) { - return new ConcludeTransactionRequest(properties); - }; - - /** - * Encodes the specified ConcludeTransactionRequest message. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. - * @function encode - * @memberof query.ConcludeTransactionRequest - * @static - * @param {query.IConcludeTransactionRequest} message ConcludeTransactionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcludeTransactionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified ConcludeTransactionRequest message, length delimited. Does not implicitly {@link query.ConcludeTransactionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ConcludeTransactionRequest - * @static - * @param {query.IConcludeTransactionRequest} message ConcludeTransactionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcludeTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ConcludeTransactionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcludeTransactionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ConcludeTransactionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConcludeTransactionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ConcludeTransactionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcludeTransactionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConcludeTransactionRequest message. - * @function verify - * @memberof query.ConcludeTransactionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConcludeTransactionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a ConcludeTransactionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ConcludeTransactionRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ConcludeTransactionRequest} ConcludeTransactionRequest - */ - ConcludeTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ConcludeTransactionRequest) - return object; - var message = new $root.query.ConcludeTransactionRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ConcludeTransactionRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ConcludeTransactionRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ConcludeTransactionRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a ConcludeTransactionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ConcludeTransactionRequest - * @static - * @param {query.ConcludeTransactionRequest} message ConcludeTransactionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConcludeTransactionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this ConcludeTransactionRequest to JSON. - * @function toJSON - * @memberof query.ConcludeTransactionRequest - * @instance - * @returns {Object.} JSON object - */ - ConcludeTransactionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConcludeTransactionRequest; - })(); - - query.ConcludeTransactionResponse = (function() { - - /** - * Properties of a ConcludeTransactionResponse. - * @memberof query - * @interface IConcludeTransactionResponse - */ - - /** - * Constructs a new ConcludeTransactionResponse. - * @memberof query - * @classdesc Represents a ConcludeTransactionResponse. - * @implements IConcludeTransactionResponse - * @constructor - * @param {query.IConcludeTransactionResponse=} [properties] Properties to set - */ - function ConcludeTransactionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ConcludeTransactionResponse instance using the specified properties. - * @function create - * @memberof query.ConcludeTransactionResponse - * @static - * @param {query.IConcludeTransactionResponse=} [properties] Properties to set - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse instance - */ - ConcludeTransactionResponse.create = function create(properties) { - return new ConcludeTransactionResponse(properties); - }; - - /** - * Encodes the specified ConcludeTransactionResponse message. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. - * @function encode - * @memberof query.ConcludeTransactionResponse - * @static - * @param {query.IConcludeTransactionResponse} message ConcludeTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcludeTransactionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ConcludeTransactionResponse message, length delimited. Does not implicitly {@link query.ConcludeTransactionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ConcludeTransactionResponse - * @static - * @param {query.IConcludeTransactionResponse} message ConcludeTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConcludeTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ConcludeTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcludeTransactionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ConcludeTransactionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConcludeTransactionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ConcludeTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConcludeTransactionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConcludeTransactionResponse message. - * @function verify - * @memberof query.ConcludeTransactionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConcludeTransactionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ConcludeTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ConcludeTransactionResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ConcludeTransactionResponse} ConcludeTransactionResponse - */ - ConcludeTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ConcludeTransactionResponse) - return object; - return new $root.query.ConcludeTransactionResponse(); - }; - - /** - * Creates a plain object from a ConcludeTransactionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ConcludeTransactionResponse - * @static - * @param {query.ConcludeTransactionResponse} message ConcludeTransactionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConcludeTransactionResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ConcludeTransactionResponse to JSON. - * @function toJSON - * @memberof query.ConcludeTransactionResponse - * @instance - * @returns {Object.} JSON object - */ - ConcludeTransactionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConcludeTransactionResponse; - })(); - - query.ReadTransactionRequest = (function() { - - /** - * Properties of a ReadTransactionRequest. - * @memberof query - * @interface IReadTransactionRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReadTransactionRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReadTransactionRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReadTransactionRequest target - * @property {string|null} [dtid] ReadTransactionRequest dtid - */ - - /** - * Constructs a new ReadTransactionRequest. - * @memberof query - * @classdesc Represents a ReadTransactionRequest. - * @implements IReadTransactionRequest - * @constructor - * @param {query.IReadTransactionRequest=} [properties] Properties to set - */ - function ReadTransactionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReadTransactionRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReadTransactionRequest - * @instance - */ - ReadTransactionRequest.prototype.effective_caller_id = null; - - /** - * ReadTransactionRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReadTransactionRequest - * @instance - */ - ReadTransactionRequest.prototype.immediate_caller_id = null; - - /** - * ReadTransactionRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReadTransactionRequest - * @instance - */ - ReadTransactionRequest.prototype.target = null; - - /** - * ReadTransactionRequest dtid. - * @member {string} dtid - * @memberof query.ReadTransactionRequest - * @instance - */ - ReadTransactionRequest.prototype.dtid = ""; - - /** - * Creates a new ReadTransactionRequest instance using the specified properties. - * @function create - * @memberof query.ReadTransactionRequest - * @static - * @param {query.IReadTransactionRequest=} [properties] Properties to set - * @returns {query.ReadTransactionRequest} ReadTransactionRequest instance - */ - ReadTransactionRequest.create = function create(properties) { - return new ReadTransactionRequest(properties); - }; - - /** - * Encodes the specified ReadTransactionRequest message. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. - * @function encode - * @memberof query.ReadTransactionRequest - * @static - * @param {query.IReadTransactionRequest} message ReadTransactionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTransactionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dtid); - return writer; - }; - - /** - * Encodes the specified ReadTransactionRequest message, length delimited. Does not implicitly {@link query.ReadTransactionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReadTransactionRequest - * @static - * @param {query.IReadTransactionRequest} message ReadTransactionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ReadTransactionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReadTransactionRequest} ReadTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTransactionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReadTransactionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.dtid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReadTransactionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReadTransactionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReadTransactionRequest} ReadTransactionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTransactionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReadTransactionRequest message. - * @function verify - * @memberof query.ReadTransactionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReadTransactionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - return null; - }; - - /** - * Creates a ReadTransactionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReadTransactionRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ReadTransactionRequest} ReadTransactionRequest - */ - ReadTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReadTransactionRequest) - return object; - var message = new $root.query.ReadTransactionRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReadTransactionRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReadTransactionRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReadTransactionRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.dtid != null) - message.dtid = String(object.dtid); - return message; - }; - - /** - * Creates a plain object from a ReadTransactionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReadTransactionRequest - * @static - * @param {query.ReadTransactionRequest} message ReadTransactionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReadTransactionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.dtid = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - return object; - }; - - /** - * Converts this ReadTransactionRequest to JSON. - * @function toJSON - * @memberof query.ReadTransactionRequest - * @instance - * @returns {Object.} JSON object - */ - ReadTransactionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReadTransactionRequest; - })(); - - query.ReadTransactionResponse = (function() { - - /** - * Properties of a ReadTransactionResponse. - * @memberof query - * @interface IReadTransactionResponse - * @property {query.ITransactionMetadata|null} [metadata] ReadTransactionResponse metadata - */ - - /** - * Constructs a new ReadTransactionResponse. - * @memberof query - * @classdesc Represents a ReadTransactionResponse. - * @implements IReadTransactionResponse - * @constructor - * @param {query.IReadTransactionResponse=} [properties] Properties to set - */ - function ReadTransactionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReadTransactionResponse metadata. - * @member {query.ITransactionMetadata|null|undefined} metadata - * @memberof query.ReadTransactionResponse - * @instance - */ - ReadTransactionResponse.prototype.metadata = null; - - /** - * Creates a new ReadTransactionResponse instance using the specified properties. - * @function create - * @memberof query.ReadTransactionResponse - * @static - * @param {query.IReadTransactionResponse=} [properties] Properties to set - * @returns {query.ReadTransactionResponse} ReadTransactionResponse instance - */ - ReadTransactionResponse.create = function create(properties) { - return new ReadTransactionResponse(properties); - }; - - /** - * Encodes the specified ReadTransactionResponse message. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @function encode - * @memberof query.ReadTransactionResponse - * @static - * @param {query.IReadTransactionResponse} message ReadTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTransactionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.query.TransactionMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReadTransactionResponse message, length delimited. Does not implicitly {@link query.ReadTransactionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReadTransactionResponse - * @static - * @param {query.IReadTransactionResponse} message ReadTransactionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ReadTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReadTransactionResponse} ReadTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTransactionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReadTransactionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = $root.query.TransactionMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReadTransactionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReadTransactionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReadTransactionResponse} ReadTransactionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadTransactionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReadTransactionResponse message. - * @function verify - * @memberof query.ReadTransactionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReadTransactionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.query.TransactionMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a ReadTransactionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReadTransactionResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ReadTransactionResponse} ReadTransactionResponse - */ - ReadTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReadTransactionResponse) - return object; - var message = new $root.query.ReadTransactionResponse(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".query.ReadTransactionResponse.metadata: object expected"); - message.metadata = $root.query.TransactionMetadata.fromObject(object.metadata); - } - return message; - }; - - /** - * Creates a plain object from a ReadTransactionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReadTransactionResponse - * @static - * @param {query.ReadTransactionResponse} message ReadTransactionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReadTransactionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.query.TransactionMetadata.toObject(message.metadata, options); - return object; - }; - - /** - * Converts this ReadTransactionResponse to JSON. - * @function toJSON - * @memberof query.ReadTransactionResponse - * @instance - * @returns {Object.} JSON object - */ - ReadTransactionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReadTransactionResponse; - })(); - - query.BeginExecuteRequest = (function() { - - /** - * Properties of a BeginExecuteRequest. - * @memberof query - * @interface IBeginExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] BeginExecuteRequest target - * @property {query.IBoundQuery|null} [query] BeginExecuteRequest query - * @property {query.IExecuteOptions|null} [options] BeginExecuteRequest options - * @property {number|Long|null} [reserved_id] BeginExecuteRequest reserved_id - * @property {Array.|null} [pre_queries] BeginExecuteRequest pre_queries - */ - - /** - * Constructs a new BeginExecuteRequest. - * @memberof query - * @classdesc Represents a BeginExecuteRequest. - * @implements IBeginExecuteRequest - * @constructor - * @param {query.IBeginExecuteRequest=} [properties] Properties to set - */ - function BeginExecuteRequest(properties) { - this.pre_queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BeginExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.effective_caller_id = null; - - /** - * BeginExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.immediate_caller_id = null; - - /** - * BeginExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.target = null; - - /** - * BeginExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.query = null; - - /** - * BeginExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.options = null; - - /** - * BeginExecuteRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BeginExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.BeginExecuteRequest - * @instance - */ - BeginExecuteRequest.prototype.pre_queries = $util.emptyArray; - - /** - * Creates a new BeginExecuteRequest instance using the specified properties. - * @function create - * @memberof query.BeginExecuteRequest - * @static - * @param {query.IBeginExecuteRequest=} [properties] Properties to set - * @returns {query.BeginExecuteRequest} BeginExecuteRequest instance - */ - BeginExecuteRequest.create = function create(properties) { - return new BeginExecuteRequest(properties); - }; - - /** - * Encodes the specified BeginExecuteRequest message. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. - * @function encode - * @memberof query.BeginExecuteRequest - * @static - * @param {query.IBeginExecuteRequest} message BeginExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.reserved_id); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); - return writer; - }; - - /** - * Encodes the specified BeginExecuteRequest message, length delimited. Does not implicitly {@link query.BeginExecuteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginExecuteRequest - * @static - * @param {query.IBeginExecuteRequest} message BeginExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer. - * @function decode - * @memberof query.BeginExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginExecuteRequest} BeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - message.reserved_id = reader.int64(); - break; - case 7: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BeginExecuteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginExecuteRequest} BeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BeginExecuteRequest message. - * @function verify - * @memberof query.BeginExecuteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BeginExecuteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; - } - return null; - }; - - /** - * Creates a BeginExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginExecuteRequest - * @static - * @param {Object.} object Plain object - * @returns {query.BeginExecuteRequest} BeginExecuteRequest - */ - BeginExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginExecuteRequest) - return object; - var message = new $root.query.BeginExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.BeginExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.BeginExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.BeginExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.BeginExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.BeginExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.BeginExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); - } - return message; - }; - - /** - * Creates a plain object from a BeginExecuteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginExecuteRequest - * @static - * @param {query.BeginExecuteRequest} message BeginExecuteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BeginExecuteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pre_queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; - } - return object; - }; - - /** - * Converts this BeginExecuteRequest to JSON. - * @function toJSON - * @memberof query.BeginExecuteRequest - * @instance - * @returns {Object.} JSON object - */ - BeginExecuteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginExecuteRequest; - })(); - - query.BeginExecuteResponse = (function() { - - /** - * Properties of a BeginExecuteResponse. - * @memberof query - * @interface IBeginExecuteResponse - * @property {vtrpc.IRPCError|null} [error] BeginExecuteResponse error - * @property {query.IQueryResult|null} [result] BeginExecuteResponse result - * @property {number|Long|null} [transaction_id] BeginExecuteResponse transaction_id - * @property {topodata.ITabletAlias|null} [tablet_alias] BeginExecuteResponse tablet_alias - */ - - /** - * Constructs a new BeginExecuteResponse. - * @memberof query - * @classdesc Represents a BeginExecuteResponse. - * @implements IBeginExecuteResponse - * @constructor - * @param {query.IBeginExecuteResponse=} [properties] Properties to set - */ - function BeginExecuteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BeginExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.BeginExecuteResponse - * @instance - */ - BeginExecuteResponse.prototype.error = null; - - /** - * BeginExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.BeginExecuteResponse - * @instance - */ - BeginExecuteResponse.prototype.result = null; - - /** - * BeginExecuteResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.BeginExecuteResponse - * @instance - */ - BeginExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BeginExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.BeginExecuteResponse - * @instance - */ - BeginExecuteResponse.prototype.tablet_alias = null; - - /** - * Creates a new BeginExecuteResponse instance using the specified properties. - * @function create - * @memberof query.BeginExecuteResponse - * @static - * @param {query.IBeginExecuteResponse=} [properties] Properties to set - * @returns {query.BeginExecuteResponse} BeginExecuteResponse instance - */ - BeginExecuteResponse.create = function create(properties) { - return new BeginExecuteResponse(properties); - }; - - /** - * Encodes the specified BeginExecuteResponse message. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @function encode - * @memberof query.BeginExecuteResponse - * @static - * @param {query.IBeginExecuteResponse} message BeginExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BeginExecuteResponse message, length delimited. Does not implicitly {@link query.BeginExecuteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginExecuteResponse - * @static - * @param {query.IBeginExecuteResponse} message BeginExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer. - * @function decode - * @memberof query.BeginExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginExecuteResponse} BeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); - break; - case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - case 3: - message.transaction_id = reader.int64(); - break; - case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BeginExecuteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginExecuteResponse} BeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BeginExecuteResponse message. - * @function verify - * @memberof query.BeginExecuteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BeginExecuteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a BeginExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginExecuteResponse - * @static - * @param {Object.} object Plain object - * @returns {query.BeginExecuteResponse} BeginExecuteResponse - */ - BeginExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginExecuteResponse) - return object; - var message = new $root.query.BeginExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.BeginExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.BeginExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.BeginExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a BeginExecuteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginExecuteResponse - * @static - * @param {query.BeginExecuteResponse} message BeginExecuteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BeginExecuteResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.error = null; - object.result = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this BeginExecuteResponse to JSON. - * @function toJSON - * @memberof query.BeginExecuteResponse - * @instance - * @returns {Object.} JSON object - */ - BeginExecuteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginExecuteResponse; - })(); - - query.BeginExecuteBatchRequest = (function() { - - /** - * Properties of a BeginExecuteBatchRequest. - * @memberof query - * @interface IBeginExecuteBatchRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] BeginExecuteBatchRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] BeginExecuteBatchRequest immediate_caller_id - * @property {query.ITarget|null} [target] BeginExecuteBatchRequest target - * @property {Array.|null} [queries] BeginExecuteBatchRequest queries - * @property {boolean|null} [as_transaction] BeginExecuteBatchRequest as_transaction - * @property {query.IExecuteOptions|null} [options] BeginExecuteBatchRequest options - */ - - /** - * Constructs a new BeginExecuteBatchRequest. - * @memberof query - * @classdesc Represents a BeginExecuteBatchRequest. - * @implements IBeginExecuteBatchRequest - * @constructor - * @param {query.IBeginExecuteBatchRequest=} [properties] Properties to set - */ - function BeginExecuteBatchRequest(properties) { - this.queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BeginExecuteBatchRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.BeginExecuteBatchRequest - * @instance - */ - BeginExecuteBatchRequest.prototype.effective_caller_id = null; - - /** - * BeginExecuteBatchRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.BeginExecuteBatchRequest - * @instance - */ - BeginExecuteBatchRequest.prototype.immediate_caller_id = null; - - /** - * BeginExecuteBatchRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.BeginExecuteBatchRequest - * @instance - */ - BeginExecuteBatchRequest.prototype.target = null; - - /** - * BeginExecuteBatchRequest queries. - * @member {Array.} queries - * @memberof query.BeginExecuteBatchRequest - * @instance - */ - BeginExecuteBatchRequest.prototype.queries = $util.emptyArray; - - /** - * BeginExecuteBatchRequest as_transaction. - * @member {boolean} as_transaction - * @memberof query.BeginExecuteBatchRequest - * @instance - */ - BeginExecuteBatchRequest.prototype.as_transaction = false; - - /** - * BeginExecuteBatchRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.BeginExecuteBatchRequest - * @instance - */ - BeginExecuteBatchRequest.prototype.options = null; - - /** - * Creates a new BeginExecuteBatchRequest instance using the specified properties. - * @function create - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {query.IBeginExecuteBatchRequest=} [properties] Properties to set - * @returns {query.BeginExecuteBatchRequest} BeginExecuteBatchRequest instance - */ - BeginExecuteBatchRequest.create = function create(properties) { - return new BeginExecuteBatchRequest(properties); - }; - - /** - * Encodes the specified BeginExecuteBatchRequest message. Does not implicitly {@link query.BeginExecuteBatchRequest.verify|verify} messages. - * @function encode - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {query.IBeginExecuteBatchRequest} message BeginExecuteBatchRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteBatchRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.queries != null && message.queries.length) - for (var i = 0; i < message.queries.length; ++i) - $root.query.BoundQuery.encode(message.queries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.as_transaction != null && Object.hasOwnProperty.call(message, "as_transaction")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.as_transaction); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BeginExecuteBatchRequest message, length delimited. Does not implicitly {@link query.BeginExecuteBatchRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {query.IBeginExecuteBatchRequest} message BeginExecuteBatchRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteBatchRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginExecuteBatchRequest message from the specified reader or buffer. - * @function decode - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginExecuteBatchRequest} BeginExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteBatchRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteBatchRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.queries && message.queries.length)) - message.queries = []; - message.queries.push($root.query.BoundQuery.decode(reader, reader.uint32())); - break; - case 5: - message.as_transaction = reader.bool(); - break; - case 6: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BeginExecuteBatchRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginExecuteBatchRequest} BeginExecuteBatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteBatchRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BeginExecuteBatchRequest message. - * @function verify - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BeginExecuteBatchRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.queries != null && message.hasOwnProperty("queries")) { - if (!Array.isArray(message.queries)) - return "queries: array expected"; - for (var i = 0; i < message.queries.length; ++i) { - var error = $root.query.BoundQuery.verify(message.queries[i]); - if (error) - return "queries." + error; - } - } - if (message.as_transaction != null && message.hasOwnProperty("as_transaction")) - if (typeof message.as_transaction !== "boolean") - return "as_transaction: boolean expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a BeginExecuteBatchRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {Object.} object Plain object - * @returns {query.BeginExecuteBatchRequest} BeginExecuteBatchRequest - */ - BeginExecuteBatchRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginExecuteBatchRequest) - return object; - var message = new $root.query.BeginExecuteBatchRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.BeginExecuteBatchRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.BeginExecuteBatchRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.BeginExecuteBatchRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.queries) { - if (!Array.isArray(object.queries)) - throw TypeError(".query.BeginExecuteBatchRequest.queries: array expected"); - message.queries = []; - for (var i = 0; i < object.queries.length; ++i) { - if (typeof object.queries[i] !== "object") - throw TypeError(".query.BeginExecuteBatchRequest.queries: object expected"); - message.queries[i] = $root.query.BoundQuery.fromObject(object.queries[i]); - } - } - if (object.as_transaction != null) - message.as_transaction = Boolean(object.as_transaction); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.BeginExecuteBatchRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a BeginExecuteBatchRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginExecuteBatchRequest - * @static - * @param {query.BeginExecuteBatchRequest} message BeginExecuteBatchRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BeginExecuteBatchRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.as_transaction = false; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.queries && message.queries.length) { - object.queries = []; - for (var j = 0; j < message.queries.length; ++j) - object.queries[j] = $root.query.BoundQuery.toObject(message.queries[j], options); - } - if (message.as_transaction != null && message.hasOwnProperty("as_transaction")) - object.as_transaction = message.as_transaction; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this BeginExecuteBatchRequest to JSON. - * @function toJSON - * @memberof query.BeginExecuteBatchRequest - * @instance - * @returns {Object.} JSON object - */ - BeginExecuteBatchRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginExecuteBatchRequest; - })(); - - query.BeginExecuteBatchResponse = (function() { - - /** - * Properties of a BeginExecuteBatchResponse. - * @memberof query - * @interface IBeginExecuteBatchResponse - * @property {vtrpc.IRPCError|null} [error] BeginExecuteBatchResponse error - * @property {Array.|null} [results] BeginExecuteBatchResponse results - * @property {number|Long|null} [transaction_id] BeginExecuteBatchResponse transaction_id - * @property {topodata.ITabletAlias|null} [tablet_alias] BeginExecuteBatchResponse tablet_alias - */ - - /** - * Constructs a new BeginExecuteBatchResponse. - * @memberof query - * @classdesc Represents a BeginExecuteBatchResponse. - * @implements IBeginExecuteBatchResponse - * @constructor - * @param {query.IBeginExecuteBatchResponse=} [properties] Properties to set - */ - function BeginExecuteBatchResponse(properties) { - this.results = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BeginExecuteBatchResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.BeginExecuteBatchResponse - * @instance - */ - BeginExecuteBatchResponse.prototype.error = null; - - /** - * BeginExecuteBatchResponse results. - * @member {Array.} results - * @memberof query.BeginExecuteBatchResponse - * @instance - */ - BeginExecuteBatchResponse.prototype.results = $util.emptyArray; - - /** - * BeginExecuteBatchResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.BeginExecuteBatchResponse - * @instance - */ - BeginExecuteBatchResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BeginExecuteBatchResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.BeginExecuteBatchResponse - * @instance - */ - BeginExecuteBatchResponse.prototype.tablet_alias = null; - - /** - * Creates a new BeginExecuteBatchResponse instance using the specified properties. - * @function create - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {query.IBeginExecuteBatchResponse=} [properties] Properties to set - * @returns {query.BeginExecuteBatchResponse} BeginExecuteBatchResponse instance - */ - BeginExecuteBatchResponse.create = function create(properties) { - return new BeginExecuteBatchResponse(properties); - }; - - /** - * Encodes the specified BeginExecuteBatchResponse message. Does not implicitly {@link query.BeginExecuteBatchResponse.verify|verify} messages. - * @function encode - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {query.IBeginExecuteBatchResponse} message BeginExecuteBatchResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteBatchResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.query.QueryResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BeginExecuteBatchResponse message, length delimited. Does not implicitly {@link query.BeginExecuteBatchResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {query.IBeginExecuteBatchResponse} message BeginExecuteBatchResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BeginExecuteBatchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BeginExecuteBatchResponse message from the specified reader or buffer. - * @function decode - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.BeginExecuteBatchResponse} BeginExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteBatchResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.BeginExecuteBatchResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.query.QueryResult.decode(reader, reader.uint32())); - break; - case 3: - message.transaction_id = reader.int64(); - break; - case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BeginExecuteBatchResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.BeginExecuteBatchResponse} BeginExecuteBatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BeginExecuteBatchResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BeginExecuteBatchResponse message. - * @function verify - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BeginExecuteBatchResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.query.QueryResult.verify(message.results[i]); - if (error) - return "results." + error; - } - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a BeginExecuteBatchResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {Object.} object Plain object - * @returns {query.BeginExecuteBatchResponse} BeginExecuteBatchResponse - */ - BeginExecuteBatchResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.BeginExecuteBatchResponse) - return object; - var message = new $root.query.BeginExecuteBatchResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.BeginExecuteBatchResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".query.BeginExecuteBatchResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".query.BeginExecuteBatchResponse.results: object expected"); - message.results[i] = $root.query.QueryResult.fromObject(object.results[i]); - } - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.BeginExecuteBatchResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a BeginExecuteBatchResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.BeginExecuteBatchResponse - * @static - * @param {query.BeginExecuteBatchResponse} message BeginExecuteBatchResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BeginExecuteBatchResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.defaults) { - object.error = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.query.QueryResult.toObject(message.results[j], options); - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this BeginExecuteBatchResponse to JSON. - * @function toJSON - * @memberof query.BeginExecuteBatchResponse - * @instance - * @returns {Object.} JSON object - */ - BeginExecuteBatchResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BeginExecuteBatchResponse; - })(); - - query.MessageStreamRequest = (function() { - - /** - * Properties of a MessageStreamRequest. - * @memberof query - * @interface IMessageStreamRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] MessageStreamRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] MessageStreamRequest immediate_caller_id - * @property {query.ITarget|null} [target] MessageStreamRequest target - * @property {string|null} [name] MessageStreamRequest name - */ - - /** - * Constructs a new MessageStreamRequest. - * @memberof query - * @classdesc Represents a MessageStreamRequest. - * @implements IMessageStreamRequest - * @constructor - * @param {query.IMessageStreamRequest=} [properties] Properties to set - */ - function MessageStreamRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageStreamRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.MessageStreamRequest - * @instance - */ - MessageStreamRequest.prototype.effective_caller_id = null; - - /** - * MessageStreamRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.MessageStreamRequest - * @instance - */ - MessageStreamRequest.prototype.immediate_caller_id = null; - - /** - * MessageStreamRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.MessageStreamRequest - * @instance - */ - MessageStreamRequest.prototype.target = null; - - /** - * MessageStreamRequest name. - * @member {string} name - * @memberof query.MessageStreamRequest - * @instance - */ - MessageStreamRequest.prototype.name = ""; - - /** - * Creates a new MessageStreamRequest instance using the specified properties. - * @function create - * @memberof query.MessageStreamRequest - * @static - * @param {query.IMessageStreamRequest=} [properties] Properties to set - * @returns {query.MessageStreamRequest} MessageStreamRequest instance - */ - MessageStreamRequest.create = function create(properties) { - return new MessageStreamRequest(properties); - }; - - /** - * Encodes the specified MessageStreamRequest message. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. - * @function encode - * @memberof query.MessageStreamRequest - * @static - * @param {query.IMessageStreamRequest} message MessageStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageStreamRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified MessageStreamRequest message, length delimited. Does not implicitly {@link query.MessageStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.MessageStreamRequest - * @static - * @param {query.IMessageStreamRequest} message MessageStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof query.MessageStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.MessageStreamRequest} MessageStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.MessageStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageStreamRequest} MessageStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageStreamRequest message. - * @function verify - * @memberof query.MessageStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageStreamRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a MessageStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.MessageStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {query.MessageStreamRequest} MessageStreamRequest - */ - MessageStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageStreamRequest) - return object; - var message = new $root.query.MessageStreamRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.MessageStreamRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.MessageStreamRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.MessageStreamRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a MessageStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.MessageStreamRequest - * @static - * @param {query.MessageStreamRequest} message MessageStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.name = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this MessageStreamRequest to JSON. - * @function toJSON - * @memberof query.MessageStreamRequest - * @instance - * @returns {Object.} JSON object - */ - MessageStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MessageStreamRequest; - })(); - - query.MessageStreamResponse = (function() { - - /** - * Properties of a MessageStreamResponse. - * @memberof query - * @interface IMessageStreamResponse - * @property {query.IQueryResult|null} [result] MessageStreamResponse result - */ - - /** - * Constructs a new MessageStreamResponse. - * @memberof query - * @classdesc Represents a MessageStreamResponse. - * @implements IMessageStreamResponse - * @constructor - * @param {query.IMessageStreamResponse=} [properties] Properties to set - */ - function MessageStreamResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageStreamResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.MessageStreamResponse - * @instance - */ - MessageStreamResponse.prototype.result = null; - - /** - * Creates a new MessageStreamResponse instance using the specified properties. - * @function create - * @memberof query.MessageStreamResponse - * @static - * @param {query.IMessageStreamResponse=} [properties] Properties to set - * @returns {query.MessageStreamResponse} MessageStreamResponse instance - */ - MessageStreamResponse.create = function create(properties) { - return new MessageStreamResponse(properties); - }; - - /** - * Encodes the specified MessageStreamResponse message. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. - * @function encode - * @memberof query.MessageStreamResponse - * @static - * @param {query.IMessageStreamResponse} message MessageStreamResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageStreamResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageStreamResponse message, length delimited. Does not implicitly {@link query.MessageStreamResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.MessageStreamResponse - * @static - * @param {query.IMessageStreamResponse} message MessageStreamResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageStreamResponse message from the specified reader or buffer. - * @function decode - * @memberof query.MessageStreamResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.MessageStreamResponse} MessageStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageStreamResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageStreamResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageStreamResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.MessageStreamResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageStreamResponse} MessageStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageStreamResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageStreamResponse message. - * @function verify - * @memberof query.MessageStreamResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageStreamResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a MessageStreamResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.MessageStreamResponse - * @static - * @param {Object.} object Plain object - * @returns {query.MessageStreamResponse} MessageStreamResponse - */ - MessageStreamResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageStreamResponse) - return object; - var message = new $root.query.MessageStreamResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.MessageStreamResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a MessageStreamResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.MessageStreamResponse - * @static - * @param {query.MessageStreamResponse} message MessageStreamResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageStreamResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this MessageStreamResponse to JSON. - * @function toJSON - * @memberof query.MessageStreamResponse - * @instance - * @returns {Object.} JSON object - */ - MessageStreamResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MessageStreamResponse; - })(); - - query.MessageAckRequest = (function() { - - /** - * Properties of a MessageAckRequest. - * @memberof query - * @interface IMessageAckRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] MessageAckRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] MessageAckRequest immediate_caller_id - * @property {query.ITarget|null} [target] MessageAckRequest target - * @property {string|null} [name] MessageAckRequest name - * @property {Array.|null} [ids] MessageAckRequest ids - */ - - /** - * Constructs a new MessageAckRequest. - * @memberof query - * @classdesc Represents a MessageAckRequest. - * @implements IMessageAckRequest - * @constructor - * @param {query.IMessageAckRequest=} [properties] Properties to set - */ - function MessageAckRequest(properties) { - this.ids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageAckRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.MessageAckRequest - * @instance - */ - MessageAckRequest.prototype.effective_caller_id = null; - - /** - * MessageAckRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.MessageAckRequest - * @instance - */ - MessageAckRequest.prototype.immediate_caller_id = null; - - /** - * MessageAckRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.MessageAckRequest - * @instance - */ - MessageAckRequest.prototype.target = null; - - /** - * MessageAckRequest name. - * @member {string} name - * @memberof query.MessageAckRequest - * @instance - */ - MessageAckRequest.prototype.name = ""; - - /** - * MessageAckRequest ids. - * @member {Array.} ids - * @memberof query.MessageAckRequest - * @instance - */ - MessageAckRequest.prototype.ids = $util.emptyArray; - - /** - * Creates a new MessageAckRequest instance using the specified properties. - * @function create - * @memberof query.MessageAckRequest - * @static - * @param {query.IMessageAckRequest=} [properties] Properties to set - * @returns {query.MessageAckRequest} MessageAckRequest instance - */ - MessageAckRequest.create = function create(properties) { - return new MessageAckRequest(properties); - }; - - /** - * Encodes the specified MessageAckRequest message. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. - * @function encode - * @memberof query.MessageAckRequest - * @static - * @param {query.IMessageAckRequest} message MessageAckRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAckRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - if (message.ids != null && message.ids.length) - for (var i = 0; i < message.ids.length; ++i) - $root.query.Value.encode(message.ids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageAckRequest message, length delimited. Does not implicitly {@link query.MessageAckRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.MessageAckRequest - * @static - * @param {query.IMessageAckRequest} message MessageAckRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAckRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageAckRequest message from the specified reader or buffer. - * @function decode - * @memberof query.MessageAckRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.MessageAckRequest} MessageAckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAckRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageAckRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.name = reader.string(); - break; - case 5: - if (!(message.ids && message.ids.length)) - message.ids = []; - message.ids.push($root.query.Value.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageAckRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.MessageAckRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageAckRequest} MessageAckRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAckRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageAckRequest message. - * @function verify - * @memberof query.MessageAckRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageAckRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.ids != null && message.hasOwnProperty("ids")) { - if (!Array.isArray(message.ids)) - return "ids: array expected"; - for (var i = 0; i < message.ids.length; ++i) { - var error = $root.query.Value.verify(message.ids[i]); - if (error) - return "ids." + error; - } - } - return null; - }; - - /** - * Creates a MessageAckRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.MessageAckRequest - * @static - * @param {Object.} object Plain object - * @returns {query.MessageAckRequest} MessageAckRequest - */ - MessageAckRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageAckRequest) - return object; - var message = new $root.query.MessageAckRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.MessageAckRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.MessageAckRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.MessageAckRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.name != null) - message.name = String(object.name); - if (object.ids) { - if (!Array.isArray(object.ids)) - throw TypeError(".query.MessageAckRequest.ids: array expected"); - message.ids = []; - for (var i = 0; i < object.ids.length; ++i) { - if (typeof object.ids[i] !== "object") - throw TypeError(".query.MessageAckRequest.ids: object expected"); - message.ids[i] = $root.query.Value.fromObject(object.ids[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MessageAckRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.MessageAckRequest - * @static - * @param {query.MessageAckRequest} message MessageAckRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageAckRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ids = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.name = ""; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ids && message.ids.length) { - object.ids = []; - for (var j = 0; j < message.ids.length; ++j) - object.ids[j] = $root.query.Value.toObject(message.ids[j], options); - } - return object; - }; - - /** - * Converts this MessageAckRequest to JSON. - * @function toJSON - * @memberof query.MessageAckRequest - * @instance - * @returns {Object.} JSON object - */ - MessageAckRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MessageAckRequest; - })(); - - query.MessageAckResponse = (function() { - - /** - * Properties of a MessageAckResponse. - * @memberof query - * @interface IMessageAckResponse - * @property {query.IQueryResult|null} [result] MessageAckResponse result - */ - - /** - * Constructs a new MessageAckResponse. - * @memberof query - * @classdesc Represents a MessageAckResponse. - * @implements IMessageAckResponse - * @constructor - * @param {query.IMessageAckResponse=} [properties] Properties to set - */ - function MessageAckResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageAckResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.MessageAckResponse - * @instance - */ - MessageAckResponse.prototype.result = null; - - /** - * Creates a new MessageAckResponse instance using the specified properties. - * @function create - * @memberof query.MessageAckResponse - * @static - * @param {query.IMessageAckResponse=} [properties] Properties to set - * @returns {query.MessageAckResponse} MessageAckResponse instance - */ - MessageAckResponse.create = function create(properties) { - return new MessageAckResponse(properties); - }; - - /** - * Encodes the specified MessageAckResponse message. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. - * @function encode - * @memberof query.MessageAckResponse - * @static - * @param {query.IMessageAckResponse} message MessageAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAckResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageAckResponse message, length delimited. Does not implicitly {@link query.MessageAckResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.MessageAckResponse - * @static - * @param {query.IMessageAckResponse} message MessageAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageAckResponse message from the specified reader or buffer. - * @function decode - * @memberof query.MessageAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.MessageAckResponse} MessageAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAckResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.MessageAckResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageAckResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.MessageAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.MessageAckResponse} MessageAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAckResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageAckResponse message. - * @function verify - * @memberof query.MessageAckResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageAckResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a MessageAckResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.MessageAckResponse - * @static - * @param {Object.} object Plain object - * @returns {query.MessageAckResponse} MessageAckResponse - */ - MessageAckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.MessageAckResponse) - return object; - var message = new $root.query.MessageAckResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.MessageAckResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a MessageAckResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.MessageAckResponse - * @static - * @param {query.MessageAckResponse} message MessageAckResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageAckResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this MessageAckResponse to JSON. - * @function toJSON - * @memberof query.MessageAckResponse - * @instance - * @returns {Object.} JSON object - */ - MessageAckResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MessageAckResponse; - })(); - - query.ReserveExecuteRequest = (function() { - - /** - * Properties of a ReserveExecuteRequest. - * @memberof query - * @interface IReserveExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReserveExecuteRequest target - * @property {query.IBoundQuery|null} [query] ReserveExecuteRequest query - * @property {number|Long|null} [transaction_id] ReserveExecuteRequest transaction_id - * @property {query.IExecuteOptions|null} [options] ReserveExecuteRequest options - * @property {Array.|null} [pre_queries] ReserveExecuteRequest pre_queries - */ - - /** - * Constructs a new ReserveExecuteRequest. - * @memberof query - * @classdesc Represents a ReserveExecuteRequest. - * @implements IReserveExecuteRequest - * @constructor - * @param {query.IReserveExecuteRequest=} [properties] Properties to set - */ - function ReserveExecuteRequest(properties) { - this.pre_queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReserveExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.effective_caller_id = null; - - /** - * ReserveExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.immediate_caller_id = null; - - /** - * ReserveExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.target = null; - - /** - * ReserveExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.query = null; - - /** - * ReserveExecuteRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.options = null; - - /** - * ReserveExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.ReserveExecuteRequest - * @instance - */ - ReserveExecuteRequest.prototype.pre_queries = $util.emptyArray; - - /** - * Creates a new ReserveExecuteRequest instance using the specified properties. - * @function create - * @memberof query.ReserveExecuteRequest - * @static - * @param {query.IReserveExecuteRequest=} [properties] Properties to set - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest instance - */ - ReserveExecuteRequest.create = function create(properties) { - return new ReserveExecuteRequest(properties); - }; - - /** - * Encodes the specified ReserveExecuteRequest message. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. - * @function encode - * @memberof query.ReserveExecuteRequest - * @static - * @param {query.IReserveExecuteRequest} message ReserveExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveExecuteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transaction_id); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pre_queries[i]); - return writer; - }; - - /** - * Encodes the specified ReserveExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveExecuteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReserveExecuteRequest - * @static - * @param {query.IReserveExecuteRequest} message ReserveExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ReserveExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveExecuteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveExecuteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.transaction_id = reader.int64(); - break; - case 6: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReserveExecuteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReserveExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveExecuteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReserveExecuteRequest message. - * @function verify - * @memberof query.ReserveExecuteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReserveExecuteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; - } - return null; - }; - - /** - * Creates a ReserveExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReserveExecuteRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ReserveExecuteRequest} ReserveExecuteRequest - */ - ReserveExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveExecuteRequest) - return object; - var message = new $root.query.ReserveExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReserveExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReserveExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReserveExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ReserveExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ReserveExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.ReserveExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); - } - return message; - }; - - /** - * Creates a plain object from a ReserveExecuteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReserveExecuteRequest - * @static - * @param {query.ReserveExecuteRequest} message ReserveExecuteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReserveExecuteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pre_queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; - } - return object; - }; - - /** - * Converts this ReserveExecuteRequest to JSON. - * @function toJSON - * @memberof query.ReserveExecuteRequest - * @instance - * @returns {Object.} JSON object - */ - ReserveExecuteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReserveExecuteRequest; - })(); - - query.ReserveExecuteResponse = (function() { - - /** - * Properties of a ReserveExecuteResponse. - * @memberof query - * @interface IReserveExecuteResponse - * @property {vtrpc.IRPCError|null} [error] ReserveExecuteResponse error - * @property {query.IQueryResult|null} [result] ReserveExecuteResponse result - * @property {number|Long|null} [reserved_id] ReserveExecuteResponse reserved_id - * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveExecuteResponse tablet_alias - */ - - /** - * Constructs a new ReserveExecuteResponse. - * @memberof query - * @classdesc Represents a ReserveExecuteResponse. - * @implements IReserveExecuteResponse - * @constructor - * @param {query.IReserveExecuteResponse=} [properties] Properties to set - */ - function ReserveExecuteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReserveExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ReserveExecuteResponse - * @instance - */ - ReserveExecuteResponse.prototype.error = null; - - /** - * ReserveExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ReserveExecuteResponse - * @instance - */ - ReserveExecuteResponse.prototype.result = null; - - /** - * ReserveExecuteResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReserveExecuteResponse - * @instance - */ - ReserveExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.ReserveExecuteResponse - * @instance - */ - ReserveExecuteResponse.prototype.tablet_alias = null; - - /** - * Creates a new ReserveExecuteResponse instance using the specified properties. - * @function create - * @memberof query.ReserveExecuteResponse - * @static - * @param {query.IReserveExecuteResponse=} [properties] Properties to set - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse instance - */ - ReserveExecuteResponse.create = function create(properties) { - return new ReserveExecuteResponse(properties); - }; - - /** - * Encodes the specified ReserveExecuteResponse message. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. - * @function encode - * @memberof query.ReserveExecuteResponse - * @static - * @param {query.IReserveExecuteResponse} message ReserveExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveExecuteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.reserved_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReserveExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveExecuteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReserveExecuteResponse - * @static - * @param {query.IReserveExecuteResponse} message ReserveExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ReserveExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveExecuteResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveExecuteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); - break; - case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - case 3: - message.reserved_id = reader.int64(); - break; - case 4: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReserveExecuteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReserveExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveExecuteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReserveExecuteResponse message. - * @function verify - * @memberof query.ReserveExecuteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReserveExecuteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a ReserveExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReserveExecuteResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ReserveExecuteResponse} ReserveExecuteResponse - */ - ReserveExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveExecuteResponse) - return object; - var message = new $root.query.ReserveExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ReserveExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ReserveExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.ReserveExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a ReserveExecuteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReserveExecuteResponse - * @static - * @param {query.ReserveExecuteResponse} message ReserveExecuteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReserveExecuteResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.error = null; - object.result = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this ReserveExecuteResponse to JSON. - * @function toJSON - * @memberof query.ReserveExecuteResponse - * @instance - * @returns {Object.} JSON object - */ - ReserveExecuteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReserveExecuteResponse; - })(); - - query.ReserveBeginExecuteRequest = (function() { - - /** - * Properties of a ReserveBeginExecuteRequest. - * @memberof query - * @interface IReserveBeginExecuteRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReserveBeginExecuteRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReserveBeginExecuteRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReserveBeginExecuteRequest target - * @property {query.IBoundQuery|null} [query] ReserveBeginExecuteRequest query - * @property {query.IExecuteOptions|null} [options] ReserveBeginExecuteRequest options - * @property {Array.|null} [pre_queries] ReserveBeginExecuteRequest pre_queries - */ - - /** - * Constructs a new ReserveBeginExecuteRequest. - * @memberof query - * @classdesc Represents a ReserveBeginExecuteRequest. - * @implements IReserveBeginExecuteRequest - * @constructor - * @param {query.IReserveBeginExecuteRequest=} [properties] Properties to set - */ - function ReserveBeginExecuteRequest(properties) { - this.pre_queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReserveBeginExecuteRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.effective_caller_id = null; - - /** - * ReserveBeginExecuteRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.immediate_caller_id = null; - - /** - * ReserveBeginExecuteRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.target = null; - - /** - * ReserveBeginExecuteRequest query. - * @member {query.IBoundQuery|null|undefined} query - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.query = null; - - /** - * ReserveBeginExecuteRequest options. - * @member {query.IExecuteOptions|null|undefined} options - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.options = null; - - /** - * ReserveBeginExecuteRequest pre_queries. - * @member {Array.} pre_queries - * @memberof query.ReserveBeginExecuteRequest - * @instance - */ - ReserveBeginExecuteRequest.prototype.pre_queries = $util.emptyArray; - - /** - * Creates a new ReserveBeginExecuteRequest instance using the specified properties. - * @function create - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {query.IReserveBeginExecuteRequest=} [properties] Properties to set - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest instance - */ - ReserveBeginExecuteRequest.create = function create(properties) { - return new ReserveBeginExecuteRequest(properties); - }; - - /** - * Encodes the specified ReserveBeginExecuteRequest message. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. - * @function encode - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {query.IReserveBeginExecuteRequest} message ReserveBeginExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveBeginExecuteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.query.BoundQuery.encode(message.query, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.query.ExecuteOptions.encode(message.options, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pre_queries != null && message.pre_queries.length) - for (var i = 0; i < message.pre_queries.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pre_queries[i]); - return writer; - }; - - /** - * Encodes the specified ReserveBeginExecuteRequest message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {query.IReserveBeginExecuteRequest} message ReserveBeginExecuteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveBeginExecuteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveBeginExecuteRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginExecuteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = $root.query.BoundQuery.decode(reader, reader.uint32()); - break; - case 5: - message.options = $root.query.ExecuteOptions.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.pre_queries && message.pre_queries.length)) - message.pre_queries = []; - message.pre_queries.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReserveBeginExecuteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveBeginExecuteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReserveBeginExecuteRequest message. - * @function verify - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReserveBeginExecuteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.query.BoundQuery.verify(message.query); - if (error) - return "query." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.query.ExecuteOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.pre_queries != null && message.hasOwnProperty("pre_queries")) { - if (!Array.isArray(message.pre_queries)) - return "pre_queries: array expected"; - for (var i = 0; i < message.pre_queries.length; ++i) - if (!$util.isString(message.pre_queries[i])) - return "pre_queries: string[] expected"; - } - return null; - }; - - /** - * Creates a ReserveBeginExecuteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ReserveBeginExecuteRequest} ReserveBeginExecuteRequest - */ - ReserveBeginExecuteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveBeginExecuteRequest) - return object; - var message = new $root.query.ReserveBeginExecuteRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.query: object expected"); - message.query = $root.query.BoundQuery.fromObject(object.query); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".query.ReserveBeginExecuteRequest.options: object expected"); - message.options = $root.query.ExecuteOptions.fromObject(object.options); - } - if (object.pre_queries) { - if (!Array.isArray(object.pre_queries)) - throw TypeError(".query.ReserveBeginExecuteRequest.pre_queries: array expected"); - message.pre_queries = []; - for (var i = 0; i < object.pre_queries.length; ++i) - message.pre_queries[i] = String(object.pre_queries[i]); - } - return message; - }; - - /** - * Creates a plain object from a ReserveBeginExecuteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReserveBeginExecuteRequest - * @static - * @param {query.ReserveBeginExecuteRequest} message ReserveBeginExecuteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReserveBeginExecuteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pre_queries = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = null; - object.options = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.query.BoundQuery.toObject(message.query, options); - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.query.ExecuteOptions.toObject(message.options, options); - if (message.pre_queries && message.pre_queries.length) { - object.pre_queries = []; - for (var j = 0; j < message.pre_queries.length; ++j) - object.pre_queries[j] = message.pre_queries[j]; - } - return object; - }; - - /** - * Converts this ReserveBeginExecuteRequest to JSON. - * @function toJSON - * @memberof query.ReserveBeginExecuteRequest - * @instance - * @returns {Object.} JSON object - */ - ReserveBeginExecuteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReserveBeginExecuteRequest; - })(); - - query.ReserveBeginExecuteResponse = (function() { - - /** - * Properties of a ReserveBeginExecuteResponse. - * @memberof query - * @interface IReserveBeginExecuteResponse - * @property {vtrpc.IRPCError|null} [error] ReserveBeginExecuteResponse error - * @property {query.IQueryResult|null} [result] ReserveBeginExecuteResponse result - * @property {number|Long|null} [transaction_id] ReserveBeginExecuteResponse transaction_id - * @property {number|Long|null} [reserved_id] ReserveBeginExecuteResponse reserved_id - * @property {topodata.ITabletAlias|null} [tablet_alias] ReserveBeginExecuteResponse tablet_alias - */ - - /** - * Constructs a new ReserveBeginExecuteResponse. - * @memberof query - * @classdesc Represents a ReserveBeginExecuteResponse. - * @implements IReserveBeginExecuteResponse - * @constructor - * @param {query.IReserveBeginExecuteResponse=} [properties] Properties to set - */ - function ReserveBeginExecuteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReserveBeginExecuteResponse error. - * @member {vtrpc.IRPCError|null|undefined} error - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.error = null; - - /** - * ReserveBeginExecuteResponse result. - * @member {query.IQueryResult|null|undefined} result - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.result = null; - - /** - * ReserveBeginExecuteResponse transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveBeginExecuteResponse reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReserveBeginExecuteResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.ReserveBeginExecuteResponse - * @instance - */ - ReserveBeginExecuteResponse.prototype.tablet_alias = null; - - /** - * Creates a new ReserveBeginExecuteResponse instance using the specified properties. - * @function create - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {query.IReserveBeginExecuteResponse=} [properties] Properties to set - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse instance - */ - ReserveBeginExecuteResponse.create = function create(properties) { - return new ReserveBeginExecuteResponse(properties); - }; - - /** - * Encodes the specified ReserveBeginExecuteResponse message. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. - * @function encode - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {query.IReserveBeginExecuteResponse} message ReserveBeginExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveBeginExecuteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.vtrpc.RPCError.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.query.QueryResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transaction_id); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.reserved_id); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReserveBeginExecuteResponse message, length delimited. Does not implicitly {@link query.ReserveBeginExecuteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {query.IReserveBeginExecuteResponse} message ReserveBeginExecuteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReserveBeginExecuteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveBeginExecuteResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReserveBeginExecuteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.error = $root.vtrpc.RPCError.decode(reader, reader.uint32()); - break; - case 2: - message.result = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - case 3: - message.transaction_id = reader.int64(); - break; - case 4: - message.reserved_id = reader.int64(); - break; - case 5: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReserveBeginExecuteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReserveBeginExecuteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReserveBeginExecuteResponse message. - * @function verify - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReserveBeginExecuteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.vtrpc.RPCError.verify(message.error); - if (error) - return "error." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.query.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a ReserveBeginExecuteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ReserveBeginExecuteResponse} ReserveBeginExecuteResponse - */ - ReserveBeginExecuteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReserveBeginExecuteResponse) - return object; - var message = new $root.query.ReserveBeginExecuteResponse(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".query.ReserveBeginExecuteResponse.error: object expected"); - message.error = $root.vtrpc.RPCError.fromObject(object.error); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".query.ReserveBeginExecuteResponse.result: object expected"); - message.result = $root.query.QueryResult.fromObject(object.result); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.ReserveBeginExecuteResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a ReserveBeginExecuteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReserveBeginExecuteResponse - * @static - * @param {query.ReserveBeginExecuteResponse} message ReserveBeginExecuteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReserveBeginExecuteResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.error = null; - object.result = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - object.tablet_alias = null; - } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.vtrpc.RPCError.toObject(message.error, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.query.QueryResult.toObject(message.result, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this ReserveBeginExecuteResponse to JSON. - * @function toJSON - * @memberof query.ReserveBeginExecuteResponse - * @instance - * @returns {Object.} JSON object - */ - ReserveBeginExecuteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReserveBeginExecuteResponse; - })(); - - query.ReleaseRequest = (function() { - - /** - * Properties of a ReleaseRequest. - * @memberof query - * @interface IReleaseRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] ReleaseRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] ReleaseRequest immediate_caller_id - * @property {query.ITarget|null} [target] ReleaseRequest target - * @property {number|Long|null} [transaction_id] ReleaseRequest transaction_id - * @property {number|Long|null} [reserved_id] ReleaseRequest reserved_id - */ - - /** - * Constructs a new ReleaseRequest. - * @memberof query - * @classdesc Represents a ReleaseRequest. - * @implements IReleaseRequest - * @constructor - * @param {query.IReleaseRequest=} [properties] Properties to set - */ - function ReleaseRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReleaseRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof query.ReleaseRequest - * @instance - */ - ReleaseRequest.prototype.effective_caller_id = null; - - /** - * ReleaseRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof query.ReleaseRequest - * @instance - */ - ReleaseRequest.prototype.immediate_caller_id = null; - - /** - * ReleaseRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof query.ReleaseRequest - * @instance - */ - ReleaseRequest.prototype.target = null; - - /** - * ReleaseRequest transaction_id. - * @member {number|Long} transaction_id - * @memberof query.ReleaseRequest - * @instance - */ - ReleaseRequest.prototype.transaction_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ReleaseRequest reserved_id. - * @member {number|Long} reserved_id - * @memberof query.ReleaseRequest - * @instance - */ - ReleaseRequest.prototype.reserved_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ReleaseRequest instance using the specified properties. - * @function create - * @memberof query.ReleaseRequest - * @static - * @param {query.IReleaseRequest=} [properties] Properties to set - * @returns {query.ReleaseRequest} ReleaseRequest instance - */ - ReleaseRequest.create = function create(properties) { - return new ReleaseRequest(properties); - }; - - /** - * Encodes the specified ReleaseRequest message. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. - * @function encode - * @memberof query.ReleaseRequest - * @static - * @param {query.IReleaseRequest} message ReleaseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.transaction_id != null && Object.hasOwnProperty.call(message, "transaction_id")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.transaction_id); - if (message.reserved_id != null && Object.hasOwnProperty.call(message, "reserved_id")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.reserved_id); - return writer; - }; - - /** - * Encodes the specified ReleaseRequest message, length delimited. Does not implicitly {@link query.ReleaseRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReleaseRequest - * @static - * @param {query.IReleaseRequest} message ReleaseRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReleaseRequest message from the specified reader or buffer. - * @function decode - * @memberof query.ReleaseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReleaseRequest} ReleaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReleaseRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.transaction_id = reader.int64(); - break; - case 5: - message.reserved_id = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReleaseRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReleaseRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReleaseRequest} ReleaseRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReleaseRequest message. - * @function verify - * @memberof query.ReleaseRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (!$util.isInteger(message.transaction_id) && !(message.transaction_id && $util.isInteger(message.transaction_id.low) && $util.isInteger(message.transaction_id.high))) - return "transaction_id: integer|Long expected"; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (!$util.isInteger(message.reserved_id) && !(message.reserved_id && $util.isInteger(message.reserved_id.low) && $util.isInteger(message.reserved_id.high))) - return "reserved_id: integer|Long expected"; - return null; - }; - - /** - * Creates a ReleaseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReleaseRequest - * @static - * @param {Object.} object Plain object - * @returns {query.ReleaseRequest} ReleaseRequest - */ - ReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReleaseRequest) - return object; - var message = new $root.query.ReleaseRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".query.ReleaseRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".query.ReleaseRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.ReleaseRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.transaction_id != null) - if ($util.Long) - (message.transaction_id = $util.Long.fromValue(object.transaction_id)).unsigned = false; - else if (typeof object.transaction_id === "string") - message.transaction_id = parseInt(object.transaction_id, 10); - else if (typeof object.transaction_id === "number") - message.transaction_id = object.transaction_id; - else if (typeof object.transaction_id === "object") - message.transaction_id = new $util.LongBits(object.transaction_id.low >>> 0, object.transaction_id.high >>> 0).toNumber(); - if (object.reserved_id != null) - if ($util.Long) - (message.reserved_id = $util.Long.fromValue(object.reserved_id)).unsigned = false; - else if (typeof object.reserved_id === "string") - message.reserved_id = parseInt(object.reserved_id, 10); - else if (typeof object.reserved_id === "number") - message.reserved_id = object.reserved_id; - else if (typeof object.reserved_id === "object") - message.reserved_id = new $util.LongBits(object.reserved_id.low >>> 0, object.reserved_id.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ReleaseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReleaseRequest - * @static - * @param {query.ReleaseRequest} message ReleaseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.transaction_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transaction_id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.reserved_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.reserved_id = options.longs === String ? "0" : 0; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.transaction_id != null && message.hasOwnProperty("transaction_id")) - if (typeof message.transaction_id === "number") - object.transaction_id = options.longs === String ? String(message.transaction_id) : message.transaction_id; - else - object.transaction_id = options.longs === String ? $util.Long.prototype.toString.call(message.transaction_id) : options.longs === Number ? new $util.LongBits(message.transaction_id.low >>> 0, message.transaction_id.high >>> 0).toNumber() : message.transaction_id; - if (message.reserved_id != null && message.hasOwnProperty("reserved_id")) - if (typeof message.reserved_id === "number") - object.reserved_id = options.longs === String ? String(message.reserved_id) : message.reserved_id; - else - object.reserved_id = options.longs === String ? $util.Long.prototype.toString.call(message.reserved_id) : options.longs === Number ? new $util.LongBits(message.reserved_id.low >>> 0, message.reserved_id.high >>> 0).toNumber() : message.reserved_id; - return object; - }; - - /** - * Converts this ReleaseRequest to JSON. - * @function toJSON - * @memberof query.ReleaseRequest - * @instance - * @returns {Object.} JSON object - */ - ReleaseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReleaseRequest; - })(); - - query.ReleaseResponse = (function() { - - /** - * Properties of a ReleaseResponse. - * @memberof query - * @interface IReleaseResponse - */ - - /** - * Constructs a new ReleaseResponse. - * @memberof query - * @classdesc Represents a ReleaseResponse. - * @implements IReleaseResponse - * @constructor - * @param {query.IReleaseResponse=} [properties] Properties to set - */ - function ReleaseResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ReleaseResponse instance using the specified properties. - * @function create - * @memberof query.ReleaseResponse - * @static - * @param {query.IReleaseResponse=} [properties] Properties to set - * @returns {query.ReleaseResponse} ReleaseResponse instance - */ - ReleaseResponse.create = function create(properties) { - return new ReleaseResponse(properties); - }; - - /** - * Encodes the specified ReleaseResponse message. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. - * @function encode - * @memberof query.ReleaseResponse - * @static - * @param {query.IReleaseResponse} message ReleaseResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ReleaseResponse message, length delimited. Does not implicitly {@link query.ReleaseResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.ReleaseResponse - * @static - * @param {query.IReleaseResponse} message ReleaseResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReleaseResponse message from the specified reader or buffer. - * @function decode - * @memberof query.ReleaseResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.ReleaseResponse} ReleaseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.ReleaseResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReleaseResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.ReleaseResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.ReleaseResponse} ReleaseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReleaseResponse message. - * @function verify - * @memberof query.ReleaseResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ReleaseResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.ReleaseResponse - * @static - * @param {Object.} object Plain object - * @returns {query.ReleaseResponse} ReleaseResponse - */ - ReleaseResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.ReleaseResponse) - return object; - return new $root.query.ReleaseResponse(); - }; - - /** - * Creates a plain object from a ReleaseResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.ReleaseResponse - * @static - * @param {query.ReleaseResponse} message ReleaseResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ReleaseResponse to JSON. - * @function toJSON - * @memberof query.ReleaseResponse - * @instance - * @returns {Object.} JSON object - */ - ReleaseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReleaseResponse; - })(); - - query.StreamHealthRequest = (function() { - - /** - * Properties of a StreamHealthRequest. - * @memberof query - * @interface IStreamHealthRequest - */ - - /** - * Constructs a new StreamHealthRequest. - * @memberof query - * @classdesc Represents a StreamHealthRequest. - * @implements IStreamHealthRequest - * @constructor - * @param {query.IStreamHealthRequest=} [properties] Properties to set - */ - function StreamHealthRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new StreamHealthRequest instance using the specified properties. - * @function create - * @memberof query.StreamHealthRequest - * @static - * @param {query.IStreamHealthRequest=} [properties] Properties to set - * @returns {query.StreamHealthRequest} StreamHealthRequest instance - */ - StreamHealthRequest.create = function create(properties) { - return new StreamHealthRequest(properties); - }; - - /** - * Encodes the specified StreamHealthRequest message. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. - * @function encode - * @memberof query.StreamHealthRequest - * @static - * @param {query.IStreamHealthRequest} message StreamHealthRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamHealthRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StreamHealthRequest message, length delimited. Does not implicitly {@link query.StreamHealthRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamHealthRequest - * @static - * @param {query.IStreamHealthRequest} message StreamHealthRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamHealthRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamHealthRequest message from the specified reader or buffer. - * @function decode - * @memberof query.StreamHealthRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamHealthRequest} StreamHealthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamHealthRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamHealthRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamHealthRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamHealthRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamHealthRequest} StreamHealthRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamHealthRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamHealthRequest message. - * @function verify - * @memberof query.StreamHealthRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamHealthRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StreamHealthRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamHealthRequest - * @static - * @param {Object.} object Plain object - * @returns {query.StreamHealthRequest} StreamHealthRequest - */ - StreamHealthRequest.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamHealthRequest) - return object; - return new $root.query.StreamHealthRequest(); - }; - - /** - * Creates a plain object from a StreamHealthRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamHealthRequest - * @static - * @param {query.StreamHealthRequest} message StreamHealthRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamHealthRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StreamHealthRequest to JSON. - * @function toJSON - * @memberof query.StreamHealthRequest - * @instance - * @returns {Object.} JSON object - */ - StreamHealthRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamHealthRequest; - })(); - - query.RealtimeStats = (function() { - - /** - * Properties of a RealtimeStats. - * @memberof query - * @interface IRealtimeStats - * @property {string|null} [health_error] RealtimeStats health_error - * @property {number|null} [seconds_behind_master] RealtimeStats seconds_behind_master - * @property {number|null} [binlog_players_count] RealtimeStats binlog_players_count - * @property {number|Long|null} [seconds_behind_master_filtered_replication] RealtimeStats seconds_behind_master_filtered_replication - * @property {number|null} [cpu_usage] RealtimeStats cpu_usage - * @property {number|null} [qps] RealtimeStats qps - */ - - /** - * Constructs a new RealtimeStats. - * @memberof query - * @classdesc Represents a RealtimeStats. - * @implements IRealtimeStats - * @constructor - * @param {query.IRealtimeStats=} [properties] Properties to set - */ - function RealtimeStats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RealtimeStats health_error. - * @member {string} health_error - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.health_error = ""; - - /** - * RealtimeStats seconds_behind_master. - * @member {number} seconds_behind_master - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.seconds_behind_master = 0; - - /** - * RealtimeStats binlog_players_count. - * @member {number} binlog_players_count - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.binlog_players_count = 0; - - /** - * RealtimeStats seconds_behind_master_filtered_replication. - * @member {number|Long} seconds_behind_master_filtered_replication - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.seconds_behind_master_filtered_replication = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RealtimeStats cpu_usage. - * @member {number} cpu_usage - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.cpu_usage = 0; - - /** - * RealtimeStats qps. - * @member {number} qps - * @memberof query.RealtimeStats - * @instance - */ - RealtimeStats.prototype.qps = 0; - - /** - * Creates a new RealtimeStats instance using the specified properties. - * @function create - * @memberof query.RealtimeStats - * @static - * @param {query.IRealtimeStats=} [properties] Properties to set - * @returns {query.RealtimeStats} RealtimeStats instance - */ - RealtimeStats.create = function create(properties) { - return new RealtimeStats(properties); - }; - - /** - * Encodes the specified RealtimeStats message. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. - * @function encode - * @memberof query.RealtimeStats - * @static - * @param {query.IRealtimeStats} message RealtimeStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RealtimeStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.health_error != null && Object.hasOwnProperty.call(message, "health_error")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.health_error); - if (message.seconds_behind_master != null && Object.hasOwnProperty.call(message, "seconds_behind_master")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.seconds_behind_master); - if (message.binlog_players_count != null && Object.hasOwnProperty.call(message, "binlog_players_count")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.binlog_players_count); - if (message.seconds_behind_master_filtered_replication != null && Object.hasOwnProperty.call(message, "seconds_behind_master_filtered_replication")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.seconds_behind_master_filtered_replication); - if (message.cpu_usage != null && Object.hasOwnProperty.call(message, "cpu_usage")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.cpu_usage); - if (message.qps != null && Object.hasOwnProperty.call(message, "qps")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.qps); - return writer; - }; - - /** - * Encodes the specified RealtimeStats message, length delimited. Does not implicitly {@link query.RealtimeStats.verify|verify} messages. - * @function encodeDelimited - * @memberof query.RealtimeStats - * @static - * @param {query.IRealtimeStats} message RealtimeStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RealtimeStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RealtimeStats message from the specified reader or buffer. - * @function decode - * @memberof query.RealtimeStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.RealtimeStats} RealtimeStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RealtimeStats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.RealtimeStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.health_error = reader.string(); - break; - case 2: - message.seconds_behind_master = reader.uint32(); - break; - case 3: - message.binlog_players_count = reader.int32(); - break; - case 4: - message.seconds_behind_master_filtered_replication = reader.int64(); - break; - case 5: - message.cpu_usage = reader.double(); - break; - case 6: - message.qps = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RealtimeStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.RealtimeStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.RealtimeStats} RealtimeStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RealtimeStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RealtimeStats message. - * @function verify - * @memberof query.RealtimeStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RealtimeStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.health_error != null && message.hasOwnProperty("health_error")) - if (!$util.isString(message.health_error)) - return "health_error: string expected"; - if (message.seconds_behind_master != null && message.hasOwnProperty("seconds_behind_master")) - if (!$util.isInteger(message.seconds_behind_master)) - return "seconds_behind_master: integer expected"; - if (message.binlog_players_count != null && message.hasOwnProperty("binlog_players_count")) - if (!$util.isInteger(message.binlog_players_count)) - return "binlog_players_count: integer expected"; - if (message.seconds_behind_master_filtered_replication != null && message.hasOwnProperty("seconds_behind_master_filtered_replication")) - if (!$util.isInteger(message.seconds_behind_master_filtered_replication) && !(message.seconds_behind_master_filtered_replication && $util.isInteger(message.seconds_behind_master_filtered_replication.low) && $util.isInteger(message.seconds_behind_master_filtered_replication.high))) - return "seconds_behind_master_filtered_replication: integer|Long expected"; - if (message.cpu_usage != null && message.hasOwnProperty("cpu_usage")) - if (typeof message.cpu_usage !== "number") - return "cpu_usage: number expected"; - if (message.qps != null && message.hasOwnProperty("qps")) - if (typeof message.qps !== "number") - return "qps: number expected"; - return null; - }; - - /** - * Creates a RealtimeStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.RealtimeStats - * @static - * @param {Object.} object Plain object - * @returns {query.RealtimeStats} RealtimeStats - */ - RealtimeStats.fromObject = function fromObject(object) { - if (object instanceof $root.query.RealtimeStats) - return object; - var message = new $root.query.RealtimeStats(); - if (object.health_error != null) - message.health_error = String(object.health_error); - if (object.seconds_behind_master != null) - message.seconds_behind_master = object.seconds_behind_master >>> 0; - if (object.binlog_players_count != null) - message.binlog_players_count = object.binlog_players_count | 0; - if (object.seconds_behind_master_filtered_replication != null) - if ($util.Long) - (message.seconds_behind_master_filtered_replication = $util.Long.fromValue(object.seconds_behind_master_filtered_replication)).unsigned = false; - else if (typeof object.seconds_behind_master_filtered_replication === "string") - message.seconds_behind_master_filtered_replication = parseInt(object.seconds_behind_master_filtered_replication, 10); - else if (typeof object.seconds_behind_master_filtered_replication === "number") - message.seconds_behind_master_filtered_replication = object.seconds_behind_master_filtered_replication; - else if (typeof object.seconds_behind_master_filtered_replication === "object") - message.seconds_behind_master_filtered_replication = new $util.LongBits(object.seconds_behind_master_filtered_replication.low >>> 0, object.seconds_behind_master_filtered_replication.high >>> 0).toNumber(); - if (object.cpu_usage != null) - message.cpu_usage = Number(object.cpu_usage); - if (object.qps != null) - message.qps = Number(object.qps); - return message; - }; - - /** - * Creates a plain object from a RealtimeStats message. Also converts values to other types if specified. - * @function toObject - * @memberof query.RealtimeStats - * @static - * @param {query.RealtimeStats} message RealtimeStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RealtimeStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.health_error = ""; - object.seconds_behind_master = 0; - object.binlog_players_count = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds_behind_master_filtered_replication = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds_behind_master_filtered_replication = options.longs === String ? "0" : 0; - object.cpu_usage = 0; - object.qps = 0; - } - if (message.health_error != null && message.hasOwnProperty("health_error")) - object.health_error = message.health_error; - if (message.seconds_behind_master != null && message.hasOwnProperty("seconds_behind_master")) - object.seconds_behind_master = message.seconds_behind_master; - if (message.binlog_players_count != null && message.hasOwnProperty("binlog_players_count")) - object.binlog_players_count = message.binlog_players_count; - if (message.seconds_behind_master_filtered_replication != null && message.hasOwnProperty("seconds_behind_master_filtered_replication")) - if (typeof message.seconds_behind_master_filtered_replication === "number") - object.seconds_behind_master_filtered_replication = options.longs === String ? String(message.seconds_behind_master_filtered_replication) : message.seconds_behind_master_filtered_replication; - else - object.seconds_behind_master_filtered_replication = options.longs === String ? $util.Long.prototype.toString.call(message.seconds_behind_master_filtered_replication) : options.longs === Number ? new $util.LongBits(message.seconds_behind_master_filtered_replication.low >>> 0, message.seconds_behind_master_filtered_replication.high >>> 0).toNumber() : message.seconds_behind_master_filtered_replication; - if (message.cpu_usage != null && message.hasOwnProperty("cpu_usage")) - object.cpu_usage = options.json && !isFinite(message.cpu_usage) ? String(message.cpu_usage) : message.cpu_usage; - if (message.qps != null && message.hasOwnProperty("qps")) - object.qps = options.json && !isFinite(message.qps) ? String(message.qps) : message.qps; - return object; - }; - - /** - * Converts this RealtimeStats to JSON. - * @function toJSON - * @memberof query.RealtimeStats - * @instance - * @returns {Object.} JSON object - */ - RealtimeStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RealtimeStats; - })(); - - query.AggregateStats = (function() { - - /** - * Properties of an AggregateStats. - * @memberof query - * @interface IAggregateStats - * @property {number|null} [healthy_tablet_count] AggregateStats healthy_tablet_count - * @property {number|null} [unhealthy_tablet_count] AggregateStats unhealthy_tablet_count - * @property {number|null} [seconds_behind_master_min] AggregateStats seconds_behind_master_min - * @property {number|null} [seconds_behind_master_max] AggregateStats seconds_behind_master_max - */ - - /** - * Constructs a new AggregateStats. - * @memberof query - * @classdesc Represents an AggregateStats. - * @implements IAggregateStats - * @constructor - * @param {query.IAggregateStats=} [properties] Properties to set - */ - function AggregateStats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AggregateStats healthy_tablet_count. - * @member {number} healthy_tablet_count - * @memberof query.AggregateStats - * @instance - */ - AggregateStats.prototype.healthy_tablet_count = 0; - - /** - * AggregateStats unhealthy_tablet_count. - * @member {number} unhealthy_tablet_count - * @memberof query.AggregateStats - * @instance - */ - AggregateStats.prototype.unhealthy_tablet_count = 0; - - /** - * AggregateStats seconds_behind_master_min. - * @member {number} seconds_behind_master_min - * @memberof query.AggregateStats - * @instance - */ - AggregateStats.prototype.seconds_behind_master_min = 0; - - /** - * AggregateStats seconds_behind_master_max. - * @member {number} seconds_behind_master_max - * @memberof query.AggregateStats - * @instance - */ - AggregateStats.prototype.seconds_behind_master_max = 0; - - /** - * Creates a new AggregateStats instance using the specified properties. - * @function create - * @memberof query.AggregateStats - * @static - * @param {query.IAggregateStats=} [properties] Properties to set - * @returns {query.AggregateStats} AggregateStats instance - */ - AggregateStats.create = function create(properties) { - return new AggregateStats(properties); - }; - - /** - * Encodes the specified AggregateStats message. Does not implicitly {@link query.AggregateStats.verify|verify} messages. - * @function encode - * @memberof query.AggregateStats - * @static - * @param {query.IAggregateStats} message AggregateStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregateStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.healthy_tablet_count != null && Object.hasOwnProperty.call(message, "healthy_tablet_count")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.healthy_tablet_count); - if (message.unhealthy_tablet_count != null && Object.hasOwnProperty.call(message, "unhealthy_tablet_count")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.unhealthy_tablet_count); - if (message.seconds_behind_master_min != null && Object.hasOwnProperty.call(message, "seconds_behind_master_min")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.seconds_behind_master_min); - if (message.seconds_behind_master_max != null && Object.hasOwnProperty.call(message, "seconds_behind_master_max")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seconds_behind_master_max); - return writer; - }; - - /** - * Encodes the specified AggregateStats message, length delimited. Does not implicitly {@link query.AggregateStats.verify|verify} messages. - * @function encodeDelimited - * @memberof query.AggregateStats - * @static - * @param {query.IAggregateStats} message AggregateStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AggregateStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AggregateStats message from the specified reader or buffer. - * @function decode - * @memberof query.AggregateStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.AggregateStats} AggregateStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregateStats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.AggregateStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.healthy_tablet_count = reader.int32(); - break; - case 2: - message.unhealthy_tablet_count = reader.int32(); - break; - case 3: - message.seconds_behind_master_min = reader.uint32(); - break; - case 4: - message.seconds_behind_master_max = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AggregateStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.AggregateStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.AggregateStats} AggregateStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AggregateStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AggregateStats message. - * @function verify - * @memberof query.AggregateStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AggregateStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.healthy_tablet_count != null && message.hasOwnProperty("healthy_tablet_count")) - if (!$util.isInteger(message.healthy_tablet_count)) - return "healthy_tablet_count: integer expected"; - if (message.unhealthy_tablet_count != null && message.hasOwnProperty("unhealthy_tablet_count")) - if (!$util.isInteger(message.unhealthy_tablet_count)) - return "unhealthy_tablet_count: integer expected"; - if (message.seconds_behind_master_min != null && message.hasOwnProperty("seconds_behind_master_min")) - if (!$util.isInteger(message.seconds_behind_master_min)) - return "seconds_behind_master_min: integer expected"; - if (message.seconds_behind_master_max != null && message.hasOwnProperty("seconds_behind_master_max")) - if (!$util.isInteger(message.seconds_behind_master_max)) - return "seconds_behind_master_max: integer expected"; - return null; - }; - - /** - * Creates an AggregateStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.AggregateStats - * @static - * @param {Object.} object Plain object - * @returns {query.AggregateStats} AggregateStats - */ - AggregateStats.fromObject = function fromObject(object) { - if (object instanceof $root.query.AggregateStats) - return object; - var message = new $root.query.AggregateStats(); - if (object.healthy_tablet_count != null) - message.healthy_tablet_count = object.healthy_tablet_count | 0; - if (object.unhealthy_tablet_count != null) - message.unhealthy_tablet_count = object.unhealthy_tablet_count | 0; - if (object.seconds_behind_master_min != null) - message.seconds_behind_master_min = object.seconds_behind_master_min >>> 0; - if (object.seconds_behind_master_max != null) - message.seconds_behind_master_max = object.seconds_behind_master_max >>> 0; - return message; - }; - - /** - * Creates a plain object from an AggregateStats message. Also converts values to other types if specified. - * @function toObject - * @memberof query.AggregateStats - * @static - * @param {query.AggregateStats} message AggregateStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AggregateStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.healthy_tablet_count = 0; - object.unhealthy_tablet_count = 0; - object.seconds_behind_master_min = 0; - object.seconds_behind_master_max = 0; - } - if (message.healthy_tablet_count != null && message.hasOwnProperty("healthy_tablet_count")) - object.healthy_tablet_count = message.healthy_tablet_count; - if (message.unhealthy_tablet_count != null && message.hasOwnProperty("unhealthy_tablet_count")) - object.unhealthy_tablet_count = message.unhealthy_tablet_count; - if (message.seconds_behind_master_min != null && message.hasOwnProperty("seconds_behind_master_min")) - object.seconds_behind_master_min = message.seconds_behind_master_min; - if (message.seconds_behind_master_max != null && message.hasOwnProperty("seconds_behind_master_max")) - object.seconds_behind_master_max = message.seconds_behind_master_max; - return object; - }; - - /** - * Converts this AggregateStats to JSON. - * @function toJSON - * @memberof query.AggregateStats - * @instance - * @returns {Object.} JSON object - */ - AggregateStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AggregateStats; - })(); - - query.StreamHealthResponse = (function() { - - /** - * Properties of a StreamHealthResponse. - * @memberof query - * @interface IStreamHealthResponse - * @property {query.ITarget|null} [target] StreamHealthResponse target - * @property {boolean|null} [serving] StreamHealthResponse serving - * @property {number|Long|null} [tablet_externally_reparented_timestamp] StreamHealthResponse tablet_externally_reparented_timestamp - * @property {query.IRealtimeStats|null} [realtime_stats] StreamHealthResponse realtime_stats - * @property {topodata.ITabletAlias|null} [tablet_alias] StreamHealthResponse tablet_alias - */ - - /** - * Constructs a new StreamHealthResponse. - * @memberof query - * @classdesc Represents a StreamHealthResponse. - * @implements IStreamHealthResponse - * @constructor - * @param {query.IStreamHealthResponse=} [properties] Properties to set - */ - function StreamHealthResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamHealthResponse target. - * @member {query.ITarget|null|undefined} target - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.target = null; - - /** - * StreamHealthResponse serving. - * @member {boolean} serving - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.serving = false; - - /** - * StreamHealthResponse tablet_externally_reparented_timestamp. - * @member {number|Long} tablet_externally_reparented_timestamp - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.tablet_externally_reparented_timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StreamHealthResponse realtime_stats. - * @member {query.IRealtimeStats|null|undefined} realtime_stats - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.realtime_stats = null; - - /** - * StreamHealthResponse tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof query.StreamHealthResponse - * @instance - */ - StreamHealthResponse.prototype.tablet_alias = null; - - /** - * Creates a new StreamHealthResponse instance using the specified properties. - * @function create - * @memberof query.StreamHealthResponse - * @static - * @param {query.IStreamHealthResponse=} [properties] Properties to set - * @returns {query.StreamHealthResponse} StreamHealthResponse instance - */ - StreamHealthResponse.create = function create(properties) { - return new StreamHealthResponse(properties); - }; - - /** - * Encodes the specified StreamHealthResponse message. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. - * @function encode - * @memberof query.StreamHealthResponse - * @static - * @param {query.IStreamHealthResponse} message StreamHealthResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamHealthResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.serving != null && Object.hasOwnProperty.call(message, "serving")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.serving); - if (message.tablet_externally_reparented_timestamp != null && Object.hasOwnProperty.call(message, "tablet_externally_reparented_timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.tablet_externally_reparented_timestamp); - if (message.realtime_stats != null && Object.hasOwnProperty.call(message, "realtime_stats")) - $root.query.RealtimeStats.encode(message.realtime_stats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamHealthResponse message, length delimited. Does not implicitly {@link query.StreamHealthResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof query.StreamHealthResponse - * @static - * @param {query.IStreamHealthResponse} message StreamHealthResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamHealthResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamHealthResponse message from the specified reader or buffer. - * @function decode - * @memberof query.StreamHealthResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.StreamHealthResponse} StreamHealthResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamHealthResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.StreamHealthResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 2: - message.serving = reader.bool(); - break; - case 3: - message.tablet_externally_reparented_timestamp = reader.int64(); - break; - case 4: - message.realtime_stats = $root.query.RealtimeStats.decode(reader, reader.uint32()); - break; - case 5: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamHealthResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.StreamHealthResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.StreamHealthResponse} StreamHealthResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamHealthResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamHealthResponse message. - * @function verify - * @memberof query.StreamHealthResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamHealthResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.serving != null && message.hasOwnProperty("serving")) - if (typeof message.serving !== "boolean") - return "serving: boolean expected"; - if (message.tablet_externally_reparented_timestamp != null && message.hasOwnProperty("tablet_externally_reparented_timestamp")) - if (!$util.isInteger(message.tablet_externally_reparented_timestamp) && !(message.tablet_externally_reparented_timestamp && $util.isInteger(message.tablet_externally_reparented_timestamp.low) && $util.isInteger(message.tablet_externally_reparented_timestamp.high))) - return "tablet_externally_reparented_timestamp: integer|Long expected"; - if (message.realtime_stats != null && message.hasOwnProperty("realtime_stats")) { - var error = $root.query.RealtimeStats.verify(message.realtime_stats); - if (error) - return "realtime_stats." + error; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a StreamHealthResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.StreamHealthResponse - * @static - * @param {Object.} object Plain object - * @returns {query.StreamHealthResponse} StreamHealthResponse - */ - StreamHealthResponse.fromObject = function fromObject(object) { - if (object instanceof $root.query.StreamHealthResponse) - return object; - var message = new $root.query.StreamHealthResponse(); - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".query.StreamHealthResponse.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.serving != null) - message.serving = Boolean(object.serving); - if (object.tablet_externally_reparented_timestamp != null) - if ($util.Long) - (message.tablet_externally_reparented_timestamp = $util.Long.fromValue(object.tablet_externally_reparented_timestamp)).unsigned = false; - else if (typeof object.tablet_externally_reparented_timestamp === "string") - message.tablet_externally_reparented_timestamp = parseInt(object.tablet_externally_reparented_timestamp, 10); - else if (typeof object.tablet_externally_reparented_timestamp === "number") - message.tablet_externally_reparented_timestamp = object.tablet_externally_reparented_timestamp; - else if (typeof object.tablet_externally_reparented_timestamp === "object") - message.tablet_externally_reparented_timestamp = new $util.LongBits(object.tablet_externally_reparented_timestamp.low >>> 0, object.tablet_externally_reparented_timestamp.high >>> 0).toNumber(); - if (object.realtime_stats != null) { - if (typeof object.realtime_stats !== "object") - throw TypeError(".query.StreamHealthResponse.realtime_stats: object expected"); - message.realtime_stats = $root.query.RealtimeStats.fromObject(object.realtime_stats); - } - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".query.StreamHealthResponse.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a StreamHealthResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof query.StreamHealthResponse - * @static - * @param {query.StreamHealthResponse} message StreamHealthResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamHealthResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = null; - object.serving = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.tablet_externally_reparented_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tablet_externally_reparented_timestamp = options.longs === String ? "0" : 0; - object.realtime_stats = null; - object.tablet_alias = null; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.serving != null && message.hasOwnProperty("serving")) - object.serving = message.serving; - if (message.tablet_externally_reparented_timestamp != null && message.hasOwnProperty("tablet_externally_reparented_timestamp")) - if (typeof message.tablet_externally_reparented_timestamp === "number") - object.tablet_externally_reparented_timestamp = options.longs === String ? String(message.tablet_externally_reparented_timestamp) : message.tablet_externally_reparented_timestamp; - else - object.tablet_externally_reparented_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tablet_externally_reparented_timestamp) : options.longs === Number ? new $util.LongBits(message.tablet_externally_reparented_timestamp.low >>> 0, message.tablet_externally_reparented_timestamp.high >>> 0).toNumber() : message.tablet_externally_reparented_timestamp; - if (message.realtime_stats != null && message.hasOwnProperty("realtime_stats")) - object.realtime_stats = $root.query.RealtimeStats.toObject(message.realtime_stats, options); - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this StreamHealthResponse to JSON. - * @function toJSON - * @memberof query.StreamHealthResponse - * @instance - * @returns {Object.} JSON object - */ - StreamHealthResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamHealthResponse; - })(); - - /** - * TransactionState enum. - * @name query.TransactionState - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} PREPARE=1 PREPARE value - * @property {number} COMMIT=2 COMMIT value - * @property {number} ROLLBACK=3 ROLLBACK value - */ - query.TransactionState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "PREPARE"] = 1; - values[valuesById[2] = "COMMIT"] = 2; - values[valuesById[3] = "ROLLBACK"] = 3; - return values; - })(); - - query.TransactionMetadata = (function() { - - /** - * Properties of a TransactionMetadata. - * @memberof query - * @interface ITransactionMetadata - * @property {string|null} [dtid] TransactionMetadata dtid - * @property {query.TransactionState|null} [state] TransactionMetadata state - * @property {number|Long|null} [time_created] TransactionMetadata time_created - * @property {Array.|null} [participants] TransactionMetadata participants - */ - - /** - * Constructs a new TransactionMetadata. - * @memberof query - * @classdesc Represents a TransactionMetadata. - * @implements ITransactionMetadata - * @constructor - * @param {query.ITransactionMetadata=} [properties] Properties to set - */ - function TransactionMetadata(properties) { - this.participants = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TransactionMetadata dtid. - * @member {string} dtid - * @memberof query.TransactionMetadata - * @instance - */ - TransactionMetadata.prototype.dtid = ""; - - /** - * TransactionMetadata state. - * @member {query.TransactionState} state - * @memberof query.TransactionMetadata - * @instance - */ - TransactionMetadata.prototype.state = 0; - - /** - * TransactionMetadata time_created. - * @member {number|Long} time_created - * @memberof query.TransactionMetadata - * @instance - */ - TransactionMetadata.prototype.time_created = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TransactionMetadata participants. - * @member {Array.} participants - * @memberof query.TransactionMetadata - * @instance - */ - TransactionMetadata.prototype.participants = $util.emptyArray; - - /** - * Creates a new TransactionMetadata instance using the specified properties. - * @function create - * @memberof query.TransactionMetadata - * @static - * @param {query.ITransactionMetadata=} [properties] Properties to set - * @returns {query.TransactionMetadata} TransactionMetadata instance - */ - TransactionMetadata.create = function create(properties) { - return new TransactionMetadata(properties); - }; - - /** - * Encodes the specified TransactionMetadata message. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. - * @function encode - * @memberof query.TransactionMetadata - * @static - * @param {query.ITransactionMetadata} message TransactionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransactionMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dtid != null && Object.hasOwnProperty.call(message, "dtid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dtid); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.time_created != null && Object.hasOwnProperty.call(message, "time_created")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time_created); - if (message.participants != null && message.participants.length) - for (var i = 0; i < message.participants.length; ++i) - $root.query.Target.encode(message.participants[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TransactionMetadata message, length delimited. Does not implicitly {@link query.TransactionMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof query.TransactionMetadata - * @static - * @param {query.ITransactionMetadata} message TransactionMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransactionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TransactionMetadata message from the specified reader or buffer. - * @function decode - * @memberof query.TransactionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {query.TransactionMetadata} TransactionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransactionMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.query.TransactionMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dtid = reader.string(); - break; - case 2: - message.state = reader.int32(); - break; - case 3: - message.time_created = reader.int64(); - break; - case 4: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.query.Target.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TransactionMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof query.TransactionMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {query.TransactionMetadata} TransactionMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransactionMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TransactionMetadata message. - * @function verify - * @memberof query.TransactionMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TransactionMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dtid != null && message.hasOwnProperty("dtid")) - if (!$util.isString(message.dtid)) - return "dtid: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.time_created != null && message.hasOwnProperty("time_created")) - if (!$util.isInteger(message.time_created) && !(message.time_created && $util.isInteger(message.time_created.low) && $util.isInteger(message.time_created.high))) - return "time_created: integer|Long expected"; - if (message.participants != null && message.hasOwnProperty("participants")) { - if (!Array.isArray(message.participants)) - return "participants: array expected"; - for (var i = 0; i < message.participants.length; ++i) { - var error = $root.query.Target.verify(message.participants[i]); - if (error) - return "participants." + error; - } - } - return null; - }; - - /** - * Creates a TransactionMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof query.TransactionMetadata - * @static - * @param {Object.} object Plain object - * @returns {query.TransactionMetadata} TransactionMetadata - */ - TransactionMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.query.TransactionMetadata) - return object; - var message = new $root.query.TransactionMetadata(); - if (object.dtid != null) - message.dtid = String(object.dtid); - switch (object.state) { - case "UNKNOWN": - case 0: - message.state = 0; - break; - case "PREPARE": - case 1: - message.state = 1; - break; - case "COMMIT": - case 2: - message.state = 2; - break; - case "ROLLBACK": - case 3: - message.state = 3; - break; - } - if (object.time_created != null) - if ($util.Long) - (message.time_created = $util.Long.fromValue(object.time_created)).unsigned = false; - else if (typeof object.time_created === "string") - message.time_created = parseInt(object.time_created, 10); - else if (typeof object.time_created === "number") - message.time_created = object.time_created; - else if (typeof object.time_created === "object") - message.time_created = new $util.LongBits(object.time_created.low >>> 0, object.time_created.high >>> 0).toNumber(); - if (object.participants) { - if (!Array.isArray(object.participants)) - throw TypeError(".query.TransactionMetadata.participants: array expected"); - message.participants = []; - for (var i = 0; i < object.participants.length; ++i) { - if (typeof object.participants[i] !== "object") - throw TypeError(".query.TransactionMetadata.participants: object expected"); - message.participants[i] = $root.query.Target.fromObject(object.participants[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TransactionMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof query.TransactionMetadata - * @static - * @param {query.TransactionMetadata} message TransactionMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TransactionMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.participants = []; - if (options.defaults) { - object.dtid = ""; - object.state = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.time_created = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time_created = options.longs === String ? "0" : 0; - } - if (message.dtid != null && message.hasOwnProperty("dtid")) - object.dtid = message.dtid; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.query.TransactionState[message.state] : message.state; - if (message.time_created != null && message.hasOwnProperty("time_created")) - if (typeof message.time_created === "number") - object.time_created = options.longs === String ? String(message.time_created) : message.time_created; - else - object.time_created = options.longs === String ? $util.Long.prototype.toString.call(message.time_created) : options.longs === Number ? new $util.LongBits(message.time_created.low >>> 0, message.time_created.high >>> 0).toNumber() : message.time_created; - if (message.participants && message.participants.length) { - object.participants = []; - for (var j = 0; j < message.participants.length; ++j) - object.participants[j] = $root.query.Target.toObject(message.participants[j], options); - } - return object; - }; - - /** - * Converts this TransactionMetadata to JSON. - * @function toJSON - * @memberof query.TransactionMetadata - * @instance - * @returns {Object.} JSON object - */ - TransactionMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TransactionMetadata; - })(); - - return query; -})(); - -$root.topodata = (function() { - - /** - * Namespace topodata. - * @exports topodata - * @namespace - */ - var topodata = {}; - - topodata.KeyRange = (function() { - - /** - * Properties of a KeyRange. - * @memberof topodata - * @interface IKeyRange - * @property {Uint8Array|null} [start] KeyRange start - * @property {Uint8Array|null} [end] KeyRange end - */ - - /** - * Constructs a new KeyRange. - * @memberof topodata - * @classdesc Represents a KeyRange. - * @implements IKeyRange - * @constructor - * @param {topodata.IKeyRange=} [properties] Properties to set - */ - function KeyRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KeyRange start. - * @member {Uint8Array} start - * @memberof topodata.KeyRange - * @instance - */ - KeyRange.prototype.start = $util.newBuffer([]); - - /** - * KeyRange end. - * @member {Uint8Array} end - * @memberof topodata.KeyRange - * @instance - */ - KeyRange.prototype.end = $util.newBuffer([]); - - /** - * Creates a new KeyRange instance using the specified properties. - * @function create - * @memberof topodata.KeyRange - * @static - * @param {topodata.IKeyRange=} [properties] Properties to set - * @returns {topodata.KeyRange} KeyRange instance - */ - KeyRange.create = function create(properties) { - return new KeyRange(properties); - }; - - /** - * Encodes the specified KeyRange message. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. - * @function encode - * @memberof topodata.KeyRange - * @static - * @param {topodata.IKeyRange} message KeyRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.end); - return writer; - }; - - /** - * Encodes the specified KeyRange message, length delimited. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.KeyRange - * @static - * @param {topodata.IKeyRange} message KeyRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KeyRange message from the specified reader or buffer. - * @function decode - * @memberof topodata.KeyRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.KeyRange} KeyRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.KeyRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.bytes(); - break; - case 2: - message.end = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KeyRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.KeyRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.KeyRange} KeyRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KeyRange message. - * @function verify - * @memberof topodata.KeyRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!(message.start && typeof message.start.length === "number" || $util.isString(message.start))) - return "start: buffer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!(message.end && typeof message.end.length === "number" || $util.isString(message.end))) - return "end: buffer expected"; - return null; - }; - - /** - * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.KeyRange - * @static - * @param {Object.} object Plain object - * @returns {topodata.KeyRange} KeyRange - */ - KeyRange.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.KeyRange) - return object; - var message = new $root.topodata.KeyRange(); - if (object.start != null) - if (typeof object.start === "string") - $util.base64.decode(object.start, message.start = $util.newBuffer($util.base64.length(object.start)), 0); - else if (object.start.length) - message.start = object.start; - if (object.end != null) - if (typeof object.end === "string") - $util.base64.decode(object.end, message.end = $util.newBuffer($util.base64.length(object.end)), 0); - else if (object.end.length) - message.end = object.end; - return message; - }; - - /** - * Creates a plain object from a KeyRange message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.KeyRange - * @static - * @param {topodata.KeyRange} message KeyRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.start = ""; - else { - object.start = []; - if (options.bytes !== Array) - object.start = $util.newBuffer(object.start); - } - if (options.bytes === String) - object.end = ""; - else { - object.end = []; - if (options.bytes !== Array) - object.end = $util.newBuffer(object.end); - } - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = options.bytes === String ? $util.base64.encode(message.start, 0, message.start.length) : options.bytes === Array ? Array.prototype.slice.call(message.start) : message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = options.bytes === String ? $util.base64.encode(message.end, 0, message.end.length) : options.bytes === Array ? Array.prototype.slice.call(message.end) : message.end; - return object; - }; - - /** - * Converts this KeyRange to JSON. - * @function toJSON - * @memberof topodata.KeyRange - * @instance - * @returns {Object.} JSON object - */ - KeyRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KeyRange; - })(); - - /** - * KeyspaceType enum. - * @name topodata.KeyspaceType - * @enum {number} - * @property {number} NORMAL=0 NORMAL value - * @property {number} SNAPSHOT=1 SNAPSHOT value - */ - topodata.KeyspaceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NORMAL"] = 0; - values[valuesById[1] = "SNAPSHOT"] = 1; - return values; - })(); - - /** - * KeyspaceIdType enum. - * @name topodata.KeyspaceIdType - * @enum {number} - * @property {number} UNSET=0 UNSET value - * @property {number} UINT64=1 UINT64 value - * @property {number} BYTES=2 BYTES value - */ - topodata.KeyspaceIdType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSET"] = 0; - values[valuesById[1] = "UINT64"] = 1; - values[valuesById[2] = "BYTES"] = 2; - return values; - })(); - - topodata.TabletAlias = (function() { - - /** - * Properties of a TabletAlias. - * @memberof topodata - * @interface ITabletAlias - * @property {string|null} [cell] TabletAlias cell - * @property {number|null} [uid] TabletAlias uid - */ - - /** - * Constructs a new TabletAlias. - * @memberof topodata - * @classdesc Represents a TabletAlias. - * @implements ITabletAlias - * @constructor - * @param {topodata.ITabletAlias=} [properties] Properties to set - */ - function TabletAlias(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TabletAlias cell. - * @member {string} cell - * @memberof topodata.TabletAlias - * @instance - */ - TabletAlias.prototype.cell = ""; - - /** - * TabletAlias uid. - * @member {number} uid - * @memberof topodata.TabletAlias - * @instance - */ - TabletAlias.prototype.uid = 0; - - /** - * Creates a new TabletAlias instance using the specified properties. - * @function create - * @memberof topodata.TabletAlias - * @static - * @param {topodata.ITabletAlias=} [properties] Properties to set - * @returns {topodata.TabletAlias} TabletAlias instance - */ - TabletAlias.create = function create(properties) { - return new TabletAlias(properties); - }; - - /** - * Encodes the specified TabletAlias message. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. - * @function encode - * @memberof topodata.TabletAlias - * @static - * @param {topodata.ITabletAlias} message TabletAlias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletAlias.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.uid); - return writer; - }; - - /** - * Encodes the specified TabletAlias message, length delimited. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.TabletAlias - * @static - * @param {topodata.ITabletAlias} message TabletAlias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletAlias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TabletAlias message from the specified reader or buffer. - * @function decode - * @memberof topodata.TabletAlias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.TabletAlias} TabletAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletAlias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.TabletAlias(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cell = reader.string(); - break; - case 2: - message.uid = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TabletAlias message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.TabletAlias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.TabletAlias} TabletAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletAlias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TabletAlias message. - * @function verify - * @memberof topodata.TabletAlias - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TabletAlias.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isInteger(message.uid)) - return "uid: integer expected"; - return null; - }; - - /** - * Creates a TabletAlias message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.TabletAlias - * @static - * @param {Object.} object Plain object - * @returns {topodata.TabletAlias} TabletAlias - */ - TabletAlias.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.TabletAlias) - return object; - var message = new $root.topodata.TabletAlias(); - if (object.cell != null) - message.cell = String(object.cell); - if (object.uid != null) - message.uid = object.uid >>> 0; - return message; - }; - - /** - * Creates a plain object from a TabletAlias message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.TabletAlias - * @static - * @param {topodata.TabletAlias} message TabletAlias - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TabletAlias.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cell = ""; - object.uid = 0; - } - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - return object; - }; - - /** - * Converts this TabletAlias to JSON. - * @function toJSON - * @memberof topodata.TabletAlias - * @instance - * @returns {Object.} JSON object - */ - TabletAlias.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TabletAlias; - })(); - - /** - * TabletType enum. - * @name topodata.TabletType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} MASTER=1 MASTER value - * @property {number} REPLICA=2 REPLICA value - * @property {number} RDONLY=3 RDONLY value - * @property {number} BATCH=3 BATCH value - * @property {number} SPARE=4 SPARE value - * @property {number} EXPERIMENTAL=5 EXPERIMENTAL value - * @property {number} BACKUP=6 BACKUP value - * @property {number} RESTORE=7 RESTORE value - * @property {number} DRAINED=8 DRAINED value - */ - topodata.TabletType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "MASTER"] = 1; - values[valuesById[2] = "REPLICA"] = 2; - values[valuesById[3] = "RDONLY"] = 3; - values["BATCH"] = 3; - values[valuesById[4] = "SPARE"] = 4; - values[valuesById[5] = "EXPERIMENTAL"] = 5; - values[valuesById[6] = "BACKUP"] = 6; - values[valuesById[7] = "RESTORE"] = 7; - values[valuesById[8] = "DRAINED"] = 8; - return values; - })(); - - topodata.Tablet = (function() { - - /** - * Properties of a Tablet. - * @memberof topodata - * @interface ITablet - * @property {topodata.ITabletAlias|null} [alias] Tablet alias - * @property {string|null} [hostname] Tablet hostname - * @property {Object.|null} [port_map] Tablet port_map - * @property {string|null} [keyspace] Tablet keyspace - * @property {string|null} [shard] Tablet shard - * @property {topodata.IKeyRange|null} [key_range] Tablet key_range - * @property {topodata.TabletType|null} [type] Tablet type - * @property {string|null} [db_name_override] Tablet db_name_override - * @property {Object.|null} [tags] Tablet tags - * @property {string|null} [mysql_hostname] Tablet mysql_hostname - * @property {number|null} [mysql_port] Tablet mysql_port - * @property {vttime.ITime|null} [master_term_start_time] Tablet master_term_start_time - */ - - /** - * Constructs a new Tablet. - * @memberof topodata - * @classdesc Represents a Tablet. - * @implements ITablet - * @constructor - * @param {topodata.ITablet=} [properties] Properties to set - */ - function Tablet(properties) { - this.port_map = {}; - this.tags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tablet alias. - * @member {topodata.ITabletAlias|null|undefined} alias - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.alias = null; - - /** - * Tablet hostname. - * @member {string} hostname - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.hostname = ""; - - /** - * Tablet port_map. - * @member {Object.} port_map - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.port_map = $util.emptyObject; - - /** - * Tablet keyspace. - * @member {string} keyspace - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.keyspace = ""; - - /** - * Tablet shard. - * @member {string} shard - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.shard = ""; - - /** - * Tablet key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.key_range = null; - - /** - * Tablet type. - * @member {topodata.TabletType} type - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.type = 0; - - /** - * Tablet db_name_override. - * @member {string} db_name_override - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.db_name_override = ""; - - /** - * Tablet tags. - * @member {Object.} tags - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.tags = $util.emptyObject; - - /** - * Tablet mysql_hostname. - * @member {string} mysql_hostname - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.mysql_hostname = ""; - - /** - * Tablet mysql_port. - * @member {number} mysql_port - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.mysql_port = 0; - - /** - * Tablet master_term_start_time. - * @member {vttime.ITime|null|undefined} master_term_start_time - * @memberof topodata.Tablet - * @instance - */ - Tablet.prototype.master_term_start_time = null; - - /** - * Creates a new Tablet instance using the specified properties. - * @function create - * @memberof topodata.Tablet - * @static - * @param {topodata.ITablet=} [properties] Properties to set - * @returns {topodata.Tablet} Tablet instance - */ - Tablet.create = function create(properties) { - return new Tablet(properties); - }; - - /** - * Encodes the specified Tablet message. Does not implicitly {@link topodata.Tablet.verify|verify} messages. - * @function encode - * @memberof topodata.Tablet - * @static - * @param {topodata.ITablet} message Tablet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tablet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) - $root.topodata.TabletAlias.encode(message.alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname); - if (message.port_map != null && Object.hasOwnProperty.call(message, "port_map")) - for (var keys = Object.keys(message.port_map), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.port_map[keys[i]]).ldelim(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.shard); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.type); - if (message.db_name_override != null && Object.hasOwnProperty.call(message, "db_name_override")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.db_name_override); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - if (message.mysql_hostname != null && Object.hasOwnProperty.call(message, "mysql_hostname")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.mysql_hostname); - if (message.mysql_port != null && Object.hasOwnProperty.call(message, "mysql_port")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.mysql_port); - if (message.master_term_start_time != null && Object.hasOwnProperty.call(message, "master_term_start_time")) - $root.vttime.Time.encode(message.master_term_start_time, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Tablet message, length delimited. Does not implicitly {@link topodata.Tablet.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Tablet - * @static - * @param {topodata.ITablet} message Tablet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tablet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tablet message from the specified reader or buffer. - * @function decode - * @memberof topodata.Tablet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Tablet} Tablet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tablet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Tablet(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.hostname = reader.string(); - break; - case 4: - if (message.port_map === $util.emptyObject) - message.port_map = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.port_map[key] = value; - break; - case 5: - message.keyspace = reader.string(); - break; - case 6: - message.shard = reader.string(); - break; - case 7: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 8: - message.type = reader.int32(); - break; - case 9: - message.db_name_override = reader.string(); - break; - case 10: - if (message.tags === $util.emptyObject) - message.tags = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tags[key] = value; - break; - case 12: - message.mysql_hostname = reader.string(); - break; - case 13: - message.mysql_port = reader.int32(); - break; - case 14: - message.master_term_start_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tablet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Tablet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Tablet} Tablet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tablet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tablet message. - * @function verify - * @memberof topodata.Tablet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tablet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.alias != null && message.hasOwnProperty("alias")) { - var error = $root.topodata.TabletAlias.verify(message.alias); - if (error) - return "alias." + error; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.port_map != null && message.hasOwnProperty("port_map")) { - if (!$util.isObject(message.port_map)) - return "port_map: object expected"; - var key = Object.keys(message.port_map); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.port_map[key[i]])) - return "port_map: integer{k:string} expected"; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.db_name_override != null && message.hasOwnProperty("db_name_override")) - if (!$util.isString(message.db_name_override)) - return "db_name_override: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - if (message.mysql_hostname != null && message.hasOwnProperty("mysql_hostname")) - if (!$util.isString(message.mysql_hostname)) - return "mysql_hostname: string expected"; - if (message.mysql_port != null && message.hasOwnProperty("mysql_port")) - if (!$util.isInteger(message.mysql_port)) - return "mysql_port: integer expected"; - if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) { - var error = $root.vttime.Time.verify(message.master_term_start_time); - if (error) - return "master_term_start_time." + error; - } - return null; - }; - - /** - * Creates a Tablet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Tablet - * @static - * @param {Object.} object Plain object - * @returns {topodata.Tablet} Tablet - */ - Tablet.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Tablet) - return object; - var message = new $root.topodata.Tablet(); - if (object.alias != null) { - if (typeof object.alias !== "object") - throw TypeError(".topodata.Tablet.alias: object expected"); - message.alias = $root.topodata.TabletAlias.fromObject(object.alias); - } - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.port_map) { - if (typeof object.port_map !== "object") - throw TypeError(".topodata.Tablet.port_map: object expected"); - message.port_map = {}; - for (var keys = Object.keys(object.port_map), i = 0; i < keys.length; ++i) - message.port_map[keys[i]] = object.port_map[keys[i]] | 0; - } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".topodata.Tablet.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "MASTER": - case 1: - message.type = 1; - break; - case "REPLICA": - case 2: - message.type = 2; - break; - case "RDONLY": - case 3: - message.type = 3; - break; - case "BATCH": - case 3: - message.type = 3; - break; - case "SPARE": - case 4: - message.type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.type = 5; - break; - case "BACKUP": - case 6: - message.type = 6; - break; - case "RESTORE": - case 7: - message.type = 7; - break; - case "DRAINED": - case 8: - message.type = 8; - break; - } - if (object.db_name_override != null) - message.db_name_override = String(object.db_name_override); - if (object.tags) { - if (typeof object.tags !== "object") - throw TypeError(".topodata.Tablet.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - if (object.mysql_hostname != null) - message.mysql_hostname = String(object.mysql_hostname); - if (object.mysql_port != null) - message.mysql_port = object.mysql_port | 0; - if (object.master_term_start_time != null) { - if (typeof object.master_term_start_time !== "object") - throw TypeError(".topodata.Tablet.master_term_start_time: object expected"); - message.master_term_start_time = $root.vttime.Time.fromObject(object.master_term_start_time); - } - return message; - }; - - /** - * Creates a plain object from a Tablet message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Tablet - * @static - * @param {topodata.Tablet} message Tablet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tablet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.port_map = {}; - object.tags = {}; - } - if (options.defaults) { - object.alias = null; - object.hostname = ""; - object.keyspace = ""; - object.shard = ""; - object.key_range = null; - object.type = options.enums === String ? "UNKNOWN" : 0; - object.db_name_override = ""; - object.mysql_hostname = ""; - object.mysql_port = 0; - object.master_term_start_time = null; - } - if (message.alias != null && message.hasOwnProperty("alias")) - object.alias = $root.topodata.TabletAlias.toObject(message.alias, options); - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - var keys2; - if (message.port_map && (keys2 = Object.keys(message.port_map)).length) { - object.port_map = {}; - for (var j = 0; j < keys2.length; ++j) - object.port_map[keys2[j]] = message.port_map[keys2[j]]; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.topodata.TabletType[message.type] : message.type; - if (message.db_name_override != null && message.hasOwnProperty("db_name_override")) - object.db_name_override = message.db_name_override; - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - if (message.mysql_hostname != null && message.hasOwnProperty("mysql_hostname")) - object.mysql_hostname = message.mysql_hostname; - if (message.mysql_port != null && message.hasOwnProperty("mysql_port")) - object.mysql_port = message.mysql_port; - if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) - object.master_term_start_time = $root.vttime.Time.toObject(message.master_term_start_time, options); - return object; - }; - - /** - * Converts this Tablet to JSON. - * @function toJSON - * @memberof topodata.Tablet - * @instance - * @returns {Object.} JSON object - */ - Tablet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Tablet; - })(); - - topodata.Shard = (function() { - - /** - * Properties of a Shard. - * @memberof topodata - * @interface IShard - * @property {topodata.ITabletAlias|null} [master_alias] Shard master_alias - * @property {vttime.ITime|null} [master_term_start_time] Shard master_term_start_time - * @property {topodata.IKeyRange|null} [key_range] Shard key_range - * @property {Array.|null} [served_types] Shard served_types - * @property {Array.|null} [source_shards] Shard source_shards - * @property {Array.|null} [tablet_controls] Shard tablet_controls - * @property {boolean|null} [is_master_serving] Shard is_master_serving - */ - - /** - * Constructs a new Shard. - * @memberof topodata - * @classdesc Represents a Shard. - * @implements IShard - * @constructor - * @param {topodata.IShard=} [properties] Properties to set - */ - function Shard(properties) { - this.served_types = []; - this.source_shards = []; - this.tablet_controls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Shard master_alias. - * @member {topodata.ITabletAlias|null|undefined} master_alias - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.master_alias = null; - - /** - * Shard master_term_start_time. - * @member {vttime.ITime|null|undefined} master_term_start_time - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.master_term_start_time = null; - - /** - * Shard key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.key_range = null; - - /** - * Shard served_types. - * @member {Array.} served_types - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.served_types = $util.emptyArray; - - /** - * Shard source_shards. - * @member {Array.} source_shards - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.source_shards = $util.emptyArray; - - /** - * Shard tablet_controls. - * @member {Array.} tablet_controls - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.tablet_controls = $util.emptyArray; - - /** - * Shard is_master_serving. - * @member {boolean} is_master_serving - * @memberof topodata.Shard - * @instance - */ - Shard.prototype.is_master_serving = false; - - /** - * Creates a new Shard instance using the specified properties. - * @function create - * @memberof topodata.Shard - * @static - * @param {topodata.IShard=} [properties] Properties to set - * @returns {topodata.Shard} Shard instance - */ - Shard.create = function create(properties) { - return new Shard(properties); - }; - - /** - * Encodes the specified Shard message. Does not implicitly {@link topodata.Shard.verify|verify} messages. - * @function encode - * @memberof topodata.Shard - * @static - * @param {topodata.IShard} message Shard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Shard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.master_alias != null && Object.hasOwnProperty.call(message, "master_alias")) - $root.topodata.TabletAlias.encode(message.master_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.served_types != null && message.served_types.length) - for (var i = 0; i < message.served_types.length; ++i) - $root.topodata.Shard.ServedType.encode(message.served_types[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.source_shards != null && message.source_shards.length) - for (var i = 0; i < message.source_shards.length; ++i) - $root.topodata.Shard.SourceShard.encode(message.source_shards[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tablet_controls != null && message.tablet_controls.length) - for (var i = 0; i < message.tablet_controls.length; ++i) - $root.topodata.Shard.TabletControl.encode(message.tablet_controls[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.is_master_serving != null && Object.hasOwnProperty.call(message, "is_master_serving")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.is_master_serving); - if (message.master_term_start_time != null && Object.hasOwnProperty.call(message, "master_term_start_time")) - $root.vttime.Time.encode(message.master_term_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Shard message, length delimited. Does not implicitly {@link topodata.Shard.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Shard - * @static - * @param {topodata.IShard} message Shard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Shard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Shard message from the specified reader or buffer. - * @function decode - * @memberof topodata.Shard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Shard} Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Shard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.master_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 8: - message.master_term_start_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.served_types && message.served_types.length)) - message.served_types = []; - message.served_types.push($root.topodata.Shard.ServedType.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.source_shards && message.source_shards.length)) - message.source_shards = []; - message.source_shards.push($root.topodata.Shard.SourceShard.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.tablet_controls && message.tablet_controls.length)) - message.tablet_controls = []; - message.tablet_controls.push($root.topodata.Shard.TabletControl.decode(reader, reader.uint32())); - break; - case 7: - message.is_master_serving = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Shard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Shard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Shard} Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Shard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Shard message. - * @function verify - * @memberof topodata.Shard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Shard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.master_alias != null && message.hasOwnProperty("master_alias")) { - var error = $root.topodata.TabletAlias.verify(message.master_alias); - if (error) - return "master_alias." + error; - } - if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) { - var error = $root.vttime.Time.verify(message.master_term_start_time); - if (error) - return "master_term_start_time." + error; - } - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.served_types != null && message.hasOwnProperty("served_types")) { - if (!Array.isArray(message.served_types)) - return "served_types: array expected"; - for (var i = 0; i < message.served_types.length; ++i) { - var error = $root.topodata.Shard.ServedType.verify(message.served_types[i]); - if (error) - return "served_types." + error; - } - } - if (message.source_shards != null && message.hasOwnProperty("source_shards")) { - if (!Array.isArray(message.source_shards)) - return "source_shards: array expected"; - for (var i = 0; i < message.source_shards.length; ++i) { - var error = $root.topodata.Shard.SourceShard.verify(message.source_shards[i]); - if (error) - return "source_shards." + error; - } - } - if (message.tablet_controls != null && message.hasOwnProperty("tablet_controls")) { - if (!Array.isArray(message.tablet_controls)) - return "tablet_controls: array expected"; - for (var i = 0; i < message.tablet_controls.length; ++i) { - var error = $root.topodata.Shard.TabletControl.verify(message.tablet_controls[i]); - if (error) - return "tablet_controls." + error; - } - } - if (message.is_master_serving != null && message.hasOwnProperty("is_master_serving")) - if (typeof message.is_master_serving !== "boolean") - return "is_master_serving: boolean expected"; - return null; - }; - - /** - * Creates a Shard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Shard - * @static - * @param {Object.} object Plain object - * @returns {topodata.Shard} Shard - */ - Shard.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard) - return object; - var message = new $root.topodata.Shard(); - if (object.master_alias != null) { - if (typeof object.master_alias !== "object") - throw TypeError(".topodata.Shard.master_alias: object expected"); - message.master_alias = $root.topodata.TabletAlias.fromObject(object.master_alias); - } - if (object.master_term_start_time != null) { - if (typeof object.master_term_start_time !== "object") - throw TypeError(".topodata.Shard.master_term_start_time: object expected"); - message.master_term_start_time = $root.vttime.Time.fromObject(object.master_term_start_time); - } - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".topodata.Shard.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - if (object.served_types) { - if (!Array.isArray(object.served_types)) - throw TypeError(".topodata.Shard.served_types: array expected"); - message.served_types = []; - for (var i = 0; i < object.served_types.length; ++i) { - if (typeof object.served_types[i] !== "object") - throw TypeError(".topodata.Shard.served_types: object expected"); - message.served_types[i] = $root.topodata.Shard.ServedType.fromObject(object.served_types[i]); - } - } - if (object.source_shards) { - if (!Array.isArray(object.source_shards)) - throw TypeError(".topodata.Shard.source_shards: array expected"); - message.source_shards = []; - for (var i = 0; i < object.source_shards.length; ++i) { - if (typeof object.source_shards[i] !== "object") - throw TypeError(".topodata.Shard.source_shards: object expected"); - message.source_shards[i] = $root.topodata.Shard.SourceShard.fromObject(object.source_shards[i]); - } - } - if (object.tablet_controls) { - if (!Array.isArray(object.tablet_controls)) - throw TypeError(".topodata.Shard.tablet_controls: array expected"); - message.tablet_controls = []; - for (var i = 0; i < object.tablet_controls.length; ++i) { - if (typeof object.tablet_controls[i] !== "object") - throw TypeError(".topodata.Shard.tablet_controls: object expected"); - message.tablet_controls[i] = $root.topodata.Shard.TabletControl.fromObject(object.tablet_controls[i]); - } - } - if (object.is_master_serving != null) - message.is_master_serving = Boolean(object.is_master_serving); - return message; - }; - - /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Shard - * @static - * @param {topodata.Shard} message Shard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Shard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.served_types = []; - object.source_shards = []; - object.tablet_controls = []; - } - if (options.defaults) { - object.master_alias = null; - object.key_range = null; - object.is_master_serving = false; - object.master_term_start_time = null; - } - if (message.master_alias != null && message.hasOwnProperty("master_alias")) - object.master_alias = $root.topodata.TabletAlias.toObject(message.master_alias, options); - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.served_types && message.served_types.length) { - object.served_types = []; - for (var j = 0; j < message.served_types.length; ++j) - object.served_types[j] = $root.topodata.Shard.ServedType.toObject(message.served_types[j], options); - } - if (message.source_shards && message.source_shards.length) { - object.source_shards = []; - for (var j = 0; j < message.source_shards.length; ++j) - object.source_shards[j] = $root.topodata.Shard.SourceShard.toObject(message.source_shards[j], options); - } - if (message.tablet_controls && message.tablet_controls.length) { - object.tablet_controls = []; - for (var j = 0; j < message.tablet_controls.length; ++j) - object.tablet_controls[j] = $root.topodata.Shard.TabletControl.toObject(message.tablet_controls[j], options); - } - if (message.is_master_serving != null && message.hasOwnProperty("is_master_serving")) - object.is_master_serving = message.is_master_serving; - if (message.master_term_start_time != null && message.hasOwnProperty("master_term_start_time")) - object.master_term_start_time = $root.vttime.Time.toObject(message.master_term_start_time, options); - return object; - }; - - /** - * Converts this Shard to JSON. - * @function toJSON - * @memberof topodata.Shard - * @instance - * @returns {Object.} JSON object - */ - Shard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Shard.ServedType = (function() { - - /** - * Properties of a ServedType. - * @memberof topodata.Shard - * @interface IServedType - * @property {topodata.TabletType|null} [tablet_type] ServedType tablet_type - * @property {Array.|null} [cells] ServedType cells - */ - - /** - * Constructs a new ServedType. - * @memberof topodata.Shard - * @classdesc Represents a ServedType. - * @implements IServedType - * @constructor - * @param {topodata.Shard.IServedType=} [properties] Properties to set - */ - function ServedType(properties) { - this.cells = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServedType tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.Shard.ServedType - * @instance - */ - ServedType.prototype.tablet_type = 0; - - /** - * ServedType cells. - * @member {Array.} cells - * @memberof topodata.Shard.ServedType - * @instance - */ - ServedType.prototype.cells = $util.emptyArray; - - /** - * Creates a new ServedType instance using the specified properties. - * @function create - * @memberof topodata.Shard.ServedType - * @static - * @param {topodata.Shard.IServedType=} [properties] Properties to set - * @returns {topodata.Shard.ServedType} ServedType instance - */ - ServedType.create = function create(properties) { - return new ServedType(properties); - }; - - /** - * Encodes the specified ServedType message. Does not implicitly {@link topodata.Shard.ServedType.verify|verify} messages. - * @function encode - * @memberof topodata.Shard.ServedType - * @static - * @param {topodata.Shard.IServedType} message ServedType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServedType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); - return writer; - }; - - /** - * Encodes the specified ServedType message, length delimited. Does not implicitly {@link topodata.Shard.ServedType.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Shard.ServedType - * @static - * @param {topodata.Shard.IServedType} message ServedType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServedType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServedType message from the specified reader or buffer. - * @function decode - * @memberof topodata.Shard.ServedType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Shard.ServedType} ServedType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServedType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard.ServedType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServedType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Shard.ServedType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Shard.ServedType} ServedType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServedType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServedType message. - * @function verify - * @memberof topodata.Shard.ServedType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServedType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - return null; - }; - - /** - * Creates a ServedType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Shard.ServedType - * @static - * @param {Object.} object Plain object - * @returns {topodata.Shard.ServedType} ServedType - */ - ServedType.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard.ServedType) - return object; - var message = new $root.topodata.Shard.ServedType(); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".topodata.Shard.ServedType.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - return message; - }; - - /** - * Creates a plain object from a ServedType message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Shard.ServedType - * @static - * @param {topodata.Shard.ServedType} message ServedType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServedType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - return object; - }; - - /** - * Converts this ServedType to JSON. - * @function toJSON - * @memberof topodata.Shard.ServedType - * @instance - * @returns {Object.} JSON object - */ - ServedType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServedType; - })(); - - Shard.SourceShard = (function() { - - /** - * Properties of a SourceShard. - * @memberof topodata.Shard - * @interface ISourceShard - * @property {number|null} [uid] SourceShard uid - * @property {string|null} [keyspace] SourceShard keyspace - * @property {string|null} [shard] SourceShard shard - * @property {topodata.IKeyRange|null} [key_range] SourceShard key_range - * @property {Array.|null} [tables] SourceShard tables - */ - - /** - * Constructs a new SourceShard. - * @memberof topodata.Shard - * @classdesc Represents a SourceShard. - * @implements ISourceShard - * @constructor - * @param {topodata.Shard.ISourceShard=} [properties] Properties to set - */ - function SourceShard(properties) { - this.tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceShard uid. - * @member {number} uid - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.uid = 0; - - /** - * SourceShard keyspace. - * @member {string} keyspace - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.keyspace = ""; - - /** - * SourceShard shard. - * @member {string} shard - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.shard = ""; - - /** - * SourceShard key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.key_range = null; - - /** - * SourceShard tables. - * @member {Array.} tables - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.tables = $util.emptyArray; - - /** - * Creates a new SourceShard instance using the specified properties. - * @function create - * @memberof topodata.Shard.SourceShard - * @static - * @param {topodata.Shard.ISourceShard=} [properties] Properties to set - * @returns {topodata.Shard.SourceShard} SourceShard instance - */ - SourceShard.create = function create(properties) { - return new SourceShard(properties); - }; - - /** - * Encodes the specified SourceShard message. Does not implicitly {@link topodata.Shard.SourceShard.verify|verify} messages. - * @function encode - * @memberof topodata.Shard.SourceShard - * @static - * @param {topodata.Shard.ISourceShard} message SourceShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceShard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.uid); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shard); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.tables[i]); - return writer; - }; - - /** - * Encodes the specified SourceShard message, length delimited. Does not implicitly {@link topodata.Shard.SourceShard.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Shard.SourceShard - * @static - * @param {topodata.Shard.ISourceShard} message SourceShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceShard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceShard message from the specified reader or buffer. - * @function decode - * @memberof topodata.Shard.SourceShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Shard.SourceShard} SourceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceShard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard.SourceShard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.uid = reader.uint32(); - break; - case 2: - message.keyspace = reader.string(); - break; - case 3: - message.shard = reader.string(); - break; - case 4: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceShard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Shard.SourceShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Shard.SourceShard} SourceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceShard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceShard message. - * @function verify - * @memberof topodata.Shard.SourceShard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceShard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isInteger(message.uid)) - return "uid: integer expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - return null; - }; - - /** - * Creates a SourceShard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Shard.SourceShard - * @static - * @param {Object.} object Plain object - * @returns {topodata.Shard.SourceShard} SourceShard - */ - SourceShard.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard.SourceShard) - return object; - var message = new $root.topodata.Shard.SourceShard(); - if (object.uid != null) - message.uid = object.uid >>> 0; - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".topodata.Shard.SourceShard.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".topodata.Shard.SourceShard.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - return message; - }; - - /** - * Creates a plain object from a SourceShard message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Shard.SourceShard - * @static - * @param {topodata.Shard.SourceShard} message SourceShard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceShard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tables = []; - if (options.defaults) { - object.uid = 0; - object.keyspace = ""; - object.shard = ""; - object.key_range = null; - } - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - return object; - }; - - /** - * Converts this SourceShard to JSON. - * @function toJSON - * @memberof topodata.Shard.SourceShard - * @instance - * @returns {Object.} JSON object - */ - SourceShard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SourceShard; - })(); - - Shard.TabletControl = (function() { - - /** - * Properties of a TabletControl. - * @memberof topodata.Shard - * @interface ITabletControl - * @property {topodata.TabletType|null} [tablet_type] TabletControl tablet_type - * @property {Array.|null} [cells] TabletControl cells - * @property {Array.|null} [blacklisted_tables] TabletControl blacklisted_tables - * @property {boolean|null} [frozen] TabletControl frozen - */ - - /** - * Constructs a new TabletControl. - * @memberof topodata.Shard - * @classdesc Represents a TabletControl. - * @implements ITabletControl - * @constructor - * @param {topodata.Shard.ITabletControl=} [properties] Properties to set - */ - function TabletControl(properties) { - this.cells = []; - this.blacklisted_tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TabletControl tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.tablet_type = 0; - - /** - * TabletControl cells. - * @member {Array.} cells - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.cells = $util.emptyArray; - - /** - * TabletControl blacklisted_tables. - * @member {Array.} blacklisted_tables - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.blacklisted_tables = $util.emptyArray; - - /** - * TabletControl frozen. - * @member {boolean} frozen - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.frozen = false; - - /** - * Creates a new TabletControl instance using the specified properties. - * @function create - * @memberof topodata.Shard.TabletControl - * @static - * @param {topodata.Shard.ITabletControl=} [properties] Properties to set - * @returns {topodata.Shard.TabletControl} TabletControl instance - */ - TabletControl.create = function create(properties) { - return new TabletControl(properties); - }; - - /** - * Encodes the specified TabletControl message. Does not implicitly {@link topodata.Shard.TabletControl.verify|verify} messages. - * @function encode - * @memberof topodata.Shard.TabletControl - * @static - * @param {topodata.Shard.ITabletControl} message TabletControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletControl.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); - if (message.blacklisted_tables != null && message.blacklisted_tables.length) - for (var i = 0; i < message.blacklisted_tables.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.blacklisted_tables[i]); - if (message.frozen != null && Object.hasOwnProperty.call(message, "frozen")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.frozen); - return writer; - }; - - /** - * Encodes the specified TabletControl message, length delimited. Does not implicitly {@link topodata.Shard.TabletControl.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Shard.TabletControl - * @static - * @param {topodata.Shard.ITabletControl} message TabletControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletControl.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TabletControl message from the specified reader or buffer. - * @function decode - * @memberof topodata.Shard.TabletControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Shard.TabletControl} TabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletControl.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard.TabletControl(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - case 4: - if (!(message.blacklisted_tables && message.blacklisted_tables.length)) - message.blacklisted_tables = []; - message.blacklisted_tables.push(reader.string()); - break; - case 5: - message.frozen = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TabletControl message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Shard.TabletControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Shard.TabletControl} TabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TabletControl message. - * @function verify - * @memberof topodata.Shard.TabletControl - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TabletControl.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - if (message.blacklisted_tables != null && message.hasOwnProperty("blacklisted_tables")) { - if (!Array.isArray(message.blacklisted_tables)) - return "blacklisted_tables: array expected"; - for (var i = 0; i < message.blacklisted_tables.length; ++i) - if (!$util.isString(message.blacklisted_tables[i])) - return "blacklisted_tables: string[] expected"; - } - if (message.frozen != null && message.hasOwnProperty("frozen")) - if (typeof message.frozen !== "boolean") - return "frozen: boolean expected"; - return null; - }; - - /** - * Creates a TabletControl message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Shard.TabletControl - * @static - * @param {Object.} object Plain object - * @returns {topodata.Shard.TabletControl} TabletControl - */ - TabletControl.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard.TabletControl) - return object; - var message = new $root.topodata.Shard.TabletControl(); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".topodata.Shard.TabletControl.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - if (object.blacklisted_tables) { - if (!Array.isArray(object.blacklisted_tables)) - throw TypeError(".topodata.Shard.TabletControl.blacklisted_tables: array expected"); - message.blacklisted_tables = []; - for (var i = 0; i < object.blacklisted_tables.length; ++i) - message.blacklisted_tables[i] = String(object.blacklisted_tables[i]); - } - if (object.frozen != null) - message.frozen = Boolean(object.frozen); - return message; - }; - - /** - * Creates a plain object from a TabletControl message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Shard.TabletControl - * @static - * @param {topodata.Shard.TabletControl} message TabletControl - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TabletControl.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cells = []; - object.blacklisted_tables = []; - } - if (options.defaults) { - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.frozen = false; - } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.blacklisted_tables && message.blacklisted_tables.length) { - object.blacklisted_tables = []; - for (var j = 0; j < message.blacklisted_tables.length; ++j) - object.blacklisted_tables[j] = message.blacklisted_tables[j]; - } - if (message.frozen != null && message.hasOwnProperty("frozen")) - object.frozen = message.frozen; - return object; - }; - - /** - * Converts this TabletControl to JSON. - * @function toJSON - * @memberof topodata.Shard.TabletControl - * @instance - * @returns {Object.} JSON object - */ - TabletControl.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TabletControl; - })(); - - return Shard; - })(); - - topodata.Keyspace = (function() { - - /** - * Properties of a Keyspace. - * @memberof topodata - * @interface IKeyspace - * @property {string|null} [sharding_column_name] Keyspace sharding_column_name - * @property {topodata.KeyspaceIdType|null} [sharding_column_type] Keyspace sharding_column_type - * @property {Array.|null} [served_froms] Keyspace served_froms - * @property {topodata.KeyspaceType|null} [keyspace_type] Keyspace keyspace_type - * @property {string|null} [base_keyspace] Keyspace base_keyspace - * @property {vttime.ITime|null} [snapshot_time] Keyspace snapshot_time - */ - - /** - * Constructs a new Keyspace. - * @memberof topodata - * @classdesc Represents a Keyspace. - * @implements IKeyspace - * @constructor - * @param {topodata.IKeyspace=} [properties] Properties to set - */ - function Keyspace(properties) { - this.served_froms = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Keyspace sharding_column_name. - * @member {string} sharding_column_name - * @memberof topodata.Keyspace - * @instance - */ - Keyspace.prototype.sharding_column_name = ""; - - /** - * Keyspace sharding_column_type. - * @member {topodata.KeyspaceIdType} sharding_column_type - * @memberof topodata.Keyspace - * @instance - */ - Keyspace.prototype.sharding_column_type = 0; - - /** - * Keyspace served_froms. - * @member {Array.} served_froms - * @memberof topodata.Keyspace - * @instance - */ - Keyspace.prototype.served_froms = $util.emptyArray; - - /** - * Keyspace keyspace_type. - * @member {topodata.KeyspaceType} keyspace_type - * @memberof topodata.Keyspace - * @instance - */ - Keyspace.prototype.keyspace_type = 0; - - /** - * Keyspace base_keyspace. - * @member {string} base_keyspace - * @memberof topodata.Keyspace - * @instance - */ - Keyspace.prototype.base_keyspace = ""; - - /** - * Keyspace snapshot_time. - * @member {vttime.ITime|null|undefined} snapshot_time - * @memberof topodata.Keyspace - * @instance - */ - Keyspace.prototype.snapshot_time = null; - - /** - * Creates a new Keyspace instance using the specified properties. - * @function create - * @memberof topodata.Keyspace - * @static - * @param {topodata.IKeyspace=} [properties] Properties to set - * @returns {topodata.Keyspace} Keyspace instance - */ - Keyspace.create = function create(properties) { - return new Keyspace(properties); - }; - - /** - * Encodes the specified Keyspace message. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. - * @function encode - * @memberof topodata.Keyspace - * @static - * @param {topodata.IKeyspace} message Keyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Keyspace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, "sharding_column_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sharding_column_name); - if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, "sharding_column_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sharding_column_type); - if (message.served_froms != null && message.served_froms.length) - for (var i = 0; i < message.served_froms.length; ++i) - $root.topodata.Keyspace.ServedFrom.encode(message.served_froms[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.keyspace_type != null && Object.hasOwnProperty.call(message, "keyspace_type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.keyspace_type); - if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.base_keyspace); - if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) - $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Keyspace - * @static - * @param {topodata.IKeyspace} message Keyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Keyspace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Keyspace message from the specified reader or buffer. - * @function decode - * @memberof topodata.Keyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Keyspace} Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Keyspace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Keyspace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sharding_column_name = reader.string(); - break; - case 2: - message.sharding_column_type = reader.int32(); - break; - case 4: - if (!(message.served_froms && message.served_froms.length)) - message.served_froms = []; - message.served_froms.push($root.topodata.Keyspace.ServedFrom.decode(reader, reader.uint32())); - break; - case 5: - message.keyspace_type = reader.int32(); - break; - case 6: - message.base_keyspace = reader.string(); - break; - case 7: - message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Keyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Keyspace} Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Keyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Keyspace message. - * @function verify - * @memberof topodata.Keyspace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Keyspace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) - if (!$util.isString(message.sharding_column_name)) - return "sharding_column_name: string expected"; - if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) - switch (message.sharding_column_type) { - default: - return "sharding_column_type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.served_froms != null && message.hasOwnProperty("served_froms")) { - if (!Array.isArray(message.served_froms)) - return "served_froms: array expected"; - for (var i = 0; i < message.served_froms.length; ++i) { - var error = $root.topodata.Keyspace.ServedFrom.verify(message.served_froms[i]); - if (error) - return "served_froms." + error; - } - } - if (message.keyspace_type != null && message.hasOwnProperty("keyspace_type")) - switch (message.keyspace_type) { - default: - return "keyspace_type: enum value expected"; - case 0: - case 1: - break; - } - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - if (!$util.isString(message.base_keyspace)) - return "base_keyspace: string expected"; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { - var error = $root.vttime.Time.verify(message.snapshot_time); - if (error) - return "snapshot_time." + error; - } - return null; - }; - - /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Keyspace - * @static - * @param {Object.} object Plain object - * @returns {topodata.Keyspace} Keyspace - */ - Keyspace.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Keyspace) - return object; - var message = new $root.topodata.Keyspace(); - if (object.sharding_column_name != null) - message.sharding_column_name = String(object.sharding_column_name); - switch (object.sharding_column_type) { - case "UNSET": - case 0: - message.sharding_column_type = 0; - break; - case "UINT64": - case 1: - message.sharding_column_type = 1; - break; - case "BYTES": - case 2: - message.sharding_column_type = 2; - break; - } - if (object.served_froms) { - if (!Array.isArray(object.served_froms)) - throw TypeError(".topodata.Keyspace.served_froms: array expected"); - message.served_froms = []; - for (var i = 0; i < object.served_froms.length; ++i) { - if (typeof object.served_froms[i] !== "object") - throw TypeError(".topodata.Keyspace.served_froms: object expected"); - message.served_froms[i] = $root.topodata.Keyspace.ServedFrom.fromObject(object.served_froms[i]); - } - } - switch (object.keyspace_type) { - case "NORMAL": - case 0: - message.keyspace_type = 0; - break; - case "SNAPSHOT": - case 1: - message.keyspace_type = 1; - break; - } - if (object.base_keyspace != null) - message.base_keyspace = String(object.base_keyspace); - if (object.snapshot_time != null) { - if (typeof object.snapshot_time !== "object") - throw TypeError(".topodata.Keyspace.snapshot_time: object expected"); - message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); - } - return message; - }; - - /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Keyspace - * @static - * @param {topodata.Keyspace} message Keyspace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Keyspace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.served_froms = []; - if (options.defaults) { - object.sharding_column_name = ""; - object.sharding_column_type = options.enums === String ? "UNSET" : 0; - object.keyspace_type = options.enums === String ? "NORMAL" : 0; - object.base_keyspace = ""; - object.snapshot_time = null; - } - if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) - object.sharding_column_name = message.sharding_column_name; - if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) - object.sharding_column_type = options.enums === String ? $root.topodata.KeyspaceIdType[message.sharding_column_type] : message.sharding_column_type; - if (message.served_froms && message.served_froms.length) { - object.served_froms = []; - for (var j = 0; j < message.served_froms.length; ++j) - object.served_froms[j] = $root.topodata.Keyspace.ServedFrom.toObject(message.served_froms[j], options); - } - if (message.keyspace_type != null && message.hasOwnProperty("keyspace_type")) - object.keyspace_type = options.enums === String ? $root.topodata.KeyspaceType[message.keyspace_type] : message.keyspace_type; - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - object.base_keyspace = message.base_keyspace; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) - object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); - return object; - }; - - /** - * Converts this Keyspace to JSON. - * @function toJSON - * @memberof topodata.Keyspace - * @instance - * @returns {Object.} JSON object - */ - Keyspace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Keyspace.ServedFrom = (function() { - - /** - * Properties of a ServedFrom. - * @memberof topodata.Keyspace - * @interface IServedFrom - * @property {topodata.TabletType|null} [tablet_type] ServedFrom tablet_type - * @property {Array.|null} [cells] ServedFrom cells - * @property {string|null} [keyspace] ServedFrom keyspace - */ - - /** - * Constructs a new ServedFrom. - * @memberof topodata.Keyspace - * @classdesc Represents a ServedFrom. - * @implements IServedFrom - * @constructor - * @param {topodata.Keyspace.IServedFrom=} [properties] Properties to set - */ - function ServedFrom(properties) { - this.cells = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServedFrom tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.Keyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.tablet_type = 0; - - /** - * ServedFrom cells. - * @member {Array.} cells - * @memberof topodata.Keyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.cells = $util.emptyArray; - - /** - * ServedFrom keyspace. - * @member {string} keyspace - * @memberof topodata.Keyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.keyspace = ""; - - /** - * Creates a new ServedFrom instance using the specified properties. - * @function create - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {topodata.Keyspace.IServedFrom=} [properties] Properties to set - * @returns {topodata.Keyspace.ServedFrom} ServedFrom instance - */ - ServedFrom.create = function create(properties) { - return new ServedFrom(properties); - }; - - /** - * Encodes the specified ServedFrom message. Does not implicitly {@link topodata.Keyspace.ServedFrom.verify|verify} messages. - * @function encode - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {topodata.Keyspace.IServedFrom} message ServedFrom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServedFrom.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified ServedFrom message, length delimited. Does not implicitly {@link topodata.Keyspace.ServedFrom.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {topodata.Keyspace.IServedFrom} message ServedFrom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServedFrom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServedFrom message from the specified reader or buffer. - * @function decode - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.Keyspace.ServedFrom} ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServedFrom.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Keyspace.ServedFrom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - case 3: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServedFrom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Keyspace.ServedFrom} ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServedFrom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServedFrom message. - * @function verify - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServedFrom.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a ServedFrom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {Object.} object Plain object - * @returns {topodata.Keyspace.ServedFrom} ServedFrom - */ - ServedFrom.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Keyspace.ServedFrom) - return object; - var message = new $root.topodata.Keyspace.ServedFrom(); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".topodata.Keyspace.ServedFrom.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a ServedFrom message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.Keyspace.ServedFrom - * @static - * @param {topodata.Keyspace.ServedFrom} message ServedFrom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServedFrom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) { - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.keyspace = ""; - } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this ServedFrom to JSON. - * @function toJSON - * @memberof topodata.Keyspace.ServedFrom - * @instance - * @returns {Object.} JSON object - */ - ServedFrom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServedFrom; - })(); - - return Keyspace; - })(); - - topodata.ShardReplication = (function() { - - /** - * Properties of a ShardReplication. - * @memberof topodata - * @interface IShardReplication - * @property {Array.|null} [nodes] ShardReplication nodes - */ - - /** - * Constructs a new ShardReplication. - * @memberof topodata - * @classdesc Represents a ShardReplication. - * @implements IShardReplication - * @constructor - * @param {topodata.IShardReplication=} [properties] Properties to set - */ - function ShardReplication(properties) { - this.nodes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardReplication nodes. - * @member {Array.} nodes - * @memberof topodata.ShardReplication - * @instance - */ - ShardReplication.prototype.nodes = $util.emptyArray; - - /** - * Creates a new ShardReplication instance using the specified properties. - * @function create - * @memberof topodata.ShardReplication - * @static - * @param {topodata.IShardReplication=} [properties] Properties to set - * @returns {topodata.ShardReplication} ShardReplication instance - */ - ShardReplication.create = function create(properties) { - return new ShardReplication(properties); - }; - - /** - * Encodes the specified ShardReplication message. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. - * @function encode - * @memberof topodata.ShardReplication - * @static - * @param {topodata.IShardReplication} message ShardReplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReplication.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nodes != null && message.nodes.length) - for (var i = 0; i < message.nodes.length; ++i) - $root.topodata.ShardReplication.Node.encode(message.nodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ShardReplication message, length delimited. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.ShardReplication - * @static - * @param {topodata.IShardReplication} message ShardReplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReplication.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardReplication message from the specified reader or buffer. - * @function decode - * @memberof topodata.ShardReplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardReplication} ShardReplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReplication.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardReplication(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.nodes && message.nodes.length)) - message.nodes = []; - message.nodes.push($root.topodata.ShardReplication.Node.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardReplication message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.ShardReplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardReplication} ShardReplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardReplication message. - * @function verify - * @memberof topodata.ShardReplication - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardReplication.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nodes != null && message.hasOwnProperty("nodes")) { - if (!Array.isArray(message.nodes)) - return "nodes: array expected"; - for (var i = 0; i < message.nodes.length; ++i) { - var error = $root.topodata.ShardReplication.Node.verify(message.nodes[i]); - if (error) - return "nodes." + error; - } - } - return null; - }; - - /** - * Creates a ShardReplication message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.ShardReplication - * @static - * @param {Object.} object Plain object - * @returns {topodata.ShardReplication} ShardReplication - */ - ShardReplication.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardReplication) - return object; - var message = new $root.topodata.ShardReplication(); - if (object.nodes) { - if (!Array.isArray(object.nodes)) - throw TypeError(".topodata.ShardReplication.nodes: array expected"); - message.nodes = []; - for (var i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== "object") - throw TypeError(".topodata.ShardReplication.nodes: object expected"); - message.nodes[i] = $root.topodata.ShardReplication.Node.fromObject(object.nodes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ShardReplication message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.ShardReplication - * @static - * @param {topodata.ShardReplication} message ShardReplication - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardReplication.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodes = []; - if (message.nodes && message.nodes.length) { - object.nodes = []; - for (var j = 0; j < message.nodes.length; ++j) - object.nodes[j] = $root.topodata.ShardReplication.Node.toObject(message.nodes[j], options); - } - return object; - }; - - /** - * Converts this ShardReplication to JSON. - * @function toJSON - * @memberof topodata.ShardReplication - * @instance - * @returns {Object.} JSON object - */ - ShardReplication.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - ShardReplication.Node = (function() { - - /** - * Properties of a Node. - * @memberof topodata.ShardReplication - * @interface INode - * @property {topodata.ITabletAlias|null} [tablet_alias] Node tablet_alias - */ - - /** - * Constructs a new Node. - * @memberof topodata.ShardReplication - * @classdesc Represents a Node. - * @implements INode - * @constructor - * @param {topodata.ShardReplication.INode=} [properties] Properties to set - */ - function Node(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Node tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof topodata.ShardReplication.Node - * @instance - */ - Node.prototype.tablet_alias = null; - - /** - * Creates a new Node instance using the specified properties. - * @function create - * @memberof topodata.ShardReplication.Node - * @static - * @param {topodata.ShardReplication.INode=} [properties] Properties to set - * @returns {topodata.ShardReplication.Node} Node instance - */ - Node.create = function create(properties) { - return new Node(properties); - }; - - /** - * Encodes the specified Node message. Does not implicitly {@link topodata.ShardReplication.Node.verify|verify} messages. - * @function encode - * @memberof topodata.ShardReplication.Node - * @static - * @param {topodata.ShardReplication.INode} message Node message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Node.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Node message, length delimited. Does not implicitly {@link topodata.ShardReplication.Node.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.ShardReplication.Node - * @static - * @param {topodata.ShardReplication.INode} message Node message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Node.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Node message from the specified reader or buffer. - * @function decode - * @memberof topodata.ShardReplication.Node - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardReplication.Node} Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Node.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardReplication.Node(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Node message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.ShardReplication.Node - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardReplication.Node} Node - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Node.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Node message. - * @function verify - * @memberof topodata.ShardReplication.Node - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Node.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a Node message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.ShardReplication.Node - * @static - * @param {Object.} object Plain object - * @returns {topodata.ShardReplication.Node} Node - */ - Node.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardReplication.Node) - return object; - var message = new $root.topodata.ShardReplication.Node(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".topodata.ShardReplication.Node.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a Node message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.ShardReplication.Node - * @static - * @param {topodata.ShardReplication.Node} message Node - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Node.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this Node to JSON. - * @function toJSON - * @memberof topodata.ShardReplication.Node - * @instance - * @returns {Object.} JSON object - */ - Node.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Node; - })(); - - return ShardReplication; - })(); - - topodata.ShardReference = (function() { - - /** - * Properties of a ShardReference. - * @memberof topodata - * @interface IShardReference - * @property {string|null} [name] ShardReference name - * @property {topodata.IKeyRange|null} [key_range] ShardReference key_range - */ - - /** - * Constructs a new ShardReference. - * @memberof topodata - * @classdesc Represents a ShardReference. - * @implements IShardReference - * @constructor - * @param {topodata.IShardReference=} [properties] Properties to set - */ - function ShardReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardReference name. - * @member {string} name - * @memberof topodata.ShardReference - * @instance - */ - ShardReference.prototype.name = ""; - - /** - * ShardReference key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.ShardReference - * @instance - */ - ShardReference.prototype.key_range = null; - - /** - * Creates a new ShardReference instance using the specified properties. - * @function create - * @memberof topodata.ShardReference - * @static - * @param {topodata.IShardReference=} [properties] Properties to set - * @returns {topodata.ShardReference} ShardReference instance - */ - ShardReference.create = function create(properties) { - return new ShardReference(properties); - }; - - /** - * Encodes the specified ShardReference message. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. - * @function encode - * @memberof topodata.ShardReference - * @static - * @param {topodata.IShardReference} message ShardReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ShardReference message, length delimited. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.ShardReference - * @static - * @param {topodata.IShardReference} message ShardReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardReference message from the specified reader or buffer. - * @function decode - * @memberof topodata.ShardReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardReference} ShardReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.ShardReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardReference} ShardReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardReference message. - * @function verify - * @memberof topodata.ShardReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - return null; - }; - - /** - * Creates a ShardReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.ShardReference - * @static - * @param {Object.} object Plain object - * @returns {topodata.ShardReference} ShardReference - */ - ShardReference.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardReference) - return object; - var message = new $root.topodata.ShardReference(); - if (object.name != null) - message.name = String(object.name); - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".topodata.ShardReference.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - return message; - }; - - /** - * Creates a plain object from a ShardReference message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.ShardReference - * @static - * @param {topodata.ShardReference} message ShardReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.key_range = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - return object; - }; - - /** - * Converts this ShardReference to JSON. - * @function toJSON - * @memberof topodata.ShardReference - * @instance - * @returns {Object.} JSON object - */ - ShardReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ShardReference; - })(); - - topodata.ShardTabletControl = (function() { - - /** - * Properties of a ShardTabletControl. - * @memberof topodata - * @interface IShardTabletControl - * @property {string|null} [name] ShardTabletControl name - * @property {topodata.IKeyRange|null} [key_range] ShardTabletControl key_range - * @property {boolean|null} [query_service_disabled] ShardTabletControl query_service_disabled - */ - - /** - * Constructs a new ShardTabletControl. - * @memberof topodata - * @classdesc Represents a ShardTabletControl. - * @implements IShardTabletControl - * @constructor - * @param {topodata.IShardTabletControl=} [properties] Properties to set - */ - function ShardTabletControl(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardTabletControl name. - * @member {string} name - * @memberof topodata.ShardTabletControl - * @instance - */ - ShardTabletControl.prototype.name = ""; - - /** - * ShardTabletControl key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.ShardTabletControl - * @instance - */ - ShardTabletControl.prototype.key_range = null; - - /** - * ShardTabletControl query_service_disabled. - * @member {boolean} query_service_disabled - * @memberof topodata.ShardTabletControl - * @instance - */ - ShardTabletControl.prototype.query_service_disabled = false; - - /** - * Creates a new ShardTabletControl instance using the specified properties. - * @function create - * @memberof topodata.ShardTabletControl - * @static - * @param {topodata.IShardTabletControl=} [properties] Properties to set - * @returns {topodata.ShardTabletControl} ShardTabletControl instance - */ - ShardTabletControl.create = function create(properties) { - return new ShardTabletControl(properties); - }; - - /** - * Encodes the specified ShardTabletControl message. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. - * @function encode - * @memberof topodata.ShardTabletControl - * @static - * @param {topodata.IShardTabletControl} message ShardTabletControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardTabletControl.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.query_service_disabled != null && Object.hasOwnProperty.call(message, "query_service_disabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.query_service_disabled); - return writer; - }; - - /** - * Encodes the specified ShardTabletControl message, length delimited. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.ShardTabletControl - * @static - * @param {topodata.IShardTabletControl} message ShardTabletControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardTabletControl.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardTabletControl message from the specified reader or buffer. - * @function decode - * @memberof topodata.ShardTabletControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardTabletControl} ShardTabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardTabletControl.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardTabletControl(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 3: - message.query_service_disabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardTabletControl message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.ShardTabletControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardTabletControl} ShardTabletControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardTabletControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardTabletControl message. - * @function verify - * @memberof topodata.ShardTabletControl - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardTabletControl.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.query_service_disabled != null && message.hasOwnProperty("query_service_disabled")) - if (typeof message.query_service_disabled !== "boolean") - return "query_service_disabled: boolean expected"; - return null; - }; - - /** - * Creates a ShardTabletControl message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.ShardTabletControl - * @static - * @param {Object.} object Plain object - * @returns {topodata.ShardTabletControl} ShardTabletControl - */ - ShardTabletControl.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardTabletControl) - return object; - var message = new $root.topodata.ShardTabletControl(); - if (object.name != null) - message.name = String(object.name); - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".topodata.ShardTabletControl.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - if (object.query_service_disabled != null) - message.query_service_disabled = Boolean(object.query_service_disabled); - return message; - }; - - /** - * Creates a plain object from a ShardTabletControl message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.ShardTabletControl - * @static - * @param {topodata.ShardTabletControl} message ShardTabletControl - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardTabletControl.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.key_range = null; - object.query_service_disabled = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.query_service_disabled != null && message.hasOwnProperty("query_service_disabled")) - object.query_service_disabled = message.query_service_disabled; - return object; - }; - - /** - * Converts this ShardTabletControl to JSON. - * @function toJSON - * @memberof topodata.ShardTabletControl - * @instance - * @returns {Object.} JSON object - */ - ShardTabletControl.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ShardTabletControl; - })(); - - topodata.SrvKeyspace = (function() { - - /** - * Properties of a SrvKeyspace. - * @memberof topodata - * @interface ISrvKeyspace - * @property {Array.|null} [partitions] SrvKeyspace partitions - * @property {string|null} [sharding_column_name] SrvKeyspace sharding_column_name - * @property {topodata.KeyspaceIdType|null} [sharding_column_type] SrvKeyspace sharding_column_type - * @property {Array.|null} [served_from] SrvKeyspace served_from - */ - - /** - * Constructs a new SrvKeyspace. - * @memberof topodata - * @classdesc Represents a SrvKeyspace. - * @implements ISrvKeyspace - * @constructor - * @param {topodata.ISrvKeyspace=} [properties] Properties to set - */ - function SrvKeyspace(properties) { - this.partitions = []; - this.served_from = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SrvKeyspace partitions. - * @member {Array.} partitions - * @memberof topodata.SrvKeyspace - * @instance - */ - SrvKeyspace.prototype.partitions = $util.emptyArray; - - /** - * SrvKeyspace sharding_column_name. - * @member {string} sharding_column_name - * @memberof topodata.SrvKeyspace - * @instance - */ - SrvKeyspace.prototype.sharding_column_name = ""; - - /** - * SrvKeyspace sharding_column_type. - * @member {topodata.KeyspaceIdType} sharding_column_type - * @memberof topodata.SrvKeyspace - * @instance - */ - SrvKeyspace.prototype.sharding_column_type = 0; - - /** - * SrvKeyspace served_from. - * @member {Array.} served_from - * @memberof topodata.SrvKeyspace - * @instance - */ - SrvKeyspace.prototype.served_from = $util.emptyArray; - - /** - * Creates a new SrvKeyspace instance using the specified properties. - * @function create - * @memberof topodata.SrvKeyspace - * @static - * @param {topodata.ISrvKeyspace=} [properties] Properties to set - * @returns {topodata.SrvKeyspace} SrvKeyspace instance - */ - SrvKeyspace.create = function create(properties) { - return new SrvKeyspace(properties); - }; - - /** - * Encodes the specified SrvKeyspace message. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. - * @function encode - * @memberof topodata.SrvKeyspace - * @static - * @param {topodata.ISrvKeyspace} message SrvKeyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SrvKeyspace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partitions != null && message.partitions.length) - for (var i = 0; i < message.partitions.length; ++i) - $root.topodata.SrvKeyspace.KeyspacePartition.encode(message.partitions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, "sharding_column_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sharding_column_name); - if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, "sharding_column_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sharding_column_type); - if (message.served_from != null && message.served_from.length) - for (var i = 0; i < message.served_from.length; ++i) - $root.topodata.SrvKeyspace.ServedFrom.encode(message.served_from[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SrvKeyspace message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.SrvKeyspace - * @static - * @param {topodata.ISrvKeyspace} message SrvKeyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SrvKeyspace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SrvKeyspace message from the specified reader or buffer. - * @function decode - * @memberof topodata.SrvKeyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.SrvKeyspace} SrvKeyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SrvKeyspace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.SrvKeyspace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.partitions && message.partitions.length)) - message.partitions = []; - message.partitions.push($root.topodata.SrvKeyspace.KeyspacePartition.decode(reader, reader.uint32())); - break; - case 2: - message.sharding_column_name = reader.string(); - break; - case 3: - message.sharding_column_type = reader.int32(); - break; - case 4: - if (!(message.served_from && message.served_from.length)) - message.served_from = []; - message.served_from.push($root.topodata.SrvKeyspace.ServedFrom.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SrvKeyspace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.SrvKeyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.SrvKeyspace} SrvKeyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SrvKeyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SrvKeyspace message. - * @function verify - * @memberof topodata.SrvKeyspace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SrvKeyspace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partitions != null && message.hasOwnProperty("partitions")) { - if (!Array.isArray(message.partitions)) - return "partitions: array expected"; - for (var i = 0; i < message.partitions.length; ++i) { - var error = $root.topodata.SrvKeyspace.KeyspacePartition.verify(message.partitions[i]); - if (error) - return "partitions." + error; - } - } - if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) - if (!$util.isString(message.sharding_column_name)) - return "sharding_column_name: string expected"; - if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) - switch (message.sharding_column_type) { - default: - return "sharding_column_type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.served_from != null && message.hasOwnProperty("served_from")) { - if (!Array.isArray(message.served_from)) - return "served_from: array expected"; - for (var i = 0; i < message.served_from.length; ++i) { - var error = $root.topodata.SrvKeyspace.ServedFrom.verify(message.served_from[i]); - if (error) - return "served_from." + error; - } - } - return null; - }; - - /** - * Creates a SrvKeyspace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.SrvKeyspace - * @static - * @param {Object.} object Plain object - * @returns {topodata.SrvKeyspace} SrvKeyspace - */ - SrvKeyspace.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.SrvKeyspace) - return object; - var message = new $root.topodata.SrvKeyspace(); - if (object.partitions) { - if (!Array.isArray(object.partitions)) - throw TypeError(".topodata.SrvKeyspace.partitions: array expected"); - message.partitions = []; - for (var i = 0; i < object.partitions.length; ++i) { - if (typeof object.partitions[i] !== "object") - throw TypeError(".topodata.SrvKeyspace.partitions: object expected"); - message.partitions[i] = $root.topodata.SrvKeyspace.KeyspacePartition.fromObject(object.partitions[i]); - } - } - if (object.sharding_column_name != null) - message.sharding_column_name = String(object.sharding_column_name); - switch (object.sharding_column_type) { - case "UNSET": - case 0: - message.sharding_column_type = 0; - break; - case "UINT64": - case 1: - message.sharding_column_type = 1; - break; - case "BYTES": - case 2: - message.sharding_column_type = 2; - break; - } - if (object.served_from) { - if (!Array.isArray(object.served_from)) - throw TypeError(".topodata.SrvKeyspace.served_from: array expected"); - message.served_from = []; - for (var i = 0; i < object.served_from.length; ++i) { - if (typeof object.served_from[i] !== "object") - throw TypeError(".topodata.SrvKeyspace.served_from: object expected"); - message.served_from[i] = $root.topodata.SrvKeyspace.ServedFrom.fromObject(object.served_from[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SrvKeyspace message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.SrvKeyspace - * @static - * @param {topodata.SrvKeyspace} message SrvKeyspace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SrvKeyspace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.partitions = []; - object.served_from = []; - } - if (options.defaults) { - object.sharding_column_name = ""; - object.sharding_column_type = options.enums === String ? "UNSET" : 0; - } - if (message.partitions && message.partitions.length) { - object.partitions = []; - for (var j = 0; j < message.partitions.length; ++j) - object.partitions[j] = $root.topodata.SrvKeyspace.KeyspacePartition.toObject(message.partitions[j], options); - } - if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) - object.sharding_column_name = message.sharding_column_name; - if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) - object.sharding_column_type = options.enums === String ? $root.topodata.KeyspaceIdType[message.sharding_column_type] : message.sharding_column_type; - if (message.served_from && message.served_from.length) { - object.served_from = []; - for (var j = 0; j < message.served_from.length; ++j) - object.served_from[j] = $root.topodata.SrvKeyspace.ServedFrom.toObject(message.served_from[j], options); - } - return object; - }; - - /** - * Converts this SrvKeyspace to JSON. - * @function toJSON - * @memberof topodata.SrvKeyspace - * @instance - * @returns {Object.} JSON object - */ - SrvKeyspace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - SrvKeyspace.KeyspacePartition = (function() { - - /** - * Properties of a KeyspacePartition. - * @memberof topodata.SrvKeyspace - * @interface IKeyspacePartition - * @property {topodata.TabletType|null} [served_type] KeyspacePartition served_type - * @property {Array.|null} [shard_references] KeyspacePartition shard_references - * @property {Array.|null} [shard_tablet_controls] KeyspacePartition shard_tablet_controls - */ - - /** - * Constructs a new KeyspacePartition. - * @memberof topodata.SrvKeyspace - * @classdesc Represents a KeyspacePartition. - * @implements IKeyspacePartition - * @constructor - * @param {topodata.SrvKeyspace.IKeyspacePartition=} [properties] Properties to set - */ - function KeyspacePartition(properties) { - this.shard_references = []; - this.shard_tablet_controls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KeyspacePartition served_type. - * @member {topodata.TabletType} served_type - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - */ - KeyspacePartition.prototype.served_type = 0; - - /** - * KeyspacePartition shard_references. - * @member {Array.} shard_references - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - */ - KeyspacePartition.prototype.shard_references = $util.emptyArray; - - /** - * KeyspacePartition shard_tablet_controls. - * @member {Array.} shard_tablet_controls - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - */ - KeyspacePartition.prototype.shard_tablet_controls = $util.emptyArray; - - /** - * Creates a new KeyspacePartition instance using the specified properties. - * @function create - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {topodata.SrvKeyspace.IKeyspacePartition=} [properties] Properties to set - * @returns {topodata.SrvKeyspace.KeyspacePartition} KeyspacePartition instance - */ - KeyspacePartition.create = function create(properties) { - return new KeyspacePartition(properties); - }; - - /** - * Encodes the specified KeyspacePartition message. Does not implicitly {@link topodata.SrvKeyspace.KeyspacePartition.verify|verify} messages. - * @function encode - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {topodata.SrvKeyspace.IKeyspacePartition} message KeyspacePartition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyspacePartition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.served_type != null && Object.hasOwnProperty.call(message, "served_type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.served_type); - if (message.shard_references != null && message.shard_references.length) - for (var i = 0; i < message.shard_references.length; ++i) - $root.topodata.ShardReference.encode(message.shard_references[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shard_tablet_controls != null && message.shard_tablet_controls.length) - for (var i = 0; i < message.shard_tablet_controls.length; ++i) - $root.topodata.ShardTabletControl.encode(message.shard_tablet_controls[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified KeyspacePartition message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.KeyspacePartition.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {topodata.SrvKeyspace.IKeyspacePartition} message KeyspacePartition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyspacePartition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KeyspacePartition message from the specified reader or buffer. - * @function decode - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.SrvKeyspace.KeyspacePartition} KeyspacePartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyspacePartition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.SrvKeyspace.KeyspacePartition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.served_type = reader.int32(); - break; - case 2: - if (!(message.shard_references && message.shard_references.length)) - message.shard_references = []; - message.shard_references.push($root.topodata.ShardReference.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.shard_tablet_controls && message.shard_tablet_controls.length)) - message.shard_tablet_controls = []; - message.shard_tablet_controls.push($root.topodata.ShardTabletControl.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KeyspacePartition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.SrvKeyspace.KeyspacePartition} KeyspacePartition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyspacePartition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KeyspacePartition message. - * @function verify - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyspacePartition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.served_type != null && message.hasOwnProperty("served_type")) - switch (message.served_type) { - default: - return "served_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.shard_references != null && message.hasOwnProperty("shard_references")) { - if (!Array.isArray(message.shard_references)) - return "shard_references: array expected"; - for (var i = 0; i < message.shard_references.length; ++i) { - var error = $root.topodata.ShardReference.verify(message.shard_references[i]); - if (error) - return "shard_references." + error; - } - } - if (message.shard_tablet_controls != null && message.hasOwnProperty("shard_tablet_controls")) { - if (!Array.isArray(message.shard_tablet_controls)) - return "shard_tablet_controls: array expected"; - for (var i = 0; i < message.shard_tablet_controls.length; ++i) { - var error = $root.topodata.ShardTabletControl.verify(message.shard_tablet_controls[i]); - if (error) - return "shard_tablet_controls." + error; - } - } - return null; - }; - - /** - * Creates a KeyspacePartition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {Object.} object Plain object - * @returns {topodata.SrvKeyspace.KeyspacePartition} KeyspacePartition - */ - KeyspacePartition.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.SrvKeyspace.KeyspacePartition) - return object; - var message = new $root.topodata.SrvKeyspace.KeyspacePartition(); - switch (object.served_type) { - case "UNKNOWN": - case 0: - message.served_type = 0; - break; - case "MASTER": - case 1: - message.served_type = 1; - break; - case "REPLICA": - case 2: - message.served_type = 2; - break; - case "RDONLY": - case 3: - message.served_type = 3; - break; - case "BATCH": - case 3: - message.served_type = 3; - break; - case "SPARE": - case 4: - message.served_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.served_type = 5; - break; - case "BACKUP": - case 6: - message.served_type = 6; - break; - case "RESTORE": - case 7: - message.served_type = 7; - break; - case "DRAINED": - case 8: - message.served_type = 8; - break; - } - if (object.shard_references) { - if (!Array.isArray(object.shard_references)) - throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_references: array expected"); - message.shard_references = []; - for (var i = 0; i < object.shard_references.length; ++i) { - if (typeof object.shard_references[i] !== "object") - throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_references: object expected"); - message.shard_references[i] = $root.topodata.ShardReference.fromObject(object.shard_references[i]); - } - } - if (object.shard_tablet_controls) { - if (!Array.isArray(object.shard_tablet_controls)) - throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls: array expected"); - message.shard_tablet_controls = []; - for (var i = 0; i < object.shard_tablet_controls.length; ++i) { - if (typeof object.shard_tablet_controls[i] !== "object") - throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls: object expected"); - message.shard_tablet_controls[i] = $root.topodata.ShardTabletControl.fromObject(object.shard_tablet_controls[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a KeyspacePartition message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @static - * @param {topodata.SrvKeyspace.KeyspacePartition} message KeyspacePartition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyspacePartition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.shard_references = []; - object.shard_tablet_controls = []; - } - if (options.defaults) - object.served_type = options.enums === String ? "UNKNOWN" : 0; - if (message.served_type != null && message.hasOwnProperty("served_type")) - object.served_type = options.enums === String ? $root.topodata.TabletType[message.served_type] : message.served_type; - if (message.shard_references && message.shard_references.length) { - object.shard_references = []; - for (var j = 0; j < message.shard_references.length; ++j) - object.shard_references[j] = $root.topodata.ShardReference.toObject(message.shard_references[j], options); - } - if (message.shard_tablet_controls && message.shard_tablet_controls.length) { - object.shard_tablet_controls = []; - for (var j = 0; j < message.shard_tablet_controls.length; ++j) - object.shard_tablet_controls[j] = $root.topodata.ShardTabletControl.toObject(message.shard_tablet_controls[j], options); - } - return object; - }; - - /** - * Converts this KeyspacePartition to JSON. - * @function toJSON - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - * @returns {Object.} JSON object - */ - KeyspacePartition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KeyspacePartition; - })(); - - SrvKeyspace.ServedFrom = (function() { - - /** - * Properties of a ServedFrom. - * @memberof topodata.SrvKeyspace - * @interface IServedFrom - * @property {topodata.TabletType|null} [tablet_type] ServedFrom tablet_type - * @property {string|null} [keyspace] ServedFrom keyspace - */ - - /** - * Constructs a new ServedFrom. - * @memberof topodata.SrvKeyspace - * @classdesc Represents a ServedFrom. - * @implements IServedFrom - * @constructor - * @param {topodata.SrvKeyspace.IServedFrom=} [properties] Properties to set - */ - function ServedFrom(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServedFrom tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.SrvKeyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.tablet_type = 0; - - /** - * ServedFrom keyspace. - * @member {string} keyspace - * @memberof topodata.SrvKeyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.keyspace = ""; - - /** - * Creates a new ServedFrom instance using the specified properties. - * @function create - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {topodata.SrvKeyspace.IServedFrom=} [properties] Properties to set - * @returns {topodata.SrvKeyspace.ServedFrom} ServedFrom instance - */ - ServedFrom.create = function create(properties) { - return new ServedFrom(properties); - }; - - /** - * Encodes the specified ServedFrom message. Does not implicitly {@link topodata.SrvKeyspace.ServedFrom.verify|verify} messages. - * @function encode - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {topodata.SrvKeyspace.IServedFrom} message ServedFrom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServedFrom.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified ServedFrom message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.ServedFrom.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {topodata.SrvKeyspace.IServedFrom} message ServedFrom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServedFrom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServedFrom message from the specified reader or buffer. - * @function decode - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.SrvKeyspace.ServedFrom} ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServedFrom.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.SrvKeyspace.ServedFrom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServedFrom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.SrvKeyspace.ServedFrom} ServedFrom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServedFrom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServedFrom message. - * @function verify - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServedFrom.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a ServedFrom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {Object.} object Plain object - * @returns {topodata.SrvKeyspace.ServedFrom} ServedFrom - */ - ServedFrom.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.SrvKeyspace.ServedFrom) - return object; - var message = new $root.topodata.SrvKeyspace.ServedFrom(); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a ServedFrom message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.SrvKeyspace.ServedFrom - * @static - * @param {topodata.SrvKeyspace.ServedFrom} message ServedFrom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServedFrom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.keyspace = ""; - } - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this ServedFrom to JSON. - * @function toJSON - * @memberof topodata.SrvKeyspace.ServedFrom - * @instance - * @returns {Object.} JSON object - */ - ServedFrom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServedFrom; - })(); - - return SrvKeyspace; - })(); - - topodata.CellInfo = (function() { - - /** - * Properties of a CellInfo. - * @memberof topodata - * @interface ICellInfo - * @property {string|null} [server_address] CellInfo server_address - * @property {string|null} [root] CellInfo root - */ - - /** - * Constructs a new CellInfo. - * @memberof topodata - * @classdesc Represents a CellInfo. - * @implements ICellInfo - * @constructor - * @param {topodata.ICellInfo=} [properties] Properties to set - */ - function CellInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CellInfo server_address. - * @member {string} server_address - * @memberof topodata.CellInfo - * @instance - */ - CellInfo.prototype.server_address = ""; - - /** - * CellInfo root. - * @member {string} root - * @memberof topodata.CellInfo - * @instance - */ - CellInfo.prototype.root = ""; - - /** - * Creates a new CellInfo instance using the specified properties. - * @function create - * @memberof topodata.CellInfo - * @static - * @param {topodata.ICellInfo=} [properties] Properties to set - * @returns {topodata.CellInfo} CellInfo instance - */ - CellInfo.create = function create(properties) { - return new CellInfo(properties); - }; - - /** - * Encodes the specified CellInfo message. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. - * @function encode - * @memberof topodata.CellInfo - * @static - * @param {topodata.ICellInfo} message CellInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CellInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.server_address != null && Object.hasOwnProperty.call(message, "server_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.server_address); - if (message.root != null && Object.hasOwnProperty.call(message, "root")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.root); - return writer; - }; - - /** - * Encodes the specified CellInfo message, length delimited. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.CellInfo - * @static - * @param {topodata.ICellInfo} message CellInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CellInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CellInfo message from the specified reader or buffer. - * @function decode - * @memberof topodata.CellInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.CellInfo} CellInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CellInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.CellInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.server_address = reader.string(); - break; - case 2: - message.root = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CellInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.CellInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.CellInfo} CellInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CellInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CellInfo message. - * @function verify - * @memberof topodata.CellInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CellInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.server_address != null && message.hasOwnProperty("server_address")) - if (!$util.isString(message.server_address)) - return "server_address: string expected"; - if (message.root != null && message.hasOwnProperty("root")) - if (!$util.isString(message.root)) - return "root: string expected"; - return null; - }; - - /** - * Creates a CellInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.CellInfo - * @static - * @param {Object.} object Plain object - * @returns {topodata.CellInfo} CellInfo - */ - CellInfo.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.CellInfo) - return object; - var message = new $root.topodata.CellInfo(); - if (object.server_address != null) - message.server_address = String(object.server_address); - if (object.root != null) - message.root = String(object.root); - return message; - }; - - /** - * Creates a plain object from a CellInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.CellInfo - * @static - * @param {topodata.CellInfo} message CellInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CellInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.server_address = ""; - object.root = ""; - } - if (message.server_address != null && message.hasOwnProperty("server_address")) - object.server_address = message.server_address; - if (message.root != null && message.hasOwnProperty("root")) - object.root = message.root; - return object; - }; - - /** - * Converts this CellInfo to JSON. - * @function toJSON - * @memberof topodata.CellInfo - * @instance - * @returns {Object.} JSON object - */ - CellInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CellInfo; - })(); - - topodata.CellsAlias = (function() { - - /** - * Properties of a CellsAlias. - * @memberof topodata - * @interface ICellsAlias - * @property {Array.|null} [cells] CellsAlias cells - */ - - /** - * Constructs a new CellsAlias. - * @memberof topodata - * @classdesc Represents a CellsAlias. - * @implements ICellsAlias - * @constructor - * @param {topodata.ICellsAlias=} [properties] Properties to set - */ - function CellsAlias(properties) { - this.cells = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CellsAlias cells. - * @member {Array.} cells - * @memberof topodata.CellsAlias - * @instance - */ - CellsAlias.prototype.cells = $util.emptyArray; - - /** - * Creates a new CellsAlias instance using the specified properties. - * @function create - * @memberof topodata.CellsAlias - * @static - * @param {topodata.ICellsAlias=} [properties] Properties to set - * @returns {topodata.CellsAlias} CellsAlias instance - */ - CellsAlias.create = function create(properties) { - return new CellsAlias(properties); - }; - - /** - * Encodes the specified CellsAlias message. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. - * @function encode - * @memberof topodata.CellsAlias - * @static - * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CellsAlias.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); - return writer; - }; - - /** - * Encodes the specified CellsAlias message, length delimited. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.CellsAlias - * @static - * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CellsAlias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CellsAlias message from the specified reader or buffer. - * @function decode - * @memberof topodata.CellsAlias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.CellsAlias} CellsAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CellsAlias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.CellsAlias(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CellsAlias message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.CellsAlias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.CellsAlias} CellsAlias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CellsAlias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CellsAlias message. - * @function verify - * @memberof topodata.CellsAlias - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CellsAlias.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - return null; - }; - - /** - * Creates a CellsAlias message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.CellsAlias - * @static - * @param {Object.} object Plain object - * @returns {topodata.CellsAlias} CellsAlias - */ - CellsAlias.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.CellsAlias) - return object; - var message = new $root.topodata.CellsAlias(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".topodata.CellsAlias.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - return message; - }; - - /** - * Creates a plain object from a CellsAlias message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.CellsAlias - * @static - * @param {topodata.CellsAlias} message CellsAlias - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CellsAlias.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - return object; - }; - - /** - * Converts this CellsAlias to JSON. - * @function toJSON - * @memberof topodata.CellsAlias - * @instance - * @returns {Object.} JSON object - */ - CellsAlias.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CellsAlias; - })(); - - topodata.TopoConfig = (function() { - - /** - * Properties of a TopoConfig. - * @memberof topodata - * @interface ITopoConfig - * @property {string|null} [topo_type] TopoConfig topo_type - * @property {string|null} [server] TopoConfig server - * @property {string|null} [root] TopoConfig root - */ - - /** - * Constructs a new TopoConfig. - * @memberof topodata - * @classdesc Represents a TopoConfig. - * @implements ITopoConfig - * @constructor - * @param {topodata.ITopoConfig=} [properties] Properties to set - */ - function TopoConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TopoConfig topo_type. - * @member {string} topo_type - * @memberof topodata.TopoConfig - * @instance - */ - TopoConfig.prototype.topo_type = ""; - - /** - * TopoConfig server. - * @member {string} server - * @memberof topodata.TopoConfig - * @instance - */ - TopoConfig.prototype.server = ""; - - /** - * TopoConfig root. - * @member {string} root - * @memberof topodata.TopoConfig - * @instance - */ - TopoConfig.prototype.root = ""; - - /** - * Creates a new TopoConfig instance using the specified properties. - * @function create - * @memberof topodata.TopoConfig - * @static - * @param {topodata.ITopoConfig=} [properties] Properties to set - * @returns {topodata.TopoConfig} TopoConfig instance - */ - TopoConfig.create = function create(properties) { - return new TopoConfig(properties); - }; - - /** - * Encodes the specified TopoConfig message. Does not implicitly {@link topodata.TopoConfig.verify|verify} messages. - * @function encode - * @memberof topodata.TopoConfig - * @static - * @param {topodata.ITopoConfig} message TopoConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TopoConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topo_type != null && Object.hasOwnProperty.call(message, "topo_type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topo_type); - if (message.server != null && Object.hasOwnProperty.call(message, "server")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.server); - if (message.root != null && Object.hasOwnProperty.call(message, "root")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.root); - return writer; - }; - - /** - * Encodes the specified TopoConfig message, length delimited. Does not implicitly {@link topodata.TopoConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.TopoConfig - * @static - * @param {topodata.ITopoConfig} message TopoConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TopoConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TopoConfig message from the specified reader or buffer. - * @function decode - * @memberof topodata.TopoConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.TopoConfig} TopoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TopoConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.TopoConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.topo_type = reader.string(); - break; - case 2: - message.server = reader.string(); - break; - case 3: - message.root = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TopoConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.TopoConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.TopoConfig} TopoConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TopoConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TopoConfig message. - * @function verify - * @memberof topodata.TopoConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TopoConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.topo_type != null && message.hasOwnProperty("topo_type")) - if (!$util.isString(message.topo_type)) - return "topo_type: string expected"; - if (message.server != null && message.hasOwnProperty("server")) - if (!$util.isString(message.server)) - return "server: string expected"; - if (message.root != null && message.hasOwnProperty("root")) - if (!$util.isString(message.root)) - return "root: string expected"; - return null; - }; - - /** - * Creates a TopoConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.TopoConfig - * @static - * @param {Object.} object Plain object - * @returns {topodata.TopoConfig} TopoConfig - */ - TopoConfig.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.TopoConfig) - return object; - var message = new $root.topodata.TopoConfig(); - if (object.topo_type != null) - message.topo_type = String(object.topo_type); - if (object.server != null) - message.server = String(object.server); - if (object.root != null) - message.root = String(object.root); - return message; - }; - - /** - * Creates a plain object from a TopoConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.TopoConfig - * @static - * @param {topodata.TopoConfig} message TopoConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TopoConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.topo_type = ""; - object.server = ""; - object.root = ""; - } - if (message.topo_type != null && message.hasOwnProperty("topo_type")) - object.topo_type = message.topo_type; - if (message.server != null && message.hasOwnProperty("server")) - object.server = message.server; - if (message.root != null && message.hasOwnProperty("root")) - object.root = message.root; - return object; - }; - - /** - * Converts this TopoConfig to JSON. - * @function toJSON - * @memberof topodata.TopoConfig - * @instance - * @returns {Object.} JSON object - */ - TopoConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TopoConfig; - })(); - - topodata.ExternalVitessCluster = (function() { - - /** - * Properties of an ExternalVitessCluster. - * @memberof topodata - * @interface IExternalVitessCluster - * @property {topodata.ITopoConfig|null} [topo_config] ExternalVitessCluster topo_config - */ - - /** - * Constructs a new ExternalVitessCluster. - * @memberof topodata - * @classdesc Represents an ExternalVitessCluster. - * @implements IExternalVitessCluster - * @constructor - * @param {topodata.IExternalVitessCluster=} [properties] Properties to set - */ - function ExternalVitessCluster(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExternalVitessCluster topo_config. - * @member {topodata.ITopoConfig|null|undefined} topo_config - * @memberof topodata.ExternalVitessCluster - * @instance - */ - ExternalVitessCluster.prototype.topo_config = null; - - /** - * Creates a new ExternalVitessCluster instance using the specified properties. - * @function create - * @memberof topodata.ExternalVitessCluster - * @static - * @param {topodata.IExternalVitessCluster=} [properties] Properties to set - * @returns {topodata.ExternalVitessCluster} ExternalVitessCluster instance - */ - ExternalVitessCluster.create = function create(properties) { - return new ExternalVitessCluster(properties); - }; - - /** - * Encodes the specified ExternalVitessCluster message. Does not implicitly {@link topodata.ExternalVitessCluster.verify|verify} messages. - * @function encode - * @memberof topodata.ExternalVitessCluster - * @static - * @param {topodata.IExternalVitessCluster} message ExternalVitessCluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalVitessCluster.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topo_config != null && Object.hasOwnProperty.call(message, "topo_config")) - $root.topodata.TopoConfig.encode(message.topo_config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExternalVitessCluster message, length delimited. Does not implicitly {@link topodata.ExternalVitessCluster.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.ExternalVitessCluster - * @static - * @param {topodata.IExternalVitessCluster} message ExternalVitessCluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalVitessCluster.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExternalVitessCluster message from the specified reader or buffer. - * @function decode - * @memberof topodata.ExternalVitessCluster - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.ExternalVitessCluster} ExternalVitessCluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalVitessCluster.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ExternalVitessCluster(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.topo_config = $root.topodata.TopoConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExternalVitessCluster message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.ExternalVitessCluster - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ExternalVitessCluster} ExternalVitessCluster - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalVitessCluster.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExternalVitessCluster message. - * @function verify - * @memberof topodata.ExternalVitessCluster - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExternalVitessCluster.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.topo_config != null && message.hasOwnProperty("topo_config")) { - var error = $root.topodata.TopoConfig.verify(message.topo_config); - if (error) - return "topo_config." + error; - } - return null; - }; - - /** - * Creates an ExternalVitessCluster message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.ExternalVitessCluster - * @static - * @param {Object.} object Plain object - * @returns {topodata.ExternalVitessCluster} ExternalVitessCluster - */ - ExternalVitessCluster.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ExternalVitessCluster) - return object; - var message = new $root.topodata.ExternalVitessCluster(); - if (object.topo_config != null) { - if (typeof object.topo_config !== "object") - throw TypeError(".topodata.ExternalVitessCluster.topo_config: object expected"); - message.topo_config = $root.topodata.TopoConfig.fromObject(object.topo_config); - } - return message; - }; - - /** - * Creates a plain object from an ExternalVitessCluster message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.ExternalVitessCluster - * @static - * @param {topodata.ExternalVitessCluster} message ExternalVitessCluster - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExternalVitessCluster.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.topo_config = null; - if (message.topo_config != null && message.hasOwnProperty("topo_config")) - object.topo_config = $root.topodata.TopoConfig.toObject(message.topo_config, options); - return object; - }; - - /** - * Converts this ExternalVitessCluster to JSON. - * @function toJSON - * @memberof topodata.ExternalVitessCluster - * @instance - * @returns {Object.} JSON object - */ - ExternalVitessCluster.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExternalVitessCluster; - })(); - - topodata.ExternalClusters = (function() { - - /** - * Properties of an ExternalClusters. - * @memberof topodata - * @interface IExternalClusters - * @property {Array.|null} [vitess_cluster] ExternalClusters vitess_cluster - */ - - /** - * Constructs a new ExternalClusters. - * @memberof topodata - * @classdesc Represents an ExternalClusters. - * @implements IExternalClusters - * @constructor - * @param {topodata.IExternalClusters=} [properties] Properties to set - */ - function ExternalClusters(properties) { - this.vitess_cluster = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExternalClusters vitess_cluster. - * @member {Array.} vitess_cluster - * @memberof topodata.ExternalClusters - * @instance - */ - ExternalClusters.prototype.vitess_cluster = $util.emptyArray; - - /** - * Creates a new ExternalClusters instance using the specified properties. - * @function create - * @memberof topodata.ExternalClusters - * @static - * @param {topodata.IExternalClusters=} [properties] Properties to set - * @returns {topodata.ExternalClusters} ExternalClusters instance - */ - ExternalClusters.create = function create(properties) { - return new ExternalClusters(properties); - }; - - /** - * Encodes the specified ExternalClusters message. Does not implicitly {@link topodata.ExternalClusters.verify|verify} messages. - * @function encode - * @memberof topodata.ExternalClusters - * @static - * @param {topodata.IExternalClusters} message ExternalClusters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalClusters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vitess_cluster != null && message.vitess_cluster.length) - for (var i = 0; i < message.vitess_cluster.length; ++i) - $root.topodata.ExternalVitessCluster.encode(message.vitess_cluster[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExternalClusters message, length delimited. Does not implicitly {@link topodata.ExternalClusters.verify|verify} messages. - * @function encodeDelimited - * @memberof topodata.ExternalClusters - * @static - * @param {topodata.IExternalClusters} message ExternalClusters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalClusters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExternalClusters message from the specified reader or buffer. - * @function decode - * @memberof topodata.ExternalClusters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {topodata.ExternalClusters} ExternalClusters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalClusters.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ExternalClusters(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.vitess_cluster && message.vitess_cluster.length)) - message.vitess_cluster = []; - message.vitess_cluster.push($root.topodata.ExternalVitessCluster.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExternalClusters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof topodata.ExternalClusters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ExternalClusters} ExternalClusters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalClusters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExternalClusters message. - * @function verify - * @memberof topodata.ExternalClusters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExternalClusters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vitess_cluster != null && message.hasOwnProperty("vitess_cluster")) { - if (!Array.isArray(message.vitess_cluster)) - return "vitess_cluster: array expected"; - for (var i = 0; i < message.vitess_cluster.length; ++i) { - var error = $root.topodata.ExternalVitessCluster.verify(message.vitess_cluster[i]); - if (error) - return "vitess_cluster." + error; - } - } - return null; - }; - - /** - * Creates an ExternalClusters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof topodata.ExternalClusters - * @static - * @param {Object.} object Plain object - * @returns {topodata.ExternalClusters} ExternalClusters - */ - ExternalClusters.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ExternalClusters) - return object; - var message = new $root.topodata.ExternalClusters(); - if (object.vitess_cluster) { - if (!Array.isArray(object.vitess_cluster)) - throw TypeError(".topodata.ExternalClusters.vitess_cluster: array expected"); - message.vitess_cluster = []; - for (var i = 0; i < object.vitess_cluster.length; ++i) { - if (typeof object.vitess_cluster[i] !== "object") - throw TypeError(".topodata.ExternalClusters.vitess_cluster: object expected"); - message.vitess_cluster[i] = $root.topodata.ExternalVitessCluster.fromObject(object.vitess_cluster[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExternalClusters message. Also converts values to other types if specified. - * @function toObject - * @memberof topodata.ExternalClusters - * @static - * @param {topodata.ExternalClusters} message ExternalClusters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExternalClusters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.vitess_cluster = []; - if (message.vitess_cluster && message.vitess_cluster.length) { - object.vitess_cluster = []; - for (var j = 0; j < message.vitess_cluster.length; ++j) - object.vitess_cluster[j] = $root.topodata.ExternalVitessCluster.toObject(message.vitess_cluster[j], options); - } - return object; - }; - - /** - * Converts this ExternalClusters to JSON. - * @function toJSON - * @memberof topodata.ExternalClusters - * @instance - * @returns {Object.} JSON object - */ - ExternalClusters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExternalClusters; - })(); - - return topodata; -})(); - -$root.vttime = (function() { - - /** - * Namespace vttime. - * @exports vttime - * @namespace - */ - var vttime = {}; - - vttime.Time = (function() { - - /** - * Properties of a Time. - * @memberof vttime - * @interface ITime - * @property {number|Long|null} [seconds] Time seconds - * @property {number|null} [nanoseconds] Time nanoseconds - */ - - /** - * Constructs a new Time. - * @memberof vttime - * @classdesc Represents a Time. - * @implements ITime - * @constructor - * @param {vttime.ITime=} [properties] Properties to set - */ - function Time(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Time seconds. - * @member {number|Long} seconds - * @memberof vttime.Time - * @instance - */ - Time.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Time nanoseconds. - * @member {number} nanoseconds - * @memberof vttime.Time - * @instance - */ - Time.prototype.nanoseconds = 0; - - /** - * Creates a new Time instance using the specified properties. - * @function create - * @memberof vttime.Time - * @static - * @param {vttime.ITime=} [properties] Properties to set - * @returns {vttime.Time} Time instance - */ - Time.create = function create(properties) { - return new Time(properties); - }; - - /** - * Encodes the specified Time message. Does not implicitly {@link vttime.Time.verify|verify} messages. - * @function encode - * @memberof vttime.Time - * @static - * @param {vttime.ITime} message Time message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Time.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanoseconds != null && Object.hasOwnProperty.call(message, "nanoseconds")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanoseconds); - return writer; - }; - - /** - * Encodes the specified Time message, length delimited. Does not implicitly {@link vttime.Time.verify|verify} messages. - * @function encodeDelimited - * @memberof vttime.Time - * @static - * @param {vttime.ITime} message Time message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Time.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Time message from the specified reader or buffer. - * @function decode - * @memberof vttime.Time - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vttime.Time} Time - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Time.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vttime.Time(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanoseconds = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Time message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vttime.Time - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vttime.Time} Time - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Time.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Time message. - * @function verify - * @memberof vttime.Time - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Time.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanoseconds != null && message.hasOwnProperty("nanoseconds")) - if (!$util.isInteger(message.nanoseconds)) - return "nanoseconds: integer expected"; - return null; - }; - - /** - * Creates a Time message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vttime.Time - * @static - * @param {Object.} object Plain object - * @returns {vttime.Time} Time - */ - Time.fromObject = function fromObject(object) { - if (object instanceof $root.vttime.Time) - return object; - var message = new $root.vttime.Time(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanoseconds != null) - message.nanoseconds = object.nanoseconds | 0; - return message; - }; - - /** - * Creates a plain object from a Time message. Also converts values to other types if specified. - * @function toObject - * @memberof vttime.Time - * @static - * @param {vttime.Time} message Time - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Time.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanoseconds = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanoseconds != null && message.hasOwnProperty("nanoseconds")) - object.nanoseconds = message.nanoseconds; - return object; - }; - - /** - * Converts this Time to JSON. - * @function toJSON - * @memberof vttime.Time - * @instance - * @returns {Object.} JSON object - */ - Time.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Time; - })(); - - vttime.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof vttime - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof vttime - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {vttime.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof vttime.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof vttime.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof vttime.Duration - * @static - * @param {vttime.IDuration=} [properties] Properties to set - * @returns {vttime.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link vttime.Duration.verify|verify} messages. - * @function encode - * @memberof vttime.Duration - * @static - * @param {vttime.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link vttime.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof vttime.Duration - * @static - * @param {vttime.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof vttime.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vttime.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vttime.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vttime.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vttime.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof vttime.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vttime.Duration - * @static - * @param {Object.} object Plain object - * @returns {vttime.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.vttime.Duration) - return object; - var message = new $root.vttime.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof vttime.Duration - * @static - * @param {vttime.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof vttime.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Duration; - })(); - - return vttime; -})(); - -$root.vtrpc = (function() { - - /** - * Namespace vtrpc. - * @exports vtrpc - * @namespace - */ - var vtrpc = {}; - - vtrpc.CallerID = (function() { - - /** - * Properties of a CallerID. - * @memberof vtrpc - * @interface ICallerID - * @property {string|null} [principal] CallerID principal - * @property {string|null} [component] CallerID component - * @property {string|null} [subcomponent] CallerID subcomponent - */ - - /** - * Constructs a new CallerID. - * @memberof vtrpc - * @classdesc Represents a CallerID. - * @implements ICallerID - * @constructor - * @param {vtrpc.ICallerID=} [properties] Properties to set - */ - function CallerID(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CallerID principal. - * @member {string} principal - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.principal = ""; - - /** - * CallerID component. - * @member {string} component - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.component = ""; - - /** - * CallerID subcomponent. - * @member {string} subcomponent - * @memberof vtrpc.CallerID - * @instance - */ - CallerID.prototype.subcomponent = ""; - - /** - * Creates a new CallerID instance using the specified properties. - * @function create - * @memberof vtrpc.CallerID - * @static - * @param {vtrpc.ICallerID=} [properties] Properties to set - * @returns {vtrpc.CallerID} CallerID instance - */ - CallerID.create = function create(properties) { - return new CallerID(properties); - }; - - /** - * Encodes the specified CallerID message. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. - * @function encode - * @memberof vtrpc.CallerID - * @static - * @param {vtrpc.ICallerID} message CallerID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallerID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.principal != null && Object.hasOwnProperty.call(message, "principal")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.principal); - if (message.component != null && Object.hasOwnProperty.call(message, "component")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.component); - if (message.subcomponent != null && Object.hasOwnProperty.call(message, "subcomponent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcomponent); - return writer; - }; - - /** - * Encodes the specified CallerID message, length delimited. Does not implicitly {@link vtrpc.CallerID.verify|verify} messages. - * @function encodeDelimited - * @memberof vtrpc.CallerID - * @static - * @param {vtrpc.ICallerID} message CallerID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallerID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CallerID message from the specified reader or buffer. - * @function decode - * @memberof vtrpc.CallerID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtrpc.CallerID} CallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallerID.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtrpc.CallerID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.principal = reader.string(); - break; - case 2: - message.component = reader.string(); - break; - case 3: - message.subcomponent = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CallerID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtrpc.CallerID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtrpc.CallerID} CallerID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallerID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CallerID message. - * @function verify - * @memberof vtrpc.CallerID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CallerID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.principal != null && message.hasOwnProperty("principal")) - if (!$util.isString(message.principal)) - return "principal: string expected"; - if (message.component != null && message.hasOwnProperty("component")) - if (!$util.isString(message.component)) - return "component: string expected"; - if (message.subcomponent != null && message.hasOwnProperty("subcomponent")) - if (!$util.isString(message.subcomponent)) - return "subcomponent: string expected"; - return null; - }; - - /** - * Creates a CallerID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtrpc.CallerID - * @static - * @param {Object.} object Plain object - * @returns {vtrpc.CallerID} CallerID - */ - CallerID.fromObject = function fromObject(object) { - if (object instanceof $root.vtrpc.CallerID) - return object; - var message = new $root.vtrpc.CallerID(); - if (object.principal != null) - message.principal = String(object.principal); - if (object.component != null) - message.component = String(object.component); - if (object.subcomponent != null) - message.subcomponent = String(object.subcomponent); - return message; - }; - - /** - * Creates a plain object from a CallerID message. Also converts values to other types if specified. - * @function toObject - * @memberof vtrpc.CallerID - * @static - * @param {vtrpc.CallerID} message CallerID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CallerID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.principal = ""; - object.component = ""; - object.subcomponent = ""; - } - if (message.principal != null && message.hasOwnProperty("principal")) - object.principal = message.principal; - if (message.component != null && message.hasOwnProperty("component")) - object.component = message.component; - if (message.subcomponent != null && message.hasOwnProperty("subcomponent")) - object.subcomponent = message.subcomponent; - return object; - }; - - /** - * Converts this CallerID to JSON. - * @function toJSON - * @memberof vtrpc.CallerID - * @instance - * @returns {Object.} JSON object - */ - CallerID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CallerID; - })(); - - /** - * Code enum. - * @name vtrpc.Code - * @enum {number} - * @property {number} OK=0 OK value - * @property {number} CANCELED=1 CANCELED value - * @property {number} UNKNOWN=2 UNKNOWN value - * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value - * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value - * @property {number} NOT_FOUND=5 NOT_FOUND value - * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value - * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value - * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value - * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value - * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value - * @property {number} ABORTED=10 ABORTED value - * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value - * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value - * @property {number} INTERNAL=13 INTERNAL value - * @property {number} UNAVAILABLE=14 UNAVAILABLE value - * @property {number} DATA_LOSS=15 DATA_LOSS value - */ - vtrpc.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OK"] = 0; - values[valuesById[1] = "CANCELED"] = 1; - values[valuesById[2] = "UNKNOWN"] = 2; - values[valuesById[3] = "INVALID_ARGUMENT"] = 3; - values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; - values[valuesById[5] = "NOT_FOUND"] = 5; - values[valuesById[6] = "ALREADY_EXISTS"] = 6; - values[valuesById[7] = "PERMISSION_DENIED"] = 7; - values[valuesById[16] = "UNAUTHENTICATED"] = 16; - values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; - values[valuesById[9] = "FAILED_PRECONDITION"] = 9; - values[valuesById[10] = "ABORTED"] = 10; - values[valuesById[11] = "OUT_OF_RANGE"] = 11; - values[valuesById[12] = "UNIMPLEMENTED"] = 12; - values[valuesById[13] = "INTERNAL"] = 13; - values[valuesById[14] = "UNAVAILABLE"] = 14; - values[valuesById[15] = "DATA_LOSS"] = 15; - return values; - })(); - - /** - * LegacyErrorCode enum. - * @name vtrpc.LegacyErrorCode - * @enum {number} - * @property {number} SUCCESS_LEGACY=0 SUCCESS_LEGACY value - * @property {number} CANCELLED_LEGACY=1 CANCELLED_LEGACY value - * @property {number} UNKNOWN_ERROR_LEGACY=2 UNKNOWN_ERROR_LEGACY value - * @property {number} BAD_INPUT_LEGACY=3 BAD_INPUT_LEGACY value - * @property {number} DEADLINE_EXCEEDED_LEGACY=4 DEADLINE_EXCEEDED_LEGACY value - * @property {number} INTEGRITY_ERROR_LEGACY=5 INTEGRITY_ERROR_LEGACY value - * @property {number} PERMISSION_DENIED_LEGACY=6 PERMISSION_DENIED_LEGACY value - * @property {number} RESOURCE_EXHAUSTED_LEGACY=7 RESOURCE_EXHAUSTED_LEGACY value - * @property {number} QUERY_NOT_SERVED_LEGACY=8 QUERY_NOT_SERVED_LEGACY value - * @property {number} NOT_IN_TX_LEGACY=9 NOT_IN_TX_LEGACY value - * @property {number} INTERNAL_ERROR_LEGACY=10 INTERNAL_ERROR_LEGACY value - * @property {number} TRANSIENT_ERROR_LEGACY=11 TRANSIENT_ERROR_LEGACY value - * @property {number} UNAUTHENTICATED_LEGACY=12 UNAUTHENTICATED_LEGACY value - */ - vtrpc.LegacyErrorCode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SUCCESS_LEGACY"] = 0; - values[valuesById[1] = "CANCELLED_LEGACY"] = 1; - values[valuesById[2] = "UNKNOWN_ERROR_LEGACY"] = 2; - values[valuesById[3] = "BAD_INPUT_LEGACY"] = 3; - values[valuesById[4] = "DEADLINE_EXCEEDED_LEGACY"] = 4; - values[valuesById[5] = "INTEGRITY_ERROR_LEGACY"] = 5; - values[valuesById[6] = "PERMISSION_DENIED_LEGACY"] = 6; - values[valuesById[7] = "RESOURCE_EXHAUSTED_LEGACY"] = 7; - values[valuesById[8] = "QUERY_NOT_SERVED_LEGACY"] = 8; - values[valuesById[9] = "NOT_IN_TX_LEGACY"] = 9; - values[valuesById[10] = "INTERNAL_ERROR_LEGACY"] = 10; - values[valuesById[11] = "TRANSIENT_ERROR_LEGACY"] = 11; - values[valuesById[12] = "UNAUTHENTICATED_LEGACY"] = 12; - return values; - })(); - - vtrpc.RPCError = (function() { - - /** - * Properties of a RPCError. - * @memberof vtrpc - * @interface IRPCError - * @property {vtrpc.LegacyErrorCode|null} [legacy_code] RPCError legacy_code - * @property {string|null} [message] RPCError message - * @property {vtrpc.Code|null} [code] RPCError code - */ - - /** - * Constructs a new RPCError. - * @memberof vtrpc - * @classdesc Represents a RPCError. - * @implements IRPCError - * @constructor - * @param {vtrpc.IRPCError=} [properties] Properties to set - */ - function RPCError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RPCError legacy_code. - * @member {vtrpc.LegacyErrorCode} legacy_code - * @memberof vtrpc.RPCError - * @instance - */ - RPCError.prototype.legacy_code = 0; - - /** - * RPCError message. - * @member {string} message - * @memberof vtrpc.RPCError - * @instance - */ - RPCError.prototype.message = ""; - - /** - * RPCError code. - * @member {vtrpc.Code} code - * @memberof vtrpc.RPCError - * @instance - */ - RPCError.prototype.code = 0; - - /** - * Creates a new RPCError instance using the specified properties. - * @function create - * @memberof vtrpc.RPCError - * @static - * @param {vtrpc.IRPCError=} [properties] Properties to set - * @returns {vtrpc.RPCError} RPCError instance - */ - RPCError.create = function create(properties) { - return new RPCError(properties); - }; - - /** - * Encodes the specified RPCError message. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. - * @function encode - * @memberof vtrpc.RPCError - * @static - * @param {vtrpc.IRPCError} message RPCError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RPCError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.legacy_code != null && Object.hasOwnProperty.call(message, "legacy_code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.legacy_code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.code); - return writer; - }; - - /** - * Encodes the specified RPCError message, length delimited. Does not implicitly {@link vtrpc.RPCError.verify|verify} messages. - * @function encodeDelimited - * @memberof vtrpc.RPCError - * @static - * @param {vtrpc.IRPCError} message RPCError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RPCError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RPCError message from the specified reader or buffer. - * @function decode - * @memberof vtrpc.RPCError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtrpc.RPCError} RPCError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RPCError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtrpc.RPCError(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.legacy_code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.code = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RPCError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtrpc.RPCError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtrpc.RPCError} RPCError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RPCError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RPCError message. - * @function verify - * @memberof vtrpc.RPCError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RPCError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.legacy_code != null && message.hasOwnProperty("legacy_code")) - switch (message.legacy_code) { - default: - return "legacy_code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 16: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - return null; - }; - - /** - * Creates a RPCError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtrpc.RPCError - * @static - * @param {Object.} object Plain object - * @returns {vtrpc.RPCError} RPCError - */ - RPCError.fromObject = function fromObject(object) { - if (object instanceof $root.vtrpc.RPCError) - return object; - var message = new $root.vtrpc.RPCError(); - switch (object.legacy_code) { - case "SUCCESS_LEGACY": - case 0: - message.legacy_code = 0; - break; - case "CANCELLED_LEGACY": - case 1: - message.legacy_code = 1; - break; - case "UNKNOWN_ERROR_LEGACY": - case 2: - message.legacy_code = 2; - break; - case "BAD_INPUT_LEGACY": - case 3: - message.legacy_code = 3; - break; - case "DEADLINE_EXCEEDED_LEGACY": - case 4: - message.legacy_code = 4; - break; - case "INTEGRITY_ERROR_LEGACY": - case 5: - message.legacy_code = 5; - break; - case "PERMISSION_DENIED_LEGACY": - case 6: - message.legacy_code = 6; - break; - case "RESOURCE_EXHAUSTED_LEGACY": - case 7: - message.legacy_code = 7; - break; - case "QUERY_NOT_SERVED_LEGACY": - case 8: - message.legacy_code = 8; - break; - case "NOT_IN_TX_LEGACY": - case 9: - message.legacy_code = 9; - break; - case "INTERNAL_ERROR_LEGACY": - case 10: - message.legacy_code = 10; - break; - case "TRANSIENT_ERROR_LEGACY": - case 11: - message.legacy_code = 11; - break; - case "UNAUTHENTICATED_LEGACY": - case 12: - message.legacy_code = 12; - break; - } - if (object.message != null) - message.message = String(object.message); - switch (object.code) { - case "OK": - case 0: - message.code = 0; - break; - case "CANCELED": - case 1: - message.code = 1; - break; - case "UNKNOWN": - case 2: - message.code = 2; - break; - case "INVALID_ARGUMENT": - case 3: - message.code = 3; - break; - case "DEADLINE_EXCEEDED": - case 4: - message.code = 4; - break; - case "NOT_FOUND": - case 5: - message.code = 5; - break; - case "ALREADY_EXISTS": - case 6: - message.code = 6; - break; - case "PERMISSION_DENIED": - case 7: - message.code = 7; - break; - case "UNAUTHENTICATED": - case 16: - message.code = 16; - break; - case "RESOURCE_EXHAUSTED": - case 8: - message.code = 8; - break; - case "FAILED_PRECONDITION": - case 9: - message.code = 9; - break; - case "ABORTED": - case 10: - message.code = 10; - break; - case "OUT_OF_RANGE": - case 11: - message.code = 11; - break; - case "UNIMPLEMENTED": - case 12: - message.code = 12; - break; - case "INTERNAL": - case 13: - message.code = 13; - break; - case "UNAVAILABLE": - case 14: - message.code = 14; - break; - case "DATA_LOSS": - case 15: - message.code = 15; - break; - } - return message; - }; - - /** - * Creates a plain object from a RPCError message. Also converts values to other types if specified. - * @function toObject - * @memberof vtrpc.RPCError - * @static - * @param {vtrpc.RPCError} message RPCError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RPCError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.legacy_code = options.enums === String ? "SUCCESS_LEGACY" : 0; - object.message = ""; - object.code = options.enums === String ? "OK" : 0; - } - if (message.legacy_code != null && message.hasOwnProperty("legacy_code")) - object.legacy_code = options.enums === String ? $root.vtrpc.LegacyErrorCode[message.legacy_code] : message.legacy_code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.vtrpc.Code[message.code] : message.code; - return object; - }; - - /** - * Converts this RPCError to JSON. - * @function toJSON - * @memberof vtrpc.RPCError - * @instance - * @returns {Object.} JSON object - */ - RPCError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RPCError; - })(); - - return vtrpc; -})(); - -$root.replicationdata = (function() { - - /** - * Namespace replicationdata. - * @exports replicationdata - * @namespace - */ - var replicationdata = {}; - - replicationdata.Status = (function() { - - /** - * Properties of a Status. - * @memberof replicationdata - * @interface IStatus - * @property {string|null} [position] Status position - * @property {boolean|null} [io_thread_running] Status io_thread_running - * @property {boolean|null} [sql_thread_running] Status sql_thread_running - * @property {number|null} [seconds_behind_master] Status seconds_behind_master - * @property {string|null} [master_host] Status master_host - * @property {number|null} [master_port] Status master_port - * @property {number|null} [master_connect_retry] Status master_connect_retry - * @property {string|null} [relay_log_position] Status relay_log_position - * @property {string|null} [file_position] Status file_position - * @property {string|null} [file_relay_log_position] Status file_relay_log_position - * @property {number|null} [master_server_id] Status master_server_id - * @property {string|null} [master_uuid] Status master_uuid - */ - - /** - * Constructs a new Status. - * @memberof replicationdata - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {replicationdata.IStatus=} [properties] Properties to set - */ - function Status(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status position. - * @member {string} position - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.position = ""; - - /** - * Status io_thread_running. - * @member {boolean} io_thread_running - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.io_thread_running = false; - - /** - * Status sql_thread_running. - * @member {boolean} sql_thread_running - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.sql_thread_running = false; - - /** - * Status seconds_behind_master. - * @member {number} seconds_behind_master - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.seconds_behind_master = 0; - - /** - * Status master_host. - * @member {string} master_host - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.master_host = ""; - - /** - * Status master_port. - * @member {number} master_port - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.master_port = 0; - - /** - * Status master_connect_retry. - * @member {number} master_connect_retry - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.master_connect_retry = 0; - - /** - * Status relay_log_position. - * @member {string} relay_log_position - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.relay_log_position = ""; - - /** - * Status file_position. - * @member {string} file_position - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.file_position = ""; - - /** - * Status file_relay_log_position. - * @member {string} file_relay_log_position - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.file_relay_log_position = ""; - - /** - * Status master_server_id. - * @member {number} master_server_id - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.master_server_id = 0; - - /** - * Status master_uuid. - * @member {string} master_uuid - * @memberof replicationdata.Status - * @instance - */ - Status.prototype.master_uuid = ""; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof replicationdata.Status - * @static - * @param {replicationdata.IStatus=} [properties] Properties to set - * @returns {replicationdata.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link replicationdata.Status.verify|verify} messages. - * @function encode - * @memberof replicationdata.Status - * @static - * @param {replicationdata.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.io_thread_running != null && Object.hasOwnProperty.call(message, "io_thread_running")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.io_thread_running); - if (message.sql_thread_running != null && Object.hasOwnProperty.call(message, "sql_thread_running")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.sql_thread_running); - if (message.seconds_behind_master != null && Object.hasOwnProperty.call(message, "seconds_behind_master")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seconds_behind_master); - if (message.master_host != null && Object.hasOwnProperty.call(message, "master_host")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.master_host); - if (message.master_port != null && Object.hasOwnProperty.call(message, "master_port")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.master_port); - if (message.master_connect_retry != null && Object.hasOwnProperty.call(message, "master_connect_retry")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.master_connect_retry); - if (message.relay_log_position != null && Object.hasOwnProperty.call(message, "relay_log_position")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.relay_log_position); - if (message.file_position != null && Object.hasOwnProperty.call(message, "file_position")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.file_position); - if (message.file_relay_log_position != null && Object.hasOwnProperty.call(message, "file_relay_log_position")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.file_relay_log_position); - if (message.master_server_id != null && Object.hasOwnProperty.call(message, "master_server_id")) - writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.master_server_id); - if (message.master_uuid != null && Object.hasOwnProperty.call(message, "master_uuid")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.master_uuid); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link replicationdata.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof replicationdata.Status - * @static - * @param {replicationdata.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof replicationdata.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - case 2: - message.io_thread_running = reader.bool(); - break; - case 3: - message.sql_thread_running = reader.bool(); - break; - case 4: - message.seconds_behind_master = reader.uint32(); - break; - case 5: - message.master_host = reader.string(); - break; - case 6: - message.master_port = reader.int32(); - break; - case 7: - message.master_connect_retry = reader.int32(); - break; - case 8: - message.relay_log_position = reader.string(); - break; - case 9: - message.file_position = reader.string(); - break; - case 10: - message.file_relay_log_position = reader.string(); - break; - case 11: - message.master_server_id = reader.uint32(); - break; - case 12: - message.master_uuid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof replicationdata.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof replicationdata.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.io_thread_running != null && message.hasOwnProperty("io_thread_running")) - if (typeof message.io_thread_running !== "boolean") - return "io_thread_running: boolean expected"; - if (message.sql_thread_running != null && message.hasOwnProperty("sql_thread_running")) - if (typeof message.sql_thread_running !== "boolean") - return "sql_thread_running: boolean expected"; - if (message.seconds_behind_master != null && message.hasOwnProperty("seconds_behind_master")) - if (!$util.isInteger(message.seconds_behind_master)) - return "seconds_behind_master: integer expected"; - if (message.master_host != null && message.hasOwnProperty("master_host")) - if (!$util.isString(message.master_host)) - return "master_host: string expected"; - if (message.master_port != null && message.hasOwnProperty("master_port")) - if (!$util.isInteger(message.master_port)) - return "master_port: integer expected"; - if (message.master_connect_retry != null && message.hasOwnProperty("master_connect_retry")) - if (!$util.isInteger(message.master_connect_retry)) - return "master_connect_retry: integer expected"; - if (message.relay_log_position != null && message.hasOwnProperty("relay_log_position")) - if (!$util.isString(message.relay_log_position)) - return "relay_log_position: string expected"; - if (message.file_position != null && message.hasOwnProperty("file_position")) - if (!$util.isString(message.file_position)) - return "file_position: string expected"; - if (message.file_relay_log_position != null && message.hasOwnProperty("file_relay_log_position")) - if (!$util.isString(message.file_relay_log_position)) - return "file_relay_log_position: string expected"; - if (message.master_server_id != null && message.hasOwnProperty("master_server_id")) - if (!$util.isInteger(message.master_server_id)) - return "master_server_id: integer expected"; - if (message.master_uuid != null && message.hasOwnProperty("master_uuid")) - if (!$util.isString(message.master_uuid)) - return "master_uuid: string expected"; - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof replicationdata.Status - * @static - * @param {Object.} object Plain object - * @returns {replicationdata.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.Status) - return object; - var message = new $root.replicationdata.Status(); - if (object.position != null) - message.position = String(object.position); - if (object.io_thread_running != null) - message.io_thread_running = Boolean(object.io_thread_running); - if (object.sql_thread_running != null) - message.sql_thread_running = Boolean(object.sql_thread_running); - if (object.seconds_behind_master != null) - message.seconds_behind_master = object.seconds_behind_master >>> 0; - if (object.master_host != null) - message.master_host = String(object.master_host); - if (object.master_port != null) - message.master_port = object.master_port | 0; - if (object.master_connect_retry != null) - message.master_connect_retry = object.master_connect_retry | 0; - if (object.relay_log_position != null) - message.relay_log_position = String(object.relay_log_position); - if (object.file_position != null) - message.file_position = String(object.file_position); - if (object.file_relay_log_position != null) - message.file_relay_log_position = String(object.file_relay_log_position); - if (object.master_server_id != null) - message.master_server_id = object.master_server_id >>> 0; - if (object.master_uuid != null) - message.master_uuid = String(object.master_uuid); - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof replicationdata.Status - * @static - * @param {replicationdata.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.position = ""; - object.io_thread_running = false; - object.sql_thread_running = false; - object.seconds_behind_master = 0; - object.master_host = ""; - object.master_port = 0; - object.master_connect_retry = 0; - object.relay_log_position = ""; - object.file_position = ""; - object.file_relay_log_position = ""; - object.master_server_id = 0; - object.master_uuid = ""; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.io_thread_running != null && message.hasOwnProperty("io_thread_running")) - object.io_thread_running = message.io_thread_running; - if (message.sql_thread_running != null && message.hasOwnProperty("sql_thread_running")) - object.sql_thread_running = message.sql_thread_running; - if (message.seconds_behind_master != null && message.hasOwnProperty("seconds_behind_master")) - object.seconds_behind_master = message.seconds_behind_master; - if (message.master_host != null && message.hasOwnProperty("master_host")) - object.master_host = message.master_host; - if (message.master_port != null && message.hasOwnProperty("master_port")) - object.master_port = message.master_port; - if (message.master_connect_retry != null && message.hasOwnProperty("master_connect_retry")) - object.master_connect_retry = message.master_connect_retry; - if (message.relay_log_position != null && message.hasOwnProperty("relay_log_position")) - object.relay_log_position = message.relay_log_position; - if (message.file_position != null && message.hasOwnProperty("file_position")) - object.file_position = message.file_position; - if (message.file_relay_log_position != null && message.hasOwnProperty("file_relay_log_position")) - object.file_relay_log_position = message.file_relay_log_position; - if (message.master_server_id != null && message.hasOwnProperty("master_server_id")) - object.master_server_id = message.master_server_id; - if (message.master_uuid != null && message.hasOwnProperty("master_uuid")) - object.master_uuid = message.master_uuid; - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof replicationdata.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Status; - })(); - - replicationdata.StopReplicationStatus = (function() { - - /** - * Properties of a StopReplicationStatus. - * @memberof replicationdata - * @interface IStopReplicationStatus - * @property {replicationdata.IStatus|null} [before] StopReplicationStatus before - * @property {replicationdata.IStatus|null} [after] StopReplicationStatus after - */ - - /** - * Constructs a new StopReplicationStatus. - * @memberof replicationdata - * @classdesc Represents a StopReplicationStatus. - * @implements IStopReplicationStatus - * @constructor - * @param {replicationdata.IStopReplicationStatus=} [properties] Properties to set - */ - function StopReplicationStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopReplicationStatus before. - * @member {replicationdata.IStatus|null|undefined} before - * @memberof replicationdata.StopReplicationStatus - * @instance - */ - StopReplicationStatus.prototype.before = null; - - /** - * StopReplicationStatus after. - * @member {replicationdata.IStatus|null|undefined} after - * @memberof replicationdata.StopReplicationStatus - * @instance - */ - StopReplicationStatus.prototype.after = null; - - /** - * Creates a new StopReplicationStatus instance using the specified properties. - * @function create - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {replicationdata.IStopReplicationStatus=} [properties] Properties to set - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus instance - */ - StopReplicationStatus.create = function create(properties) { - return new StopReplicationStatus(properties); - }; - - /** - * Encodes the specified StopReplicationStatus message. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. - * @function encode - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {replicationdata.IStopReplicationStatus} message StopReplicationStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.before != null && Object.hasOwnProperty.call(message, "before")) - $root.replicationdata.Status.encode(message.before, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after != null && Object.hasOwnProperty.call(message, "after")) - $root.replicationdata.Status.encode(message.after, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StopReplicationStatus message, length delimited. Does not implicitly {@link replicationdata.StopReplicationStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {replicationdata.IStopReplicationStatus} message StopReplicationStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationStatus message from the specified reader or buffer. - * @function decode - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.StopReplicationStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.before = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - case 2: - message.after = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationStatus message. - * @function verify - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.before != null && message.hasOwnProperty("before")) { - var error = $root.replicationdata.Status.verify(message.before); - if (error) - return "before." + error; - } - if (message.after != null && message.hasOwnProperty("after")) { - var error = $root.replicationdata.Status.verify(message.after); - if (error) - return "after." + error; - } - return null; - }; - - /** - * Creates a StopReplicationStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {Object.} object Plain object - * @returns {replicationdata.StopReplicationStatus} StopReplicationStatus - */ - StopReplicationStatus.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.StopReplicationStatus) - return object; - var message = new $root.replicationdata.StopReplicationStatus(); - if (object.before != null) { - if (typeof object.before !== "object") - throw TypeError(".replicationdata.StopReplicationStatus.before: object expected"); - message.before = $root.replicationdata.Status.fromObject(object.before); - } - if (object.after != null) { - if (typeof object.after !== "object") - throw TypeError(".replicationdata.StopReplicationStatus.after: object expected"); - message.after = $root.replicationdata.Status.fromObject(object.after); - } - return message; - }; - - /** - * Creates a plain object from a StopReplicationStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof replicationdata.StopReplicationStatus - * @static - * @param {replicationdata.StopReplicationStatus} message StopReplicationStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.before = null; - object.after = null; - } - if (message.before != null && message.hasOwnProperty("before")) - object.before = $root.replicationdata.Status.toObject(message.before, options); - if (message.after != null && message.hasOwnProperty("after")) - object.after = $root.replicationdata.Status.toObject(message.after, options); - return object; - }; - - /** - * Converts this StopReplicationStatus to JSON. - * @function toJSON - * @memberof replicationdata.StopReplicationStatus - * @instance - * @returns {Object.} JSON object - */ - StopReplicationStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StopReplicationStatus; - })(); - - /** - * StopReplicationMode enum. - * @name replicationdata.StopReplicationMode - * @enum {number} - * @property {number} IOANDSQLTHREAD=0 IOANDSQLTHREAD value - * @property {number} IOTHREADONLY=1 IOTHREADONLY value - */ - replicationdata.StopReplicationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IOANDSQLTHREAD"] = 0; - values[valuesById[1] = "IOTHREADONLY"] = 1; - return values; - })(); - - replicationdata.MasterStatus = (function() { - - /** - * Properties of a MasterStatus. - * @memberof replicationdata - * @interface IMasterStatus - * @property {string|null} [position] MasterStatus position - * @property {string|null} [file_position] MasterStatus file_position - */ - - /** - * Constructs a new MasterStatus. - * @memberof replicationdata - * @classdesc Represents a MasterStatus. - * @implements IMasterStatus - * @constructor - * @param {replicationdata.IMasterStatus=} [properties] Properties to set - */ - function MasterStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterStatus position. - * @member {string} position - * @memberof replicationdata.MasterStatus - * @instance - */ - MasterStatus.prototype.position = ""; - - /** - * MasterStatus file_position. - * @member {string} file_position - * @memberof replicationdata.MasterStatus - * @instance - */ - MasterStatus.prototype.file_position = ""; - - /** - * Creates a new MasterStatus instance using the specified properties. - * @function create - * @memberof replicationdata.MasterStatus - * @static - * @param {replicationdata.IMasterStatus=} [properties] Properties to set - * @returns {replicationdata.MasterStatus} MasterStatus instance - */ - MasterStatus.create = function create(properties) { - return new MasterStatus(properties); - }; - - /** - * Encodes the specified MasterStatus message. Does not implicitly {@link replicationdata.MasterStatus.verify|verify} messages. - * @function encode - * @memberof replicationdata.MasterStatus - * @static - * @param {replicationdata.IMasterStatus} message MasterStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.file_position != null && Object.hasOwnProperty.call(message, "file_position")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.file_position); - return writer; - }; - - /** - * Encodes the specified MasterStatus message, length delimited. Does not implicitly {@link replicationdata.MasterStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof replicationdata.MasterStatus - * @static - * @param {replicationdata.IMasterStatus} message MasterStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterStatus message from the specified reader or buffer. - * @function decode - * @memberof replicationdata.MasterStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {replicationdata.MasterStatus} MasterStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.replicationdata.MasterStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - case 2: - message.file_position = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof replicationdata.MasterStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {replicationdata.MasterStatus} MasterStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterStatus message. - * @function verify - * @memberof replicationdata.MasterStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.file_position != null && message.hasOwnProperty("file_position")) - if (!$util.isString(message.file_position)) - return "file_position: string expected"; - return null; - }; - - /** - * Creates a MasterStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof replicationdata.MasterStatus - * @static - * @param {Object.} object Plain object - * @returns {replicationdata.MasterStatus} MasterStatus - */ - MasterStatus.fromObject = function fromObject(object) { - if (object instanceof $root.replicationdata.MasterStatus) - return object; - var message = new $root.replicationdata.MasterStatus(); - if (object.position != null) - message.position = String(object.position); - if (object.file_position != null) - message.file_position = String(object.file_position); - return message; - }; - - /** - * Creates a plain object from a MasterStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof replicationdata.MasterStatus - * @static - * @param {replicationdata.MasterStatus} message MasterStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.position = ""; - object.file_position = ""; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.file_position != null && message.hasOwnProperty("file_position")) - object.file_position = message.file_position; - return object; - }; - - /** - * Converts this MasterStatus to JSON. - * @function toJSON - * @memberof replicationdata.MasterStatus - * @instance - * @returns {Object.} JSON object - */ - MasterStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MasterStatus; - })(); - - return replicationdata; -})(); - -$root.logutil = (function() { - - /** - * Namespace logutil. - * @exports logutil - * @namespace - */ - var logutil = {}; - - /** - * Level enum. - * @name logutil.Level - * @enum {number} - * @property {number} INFO=0 INFO value - * @property {number} WARNING=1 WARNING value - * @property {number} ERROR=2 ERROR value - * @property {number} CONSOLE=3 CONSOLE value - */ - logutil.Level = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INFO"] = 0; - values[valuesById[1] = "WARNING"] = 1; - values[valuesById[2] = "ERROR"] = 2; - values[valuesById[3] = "CONSOLE"] = 3; - return values; - })(); - - logutil.Event = (function() { - - /** - * Properties of an Event. - * @memberof logutil - * @interface IEvent - * @property {vttime.ITime|null} [time] Event time - * @property {logutil.Level|null} [level] Event level - * @property {string|null} [file] Event file - * @property {number|Long|null} [line] Event line - * @property {string|null} [value] Event value - */ - - /** - * Constructs a new Event. - * @memberof logutil - * @classdesc Represents an Event. - * @implements IEvent - * @constructor - * @param {logutil.IEvent=} [properties] Properties to set - */ - function Event(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Event time. - * @member {vttime.ITime|null|undefined} time - * @memberof logutil.Event - * @instance - */ - Event.prototype.time = null; - - /** - * Event level. - * @member {logutil.Level} level - * @memberof logutil.Event - * @instance - */ - Event.prototype.level = 0; - - /** - * Event file. - * @member {string} file - * @memberof logutil.Event - * @instance - */ - Event.prototype.file = ""; - - /** - * Event line. - * @member {number|Long} line - * @memberof logutil.Event - * @instance - */ - Event.prototype.line = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Event value. - * @member {string} value - * @memberof logutil.Event - * @instance - */ - Event.prototype.value = ""; - - /** - * Creates a new Event instance using the specified properties. - * @function create - * @memberof logutil.Event - * @static - * @param {logutil.IEvent=} [properties] Properties to set - * @returns {logutil.Event} Event instance - */ - Event.create = function create(properties) { - return new Event(properties); - }; - - /** - * Encodes the specified Event message. Does not implicitly {@link logutil.Event.verify|verify} messages. - * @function encode - * @memberof logutil.Event - * @static - * @param {logutil.IEvent} message Event message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Event.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.vttime.Time.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.level != null && Object.hasOwnProperty.call(message, "level")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.level); - if (message.file != null && Object.hasOwnProperty.call(message, "file")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.file); - if (message.line != null && Object.hasOwnProperty.call(message, "line")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.line); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.value); - return writer; - }; - - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link logutil.Event.verify|verify} messages. - * @function encodeDelimited - * @memberof logutil.Event - * @static - * @param {logutil.IEvent} message Event message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Event.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Event message from the specified reader or buffer. - * @function decode - * @memberof logutil.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {logutil.Event} Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Event.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.logutil.Event(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 2: - message.level = reader.int32(); - break; - case 3: - message.file = reader.string(); - break; - case 4: - message.line = reader.int64(); - break; - case 5: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Event message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof logutil.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {logutil.Event} Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Event.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Event message. - * @function verify - * @memberof logutil.Event - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Event.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.vttime.Time.verify(message.time); - if (error) - return "time." + error; - } - if (message.level != null && message.hasOwnProperty("level")) - switch (message.level) { - default: - return "level: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.file != null && message.hasOwnProperty("file")) - if (!$util.isString(message.file)) - return "file: string expected"; - if (message.line != null && message.hasOwnProperty("line")) - if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) - return "line: integer|Long expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an Event message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof logutil.Event - * @static - * @param {Object.} object Plain object - * @returns {logutil.Event} Event - */ - Event.fromObject = function fromObject(object) { - if (object instanceof $root.logutil.Event) - return object; - var message = new $root.logutil.Event(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".logutil.Event.time: object expected"); - message.time = $root.vttime.Time.fromObject(object.time); - } - switch (object.level) { - case "INFO": - case 0: - message.level = 0; - break; - case "WARNING": - case 1: - message.level = 1; - break; - case "ERROR": - case 2: - message.level = 2; - break; - case "CONSOLE": - case 3: - message.level = 3; - break; - } - if (object.file != null) - message.file = String(object.file); - if (object.line != null) - if ($util.Long) - (message.line = $util.Long.fromValue(object.line)).unsigned = false; - else if (typeof object.line === "string") - message.line = parseInt(object.line, 10); - else if (typeof object.line === "number") - message.line = object.line; - else if (typeof object.line === "object") - message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an Event message. Also converts values to other types if specified. - * @function toObject - * @memberof logutil.Event - * @static - * @param {logutil.Event} message Event - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Event.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.time = null; - object.level = options.enums === String ? "INFO" : 0; - object.file = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.line = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.line = options.longs === String ? "0" : 0; - object.value = ""; - } - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.vttime.Time.toObject(message.time, options); - if (message.level != null && message.hasOwnProperty("level")) - object.level = options.enums === String ? $root.logutil.Level[message.level] : message.level; - if (message.file != null && message.hasOwnProperty("file")) - object.file = message.file; - if (message.line != null && message.hasOwnProperty("line")) - if (typeof message.line === "number") - object.line = options.longs === String ? String(message.line) : message.line; - else - object.line = options.longs === String ? $util.Long.prototype.toString.call(message.line) : options.longs === Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber() : message.line; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Event to JSON. - * @function toJSON - * @memberof logutil.Event - * @instance - * @returns {Object.} JSON object - */ - Event.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Event; - })(); - - return logutil; -})(); - -$root.vschema = (function() { - - /** - * Namespace vschema. - * @exports vschema - * @namespace - */ - var vschema = {}; - - vschema.RoutingRules = (function() { - - /** - * Properties of a RoutingRules. - * @memberof vschema - * @interface IRoutingRules - * @property {Array.|null} [rules] RoutingRules rules - */ - - /** - * Constructs a new RoutingRules. - * @memberof vschema - * @classdesc Represents a RoutingRules. - * @implements IRoutingRules - * @constructor - * @param {vschema.IRoutingRules=} [properties] Properties to set - */ - function RoutingRules(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RoutingRules rules. - * @member {Array.} rules - * @memberof vschema.RoutingRules - * @instance - */ - RoutingRules.prototype.rules = $util.emptyArray; - - /** - * Creates a new RoutingRules instance using the specified properties. - * @function create - * @memberof vschema.RoutingRules - * @static - * @param {vschema.IRoutingRules=} [properties] Properties to set - * @returns {vschema.RoutingRules} RoutingRules instance - */ - RoutingRules.create = function create(properties) { - return new RoutingRules(properties); - }; - - /** - * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. - * @function encode - * @memberof vschema.RoutingRules - * @static - * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RoutingRules.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.vschema.RoutingRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.RoutingRules - * @static - * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RoutingRules.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RoutingRules message from the specified reader or buffer. - * @function decode - * @memberof vschema.RoutingRules - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.RoutingRules} RoutingRules - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RoutingRules.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.RoutingRules(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.vschema.RoutingRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RoutingRules message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.RoutingRules - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.RoutingRules} RoutingRules - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RoutingRules.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RoutingRules message. - * @function verify - * @memberof vschema.RoutingRules - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RoutingRules.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.vschema.RoutingRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - return null; - }; - - /** - * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.RoutingRules - * @static - * @param {Object.} object Plain object - * @returns {vschema.RoutingRules} RoutingRules - */ - RoutingRules.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.RoutingRules) - return object; - var message = new $root.vschema.RoutingRules(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".vschema.RoutingRules.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".vschema.RoutingRules.rules: object expected"); - message.rules[i] = $root.vschema.RoutingRule.fromObject(object.rules[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.RoutingRules - * @static - * @param {vschema.RoutingRules} message RoutingRules - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RoutingRules.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.vschema.RoutingRule.toObject(message.rules[j], options); - } - return object; - }; - - /** - * Converts this RoutingRules to JSON. - * @function toJSON - * @memberof vschema.RoutingRules - * @instance - * @returns {Object.} JSON object - */ - RoutingRules.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RoutingRules; - })(); - - vschema.RoutingRule = (function() { - - /** - * Properties of a RoutingRule. - * @memberof vschema - * @interface IRoutingRule - * @property {string|null} [from_table] RoutingRule from_table - * @property {Array.|null} [to_tables] RoutingRule to_tables - */ - - /** - * Constructs a new RoutingRule. - * @memberof vschema - * @classdesc Represents a RoutingRule. - * @implements IRoutingRule - * @constructor - * @param {vschema.IRoutingRule=} [properties] Properties to set - */ - function RoutingRule(properties) { - this.to_tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RoutingRule from_table. - * @member {string} from_table - * @memberof vschema.RoutingRule - * @instance - */ - RoutingRule.prototype.from_table = ""; - - /** - * RoutingRule to_tables. - * @member {Array.} to_tables - * @memberof vschema.RoutingRule - * @instance - */ - RoutingRule.prototype.to_tables = $util.emptyArray; - - /** - * Creates a new RoutingRule instance using the specified properties. - * @function create - * @memberof vschema.RoutingRule - * @static - * @param {vschema.IRoutingRule=} [properties] Properties to set - * @returns {vschema.RoutingRule} RoutingRule instance - */ - RoutingRule.create = function create(properties) { - return new RoutingRule(properties); - }; - - /** - * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. - * @function encode - * @memberof vschema.RoutingRule - * @static - * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RoutingRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.from_table != null && Object.hasOwnProperty.call(message, "from_table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_table); - if (message.to_tables != null && message.to_tables.length) - for (var i = 0; i < message.to_tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.to_tables[i]); - return writer; - }; - - /** - * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.RoutingRule - * @static - * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RoutingRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RoutingRule message from the specified reader or buffer. - * @function decode - * @memberof vschema.RoutingRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.RoutingRule} RoutingRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RoutingRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.RoutingRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.from_table = reader.string(); - break; - case 2: - if (!(message.to_tables && message.to_tables.length)) - message.to_tables = []; - message.to_tables.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RoutingRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.RoutingRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.RoutingRule} RoutingRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RoutingRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RoutingRule message. - * @function verify - * @memberof vschema.RoutingRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RoutingRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.from_table != null && message.hasOwnProperty("from_table")) - if (!$util.isString(message.from_table)) - return "from_table: string expected"; - if (message.to_tables != null && message.hasOwnProperty("to_tables")) { - if (!Array.isArray(message.to_tables)) - return "to_tables: array expected"; - for (var i = 0; i < message.to_tables.length; ++i) - if (!$util.isString(message.to_tables[i])) - return "to_tables: string[] expected"; - } - return null; - }; - - /** - * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.RoutingRule - * @static - * @param {Object.} object Plain object - * @returns {vschema.RoutingRule} RoutingRule - */ - RoutingRule.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.RoutingRule) - return object; - var message = new $root.vschema.RoutingRule(); - if (object.from_table != null) - message.from_table = String(object.from_table); - if (object.to_tables) { - if (!Array.isArray(object.to_tables)) - throw TypeError(".vschema.RoutingRule.to_tables: array expected"); - message.to_tables = []; - for (var i = 0; i < object.to_tables.length; ++i) - message.to_tables[i] = String(object.to_tables[i]); - } - return message; - }; - - /** - * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.RoutingRule - * @static - * @param {vschema.RoutingRule} message RoutingRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RoutingRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.to_tables = []; - if (options.defaults) - object.from_table = ""; - if (message.from_table != null && message.hasOwnProperty("from_table")) - object.from_table = message.from_table; - if (message.to_tables && message.to_tables.length) { - object.to_tables = []; - for (var j = 0; j < message.to_tables.length; ++j) - object.to_tables[j] = message.to_tables[j]; - } - return object; - }; - - /** - * Converts this RoutingRule to JSON. - * @function toJSON - * @memberof vschema.RoutingRule - * @instance - * @returns {Object.} JSON object - */ - RoutingRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RoutingRule; - })(); - - vschema.Keyspace = (function() { - - /** - * Properties of a Keyspace. - * @memberof vschema - * @interface IKeyspace - * @property {boolean|null} [sharded] Keyspace sharded - * @property {Object.|null} [vindexes] Keyspace vindexes - * @property {Object.|null} [tables] Keyspace tables - * @property {boolean|null} [require_explicit_routing] Keyspace require_explicit_routing - */ - - /** - * Constructs a new Keyspace. - * @memberof vschema - * @classdesc Represents a Keyspace. - * @implements IKeyspace - * @constructor - * @param {vschema.IKeyspace=} [properties] Properties to set - */ - function Keyspace(properties) { - this.vindexes = {}; - this.tables = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Keyspace sharded. - * @member {boolean} sharded - * @memberof vschema.Keyspace - * @instance - */ - Keyspace.prototype.sharded = false; - - /** - * Keyspace vindexes. - * @member {Object.} vindexes - * @memberof vschema.Keyspace - * @instance - */ - Keyspace.prototype.vindexes = $util.emptyObject; - - /** - * Keyspace tables. - * @member {Object.} tables - * @memberof vschema.Keyspace - * @instance - */ - Keyspace.prototype.tables = $util.emptyObject; - - /** - * Keyspace require_explicit_routing. - * @member {boolean} require_explicit_routing - * @memberof vschema.Keyspace - * @instance - */ - Keyspace.prototype.require_explicit_routing = false; - - /** - * Creates a new Keyspace instance using the specified properties. - * @function create - * @memberof vschema.Keyspace - * @static - * @param {vschema.IKeyspace=} [properties] Properties to set - * @returns {vschema.Keyspace} Keyspace instance - */ - Keyspace.create = function create(properties) { - return new Keyspace(properties); - }; - - /** - * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. - * @function encode - * @memberof vschema.Keyspace - * @static - * @param {vschema.IKeyspace} message Keyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Keyspace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sharded != null && Object.hasOwnProperty.call(message, "sharded")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sharded); - if (message.vindexes != null && Object.hasOwnProperty.call(message, "vindexes")) - for (var keys = Object.keys(message.vindexes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.Vindex.encode(message.vindexes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) - for (var keys = Object.keys(message.tables), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.Table.encode(message.tables[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.require_explicit_routing != null && Object.hasOwnProperty.call(message, "require_explicit_routing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.require_explicit_routing); - return writer; - }; - - /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.Keyspace - * @static - * @param {vschema.IKeyspace} message Keyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Keyspace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Keyspace message from the specified reader or buffer. - * @function decode - * @memberof vschema.Keyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.Keyspace} Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Keyspace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Keyspace(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sharded = reader.bool(); - break; - case 2: - if (message.vindexes === $util.emptyObject) - message.vindexes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.Vindex.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.vindexes[key] = value; - break; - case 3: - if (message.tables === $util.emptyObject) - message.tables = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.Table.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tables[key] = value; - break; - case 4: - message.require_explicit_routing = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.Keyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Keyspace} Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Keyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Keyspace message. - * @function verify - * @memberof vschema.Keyspace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Keyspace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sharded != null && message.hasOwnProperty("sharded")) - if (typeof message.sharded !== "boolean") - return "sharded: boolean expected"; - if (message.vindexes != null && message.hasOwnProperty("vindexes")) { - if (!$util.isObject(message.vindexes)) - return "vindexes: object expected"; - var key = Object.keys(message.vindexes); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.Vindex.verify(message.vindexes[key[i]]); - if (error) - return "vindexes." + error; - } - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!$util.isObject(message.tables)) - return "tables: object expected"; - var key = Object.keys(message.tables); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.Table.verify(message.tables[key[i]]); - if (error) - return "tables." + error; - } - } - if (message.require_explicit_routing != null && message.hasOwnProperty("require_explicit_routing")) - if (typeof message.require_explicit_routing !== "boolean") - return "require_explicit_routing: boolean expected"; - return null; - }; - - /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.Keyspace - * @static - * @param {Object.} object Plain object - * @returns {vschema.Keyspace} Keyspace - */ - Keyspace.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Keyspace) - return object; - var message = new $root.vschema.Keyspace(); - if (object.sharded != null) - message.sharded = Boolean(object.sharded); - if (object.vindexes) { - if (typeof object.vindexes !== "object") - throw TypeError(".vschema.Keyspace.vindexes: object expected"); - message.vindexes = {}; - for (var keys = Object.keys(object.vindexes), i = 0; i < keys.length; ++i) { - if (typeof object.vindexes[keys[i]] !== "object") - throw TypeError(".vschema.Keyspace.vindexes: object expected"); - message.vindexes[keys[i]] = $root.vschema.Vindex.fromObject(object.vindexes[keys[i]]); - } - } - if (object.tables) { - if (typeof object.tables !== "object") - throw TypeError(".vschema.Keyspace.tables: object expected"); - message.tables = {}; - for (var keys = Object.keys(object.tables), i = 0; i < keys.length; ++i) { - if (typeof object.tables[keys[i]] !== "object") - throw TypeError(".vschema.Keyspace.tables: object expected"); - message.tables[keys[i]] = $root.vschema.Table.fromObject(object.tables[keys[i]]); - } - } - if (object.require_explicit_routing != null) - message.require_explicit_routing = Boolean(object.require_explicit_routing); - return message; - }; - - /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.Keyspace - * @static - * @param {vschema.Keyspace} message Keyspace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Keyspace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.vindexes = {}; - object.tables = {}; - } - if (options.defaults) { - object.sharded = false; - object.require_explicit_routing = false; - } - if (message.sharded != null && message.hasOwnProperty("sharded")) - object.sharded = message.sharded; - var keys2; - if (message.vindexes && (keys2 = Object.keys(message.vindexes)).length) { - object.vindexes = {}; - for (var j = 0; j < keys2.length; ++j) - object.vindexes[keys2[j]] = $root.vschema.Vindex.toObject(message.vindexes[keys2[j]], options); - } - if (message.tables && (keys2 = Object.keys(message.tables)).length) { - object.tables = {}; - for (var j = 0; j < keys2.length; ++j) - object.tables[keys2[j]] = $root.vschema.Table.toObject(message.tables[keys2[j]], options); - } - if (message.require_explicit_routing != null && message.hasOwnProperty("require_explicit_routing")) - object.require_explicit_routing = message.require_explicit_routing; - return object; - }; - - /** - * Converts this Keyspace to JSON. - * @function toJSON - * @memberof vschema.Keyspace - * @instance - * @returns {Object.} JSON object - */ - Keyspace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Keyspace; - })(); - - vschema.Vindex = (function() { - - /** - * Properties of a Vindex. - * @memberof vschema - * @interface IVindex - * @property {string|null} [type] Vindex type - * @property {Object.|null} [params] Vindex params - * @property {string|null} [owner] Vindex owner - */ - - /** - * Constructs a new Vindex. - * @memberof vschema - * @classdesc Represents a Vindex. - * @implements IVindex - * @constructor - * @param {vschema.IVindex=} [properties] Properties to set - */ - function Vindex(properties) { - this.params = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Vindex type. - * @member {string} type - * @memberof vschema.Vindex - * @instance - */ - Vindex.prototype.type = ""; - - /** - * Vindex params. - * @member {Object.} params - * @memberof vschema.Vindex - * @instance - */ - Vindex.prototype.params = $util.emptyObject; - - /** - * Vindex owner. - * @member {string} owner - * @memberof vschema.Vindex - * @instance - */ - Vindex.prototype.owner = ""; - - /** - * Creates a new Vindex instance using the specified properties. - * @function create - * @memberof vschema.Vindex - * @static - * @param {vschema.IVindex=} [properties] Properties to set - * @returns {vschema.Vindex} Vindex instance - */ - Vindex.create = function create(properties) { - return new Vindex(properties); - }; - - /** - * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. - * @function encode - * @memberof vschema.Vindex - * @static - * @param {vschema.IVindex} message Vindex message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Vindex.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.params[keys[i]]).ldelim(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.owner); - return writer; - }; - - /** - * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.Vindex - * @static - * @param {vschema.IVindex} message Vindex message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Vindex.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Vindex message from the specified reader or buffer. - * @function decode - * @memberof vschema.Vindex - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.Vindex} Vindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Vindex.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Vindex(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (message.params === $util.emptyObject) - message.params = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.params[key] = value; - break; - case 3: - message.owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Vindex message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.Vindex - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Vindex} Vindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Vindex.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Vindex message. - * @function verify - * @memberof vschema.Vindex - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Vindex.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.params[key[i]])) - return "params: string{k:string} expected"; - } - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - return null; - }; - - /** - * Creates a Vindex message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.Vindex - * @static - * @param {Object.} object Plain object - * @returns {vschema.Vindex} Vindex - */ - Vindex.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Vindex) - return object; - var message = new $root.vschema.Vindex(); - if (object.type != null) - message.type = String(object.type); - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".vschema.Vindex.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) - message.params[keys[i]] = String(object.params[keys[i]]); - } - if (object.owner != null) - message.owner = String(object.owner); - return message; - }; - - /** - * Creates a plain object from a Vindex message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.Vindex - * @static - * @param {vschema.Vindex} message Vindex - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vindex.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.params = {}; - if (options.defaults) { - object.type = ""; - object.owner = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = message.params[keys2[j]]; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - return object; - }; - - /** - * Converts this Vindex to JSON. - * @function toJSON - * @memberof vschema.Vindex - * @instance - * @returns {Object.} JSON object - */ - Vindex.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vindex; - })(); - - vschema.Table = (function() { - - /** - * Properties of a Table. - * @memberof vschema - * @interface ITable - * @property {string|null} [type] Table type - * @property {Array.|null} [column_vindexes] Table column_vindexes - * @property {vschema.IAutoIncrement|null} [auto_increment] Table auto_increment - * @property {Array.|null} [columns] Table columns - * @property {string|null} [pinned] Table pinned - * @property {boolean|null} [column_list_authoritative] Table column_list_authoritative - */ - - /** - * Constructs a new Table. - * @memberof vschema - * @classdesc Represents a Table. - * @implements ITable - * @constructor - * @param {vschema.ITable=} [properties] Properties to set - */ - function Table(properties) { - this.column_vindexes = []; - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Table type. - * @member {string} type - * @memberof vschema.Table - * @instance - */ - Table.prototype.type = ""; - - /** - * Table column_vindexes. - * @member {Array.} column_vindexes - * @memberof vschema.Table - * @instance - */ - Table.prototype.column_vindexes = $util.emptyArray; - - /** - * Table auto_increment. - * @member {vschema.IAutoIncrement|null|undefined} auto_increment - * @memberof vschema.Table - * @instance - */ - Table.prototype.auto_increment = null; - - /** - * Table columns. - * @member {Array.} columns - * @memberof vschema.Table - * @instance - */ - Table.prototype.columns = $util.emptyArray; - - /** - * Table pinned. - * @member {string} pinned - * @memberof vschema.Table - * @instance - */ - Table.prototype.pinned = ""; - - /** - * Table column_list_authoritative. - * @member {boolean} column_list_authoritative - * @memberof vschema.Table - * @instance - */ - Table.prototype.column_list_authoritative = false; - - /** - * Creates a new Table instance using the specified properties. - * @function create - * @memberof vschema.Table - * @static - * @param {vschema.ITable=} [properties] Properties to set - * @returns {vschema.Table} Table instance - */ - Table.create = function create(properties) { - return new Table(properties); - }; - - /** - * Encodes the specified Table message. Does not implicitly {@link vschema.Table.verify|verify} messages. - * @function encode - * @memberof vschema.Table - * @static - * @param {vschema.ITable} message Table message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Table.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.column_vindexes != null && message.column_vindexes.length) - for (var i = 0; i < message.column_vindexes.length; ++i) - $root.vschema.ColumnVindex.encode(message.column_vindexes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.auto_increment != null && Object.hasOwnProperty.call(message, "auto_increment")) - $root.vschema.AutoIncrement.encode(message.auto_increment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.vschema.Column.encode(message.columns[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pinned); - if (message.column_list_authoritative != null && Object.hasOwnProperty.call(message, "column_list_authoritative")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.column_list_authoritative); - return writer; - }; - - /** - * Encodes the specified Table message, length delimited. Does not implicitly {@link vschema.Table.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.Table - * @static - * @param {vschema.ITable} message Table message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Table.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Table message from the specified reader or buffer. - * @function decode - * @memberof vschema.Table - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.Table} Table - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Table.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Table(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.column_vindexes && message.column_vindexes.length)) - message.column_vindexes = []; - message.column_vindexes.push($root.vschema.ColumnVindex.decode(reader, reader.uint32())); - break; - case 3: - message.auto_increment = $root.vschema.AutoIncrement.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.vschema.Column.decode(reader, reader.uint32())); - break; - case 5: - message.pinned = reader.string(); - break; - case 6: - message.column_list_authoritative = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Table message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.Table - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Table} Table - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Table.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Table message. - * @function verify - * @memberof vschema.Table - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Table.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.column_vindexes != null && message.hasOwnProperty("column_vindexes")) { - if (!Array.isArray(message.column_vindexes)) - return "column_vindexes: array expected"; - for (var i = 0; i < message.column_vindexes.length; ++i) { - var error = $root.vschema.ColumnVindex.verify(message.column_vindexes[i]); - if (error) - return "column_vindexes." + error; - } - } - if (message.auto_increment != null && message.hasOwnProperty("auto_increment")) { - var error = $root.vschema.AutoIncrement.verify(message.auto_increment); - if (error) - return "auto_increment." + error; - } - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.vschema.Column.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - if (message.pinned != null && message.hasOwnProperty("pinned")) - if (!$util.isString(message.pinned)) - return "pinned: string expected"; - if (message.column_list_authoritative != null && message.hasOwnProperty("column_list_authoritative")) - if (typeof message.column_list_authoritative !== "boolean") - return "column_list_authoritative: boolean expected"; - return null; - }; - - /** - * Creates a Table message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.Table - * @static - * @param {Object.} object Plain object - * @returns {vschema.Table} Table - */ - Table.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Table) - return object; - var message = new $root.vschema.Table(); - if (object.type != null) - message.type = String(object.type); - if (object.column_vindexes) { - if (!Array.isArray(object.column_vindexes)) - throw TypeError(".vschema.Table.column_vindexes: array expected"); - message.column_vindexes = []; - for (var i = 0; i < object.column_vindexes.length; ++i) { - if (typeof object.column_vindexes[i] !== "object") - throw TypeError(".vschema.Table.column_vindexes: object expected"); - message.column_vindexes[i] = $root.vschema.ColumnVindex.fromObject(object.column_vindexes[i]); - } - } - if (object.auto_increment != null) { - if (typeof object.auto_increment !== "object") - throw TypeError(".vschema.Table.auto_increment: object expected"); - message.auto_increment = $root.vschema.AutoIncrement.fromObject(object.auto_increment); - } - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".vschema.Table.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".vschema.Table.columns: object expected"); - message.columns[i] = $root.vschema.Column.fromObject(object.columns[i]); - } - } - if (object.pinned != null) - message.pinned = String(object.pinned); - if (object.column_list_authoritative != null) - message.column_list_authoritative = Boolean(object.column_list_authoritative); - return message; - }; - - /** - * Creates a plain object from a Table message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.Table - * @static - * @param {vschema.Table} message Table - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Table.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.column_vindexes = []; - object.columns = []; - } - if (options.defaults) { - object.type = ""; - object.auto_increment = null; - object.pinned = ""; - object.column_list_authoritative = false; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.column_vindexes && message.column_vindexes.length) { - object.column_vindexes = []; - for (var j = 0; j < message.column_vindexes.length; ++j) - object.column_vindexes[j] = $root.vschema.ColumnVindex.toObject(message.column_vindexes[j], options); - } - if (message.auto_increment != null && message.hasOwnProperty("auto_increment")) - object.auto_increment = $root.vschema.AutoIncrement.toObject(message.auto_increment, options); - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.vschema.Column.toObject(message.columns[j], options); - } - if (message.pinned != null && message.hasOwnProperty("pinned")) - object.pinned = message.pinned; - if (message.column_list_authoritative != null && message.hasOwnProperty("column_list_authoritative")) - object.column_list_authoritative = message.column_list_authoritative; - return object; - }; - - /** - * Converts this Table to JSON. - * @function toJSON - * @memberof vschema.Table - * @instance - * @returns {Object.} JSON object - */ - Table.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Table; - })(); - - vschema.ColumnVindex = (function() { - - /** - * Properties of a ColumnVindex. - * @memberof vschema - * @interface IColumnVindex - * @property {string|null} [column] ColumnVindex column - * @property {string|null} [name] ColumnVindex name - * @property {Array.|null} [columns] ColumnVindex columns - */ - - /** - * Constructs a new ColumnVindex. - * @memberof vschema - * @classdesc Represents a ColumnVindex. - * @implements IColumnVindex - * @constructor - * @param {vschema.IColumnVindex=} [properties] Properties to set - */ - function ColumnVindex(properties) { - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ColumnVindex column. - * @member {string} column - * @memberof vschema.ColumnVindex - * @instance - */ - ColumnVindex.prototype.column = ""; - - /** - * ColumnVindex name. - * @member {string} name - * @memberof vschema.ColumnVindex - * @instance - */ - ColumnVindex.prototype.name = ""; - - /** - * ColumnVindex columns. - * @member {Array.} columns - * @memberof vschema.ColumnVindex - * @instance - */ - ColumnVindex.prototype.columns = $util.emptyArray; - - /** - * Creates a new ColumnVindex instance using the specified properties. - * @function create - * @memberof vschema.ColumnVindex - * @static - * @param {vschema.IColumnVindex=} [properties] Properties to set - * @returns {vschema.ColumnVindex} ColumnVindex instance - */ - ColumnVindex.create = function create(properties) { - return new ColumnVindex(properties); - }; - - /** - * Encodes the specified ColumnVindex message. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. - * @function encode - * @memberof vschema.ColumnVindex - * @static - * @param {vschema.IColumnVindex} message ColumnVindex message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnVindex.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.columns[i]); - return writer; - }; - - /** - * Encodes the specified ColumnVindex message, length delimited. Does not implicitly {@link vschema.ColumnVindex.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.ColumnVindex - * @static - * @param {vschema.IColumnVindex} message ColumnVindex message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnVindex.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ColumnVindex message from the specified reader or buffer. - * @function decode - * @memberof vschema.ColumnVindex - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.ColumnVindex} ColumnVindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnVindex.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.ColumnVindex(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.column = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ColumnVindex message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.ColumnVindex - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.ColumnVindex} ColumnVindex - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnVindex.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ColumnVindex message. - * @function verify - * @memberof vschema.ColumnVindex - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnVindex.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) - if (!$util.isString(message.columns[i])) - return "columns: string[] expected"; - } - return null; - }; - - /** - * Creates a ColumnVindex message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.ColumnVindex - * @static - * @param {Object.} object Plain object - * @returns {vschema.ColumnVindex} ColumnVindex - */ - ColumnVindex.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.ColumnVindex) - return object; - var message = new $root.vschema.ColumnVindex(); - if (object.column != null) - message.column = String(object.column); - if (object.name != null) - message.name = String(object.name); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".vschema.ColumnVindex.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) - message.columns[i] = String(object.columns[i]); - } - return message; - }; - - /** - * Creates a plain object from a ColumnVindex message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.ColumnVindex - * @static - * @param {vschema.ColumnVindex} message ColumnVindex - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ColumnVindex.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (options.defaults) { - object.column = ""; - object.name = ""; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = message.columns[j]; - } - return object; - }; - - /** - * Converts this ColumnVindex to JSON. - * @function toJSON - * @memberof vschema.ColumnVindex - * @instance - * @returns {Object.} JSON object - */ - ColumnVindex.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ColumnVindex; - })(); - - vschema.AutoIncrement = (function() { - - /** - * Properties of an AutoIncrement. - * @memberof vschema - * @interface IAutoIncrement - * @property {string|null} [column] AutoIncrement column - * @property {string|null} [sequence] AutoIncrement sequence - */ - - /** - * Constructs a new AutoIncrement. - * @memberof vschema - * @classdesc Represents an AutoIncrement. - * @implements IAutoIncrement - * @constructor - * @param {vschema.IAutoIncrement=} [properties] Properties to set - */ - function AutoIncrement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoIncrement column. - * @member {string} column - * @memberof vschema.AutoIncrement - * @instance - */ - AutoIncrement.prototype.column = ""; - - /** - * AutoIncrement sequence. - * @member {string} sequence - * @memberof vschema.AutoIncrement - * @instance - */ - AutoIncrement.prototype.sequence = ""; - - /** - * Creates a new AutoIncrement instance using the specified properties. - * @function create - * @memberof vschema.AutoIncrement - * @static - * @param {vschema.IAutoIncrement=} [properties] Properties to set - * @returns {vschema.AutoIncrement} AutoIncrement instance - */ - AutoIncrement.create = function create(properties) { - return new AutoIncrement(properties); - }; - - /** - * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. - * @function encode - * @memberof vschema.AutoIncrement - * @static - * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoIncrement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sequence); - return writer; - }; - - /** - * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.AutoIncrement - * @static - * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoIncrement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoIncrement message from the specified reader or buffer. - * @function decode - * @memberof vschema.AutoIncrement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.AutoIncrement} AutoIncrement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoIncrement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.AutoIncrement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.column = reader.string(); - break; - case 2: - message.sequence = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.AutoIncrement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.AutoIncrement} AutoIncrement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoIncrement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoIncrement message. - * @function verify - * @memberof vschema.AutoIncrement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoIncrement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isString(message.sequence)) - return "sequence: string expected"; - return null; - }; - - /** - * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.AutoIncrement - * @static - * @param {Object.} object Plain object - * @returns {vschema.AutoIncrement} AutoIncrement - */ - AutoIncrement.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.AutoIncrement) - return object; - var message = new $root.vschema.AutoIncrement(); - if (object.column != null) - message.column = String(object.column); - if (object.sequence != null) - message.sequence = String(object.sequence); - return message; - }; - - /** - * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.AutoIncrement - * @static - * @param {vschema.AutoIncrement} message AutoIncrement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoIncrement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.sequence = ""; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.sequence != null && message.hasOwnProperty("sequence")) - object.sequence = message.sequence; - return object; - }; - - /** - * Converts this AutoIncrement to JSON. - * @function toJSON - * @memberof vschema.AutoIncrement - * @instance - * @returns {Object.} JSON object - */ - AutoIncrement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AutoIncrement; - })(); - - vschema.Column = (function() { - - /** - * Properties of a Column. - * @memberof vschema - * @interface IColumn - * @property {string|null} [name] Column name - * @property {query.Type|null} [type] Column type - */ - - /** - * Constructs a new Column. - * @memberof vschema - * @classdesc Represents a Column. - * @implements IColumn - * @constructor - * @param {vschema.IColumn=} [properties] Properties to set - */ - function Column(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Column name. - * @member {string} name - * @memberof vschema.Column - * @instance - */ - Column.prototype.name = ""; - - /** - * Column type. - * @member {query.Type} type - * @memberof vschema.Column - * @instance - */ - Column.prototype.type = 0; - - /** - * Creates a new Column instance using the specified properties. - * @function create - * @memberof vschema.Column - * @static - * @param {vschema.IColumn=} [properties] Properties to set - * @returns {vschema.Column} Column instance - */ - Column.create = function create(properties) { - return new Column(properties); - }; - - /** - * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. - * @function encode - * @memberof vschema.Column - * @static - * @param {vschema.IColumn} message Column message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Column.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.Column - * @static - * @param {vschema.IColumn} message Column message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Column.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Column message from the specified reader or buffer. - * @function decode - * @memberof vschema.Column - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.Column} Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Column.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.Column(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Column message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.Column - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.Column} Column - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Column.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Column message. - * @function verify - * @memberof vschema.Column - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Column.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 257: - case 770: - case 259: - case 772: - case 261: - case 774: - case 263: - case 776: - case 265: - case 778: - case 1035: - case 1036: - case 2061: - case 2062: - case 2063: - case 2064: - case 785: - case 18: - case 6163: - case 10260: - case 6165: - case 10262: - case 6167: - case 10264: - case 2073: - case 2074: - case 2075: - case 28: - case 2077: - case 2078: - case 31: - break; - } - return null; - }; - - /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.Column - * @static - * @param {Object.} object Plain object - * @returns {vschema.Column} Column - */ - Column.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.Column) - return object; - var message = new $root.vschema.Column(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "NULL_TYPE": - case 0: - message.type = 0; - break; - case "INT8": - case 257: - message.type = 257; - break; - case "UINT8": - case 770: - message.type = 770; - break; - case "INT16": - case 259: - message.type = 259; - break; - case "UINT16": - case 772: - message.type = 772; - break; - case "INT24": - case 261: - message.type = 261; - break; - case "UINT24": - case 774: - message.type = 774; - break; - case "INT32": - case 263: - message.type = 263; - break; - case "UINT32": - case 776: - message.type = 776; - break; - case "INT64": - case 265: - message.type = 265; - break; - case "UINT64": - case 778: - message.type = 778; - break; - case "FLOAT32": - case 1035: - message.type = 1035; - break; - case "FLOAT64": - case 1036: - message.type = 1036; - break; - case "TIMESTAMP": - case 2061: - message.type = 2061; - break; - case "DATE": - case 2062: - message.type = 2062; - break; - case "TIME": - case 2063: - message.type = 2063; - break; - case "DATETIME": - case 2064: - message.type = 2064; - break; - case "YEAR": - case 785: - message.type = 785; - break; - case "DECIMAL": - case 18: - message.type = 18; - break; - case "TEXT": - case 6163: - message.type = 6163; - break; - case "BLOB": - case 10260: - message.type = 10260; - break; - case "VARCHAR": - case 6165: - message.type = 6165; - break; - case "VARBINARY": - case 10262: - message.type = 10262; - break; - case "CHAR": - case 6167: - message.type = 6167; - break; - case "BINARY": - case 10264: - message.type = 10264; - break; - case "BIT": - case 2073: - message.type = 2073; - break; - case "ENUM": - case 2074: - message.type = 2074; - break; - case "SET": - case 2075: - message.type = 2075; - break; - case "TUPLE": - case 28: - message.type = 28; - break; - case "GEOMETRY": - case 2077: - message.type = 2077; - break; - case "JSON": - case 2078: - message.type = 2078; - break; - case "EXPRESSION": - case 31: - message.type = 31; - break; - } - return message; - }; - - /** - * Creates a plain object from a Column message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.Column - * @static - * @param {vschema.Column} message Column - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Column.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "NULL_TYPE" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.query.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this Column to JSON. - * @function toJSON - * @memberof vschema.Column - * @instance - * @returns {Object.} JSON object - */ - Column.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Column; - })(); - - vschema.SrvVSchema = (function() { - - /** - * Properties of a SrvVSchema. - * @memberof vschema - * @interface ISrvVSchema - * @property {Object.|null} [keyspaces] SrvVSchema keyspaces - * @property {vschema.IRoutingRules|null} [routing_rules] SrvVSchema routing_rules - */ - - /** - * Constructs a new SrvVSchema. - * @memberof vschema - * @classdesc Represents a SrvVSchema. - * @implements ISrvVSchema - * @constructor - * @param {vschema.ISrvVSchema=} [properties] Properties to set - */ - function SrvVSchema(properties) { - this.keyspaces = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SrvVSchema keyspaces. - * @member {Object.} keyspaces - * @memberof vschema.SrvVSchema - * @instance - */ - SrvVSchema.prototype.keyspaces = $util.emptyObject; - - /** - * SrvVSchema routing_rules. - * @member {vschema.IRoutingRules|null|undefined} routing_rules - * @memberof vschema.SrvVSchema - * @instance - */ - SrvVSchema.prototype.routing_rules = null; - - /** - * Creates a new SrvVSchema instance using the specified properties. - * @function create - * @memberof vschema.SrvVSchema - * @static - * @param {vschema.ISrvVSchema=} [properties] Properties to set - * @returns {vschema.SrvVSchema} SrvVSchema instance - */ - SrvVSchema.create = function create(properties) { - return new SrvVSchema(properties); - }; - - /** - * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. - * @function encode - * @memberof vschema.SrvVSchema - * @static - * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SrvVSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspaces != null && Object.hasOwnProperty.call(message, "keyspaces")) - for (var keys = Object.keys(message.keyspaces), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vschema.Keyspace.encode(message.keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.routing_rules != null && Object.hasOwnProperty.call(message, "routing_rules")) - $root.vschema.RoutingRules.encode(message.routing_rules, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof vschema.SrvVSchema - * @static - * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SrvVSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SrvVSchema message from the specified reader or buffer. - * @function decode - * @memberof vschema.SrvVSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vschema.SrvVSchema} SrvVSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SrvVSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vschema.SrvVSchema(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.keyspaces === $util.emptyObject) - message.keyspaces = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vschema.Keyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.keyspaces[key] = value; - break; - case 2: - message.routing_rules = $root.vschema.RoutingRules.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vschema.SrvVSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vschema.SrvVSchema} SrvVSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SrvVSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SrvVSchema message. - * @function verify - * @memberof vschema.SrvVSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SrvVSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { - if (!$util.isObject(message.keyspaces)) - return "keyspaces: object expected"; - var key = Object.keys(message.keyspaces); - for (var i = 0; i < key.length; ++i) { - var error = $root.vschema.Keyspace.verify(message.keyspaces[key[i]]); - if (error) - return "keyspaces." + error; - } - } - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) { - var error = $root.vschema.RoutingRules.verify(message.routing_rules); - if (error) - return "routing_rules." + error; - } - return null; - }; - - /** - * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vschema.SrvVSchema - * @static - * @param {Object.} object Plain object - * @returns {vschema.SrvVSchema} SrvVSchema - */ - SrvVSchema.fromObject = function fromObject(object) { - if (object instanceof $root.vschema.SrvVSchema) - return object; - var message = new $root.vschema.SrvVSchema(); - if (object.keyspaces) { - if (typeof object.keyspaces !== "object") - throw TypeError(".vschema.SrvVSchema.keyspaces: object expected"); - message.keyspaces = {}; - for (var keys = Object.keys(object.keyspaces), i = 0; i < keys.length; ++i) { - if (typeof object.keyspaces[keys[i]] !== "object") - throw TypeError(".vschema.SrvVSchema.keyspaces: object expected"); - message.keyspaces[keys[i]] = $root.vschema.Keyspace.fromObject(object.keyspaces[keys[i]]); - } - } - if (object.routing_rules != null) { - if (typeof object.routing_rules !== "object") - throw TypeError(".vschema.SrvVSchema.routing_rules: object expected"); - message.routing_rules = $root.vschema.RoutingRules.fromObject(object.routing_rules); - } - return message; - }; - - /** - * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof vschema.SrvVSchema - * @static - * @param {vschema.SrvVSchema} message SrvVSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SrvVSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.keyspaces = {}; - if (options.defaults) - object.routing_rules = null; - var keys2; - if (message.keyspaces && (keys2 = Object.keys(message.keyspaces)).length) { - object.keyspaces = {}; - for (var j = 0; j < keys2.length; ++j) - object.keyspaces[keys2[j]] = $root.vschema.Keyspace.toObject(message.keyspaces[keys2[j]], options); - } - if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) - object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); - return object; - }; - - /** - * Converts this SrvVSchema to JSON. - * @function toJSON - * @memberof vschema.SrvVSchema - * @instance - * @returns {Object.} JSON object - */ - SrvVSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SrvVSchema; - })(); - - return vschema; -})(); - -$root.vtctldata = (function() { - - /** - * Namespace vtctldata. - * @exports vtctldata - * @namespace - */ - var vtctldata = {}; - - vtctldata.ExecuteVtctlCommandRequest = (function() { - - /** - * Properties of an ExecuteVtctlCommandRequest. - * @memberof vtctldata - * @interface IExecuteVtctlCommandRequest - * @property {Array.|null} [args] ExecuteVtctlCommandRequest args - * @property {number|Long|null} [action_timeout] ExecuteVtctlCommandRequest action_timeout - */ - - /** - * Constructs a new ExecuteVtctlCommandRequest. - * @memberof vtctldata - * @classdesc Represents an ExecuteVtctlCommandRequest. - * @implements IExecuteVtctlCommandRequest - * @constructor - * @param {vtctldata.IExecuteVtctlCommandRequest=} [properties] Properties to set - */ - function ExecuteVtctlCommandRequest(properties) { - this.args = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteVtctlCommandRequest args. - * @member {Array.} args - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @instance - */ - ExecuteVtctlCommandRequest.prototype.args = $util.emptyArray; - - /** - * ExecuteVtctlCommandRequest action_timeout. - * @member {number|Long} action_timeout - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @instance - */ - ExecuteVtctlCommandRequest.prototype.action_timeout = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ExecuteVtctlCommandRequest instance using the specified properties. - * @function create - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {vtctldata.IExecuteVtctlCommandRequest=} [properties] Properties to set - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest instance - */ - ExecuteVtctlCommandRequest.create = function create(properties) { - return new ExecuteVtctlCommandRequest(properties); - }; - - /** - * Encodes the specified ExecuteVtctlCommandRequest message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {vtctldata.IExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteVtctlCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.args[i]); - if (message.action_timeout != null && Object.hasOwnProperty.call(message, "action_timeout")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.action_timeout); - return writer; - }; - - /** - * Encodes the specified ExecuteVtctlCommandRequest message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {vtctldata.IExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteVtctlCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteVtctlCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteVtctlCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - case 2: - message.action_timeout = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteVtctlCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteVtctlCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteVtctlCommandRequest message. - * @function verify - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteVtctlCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; - } - if (message.action_timeout != null && message.hasOwnProperty("action_timeout")) - if (!$util.isInteger(message.action_timeout) && !(message.action_timeout && $util.isInteger(message.action_timeout.low) && $util.isInteger(message.action_timeout.high))) - return "action_timeout: integer|Long expected"; - return null; - }; - - /** - * Creates an ExecuteVtctlCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteVtctlCommandRequest} ExecuteVtctlCommandRequest - */ - ExecuteVtctlCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteVtctlCommandRequest) - return object; - var message = new $root.vtctldata.ExecuteVtctlCommandRequest(); - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".vtctldata.ExecuteVtctlCommandRequest.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); - } - if (object.action_timeout != null) - if ($util.Long) - (message.action_timeout = $util.Long.fromValue(object.action_timeout)).unsigned = false; - else if (typeof object.action_timeout === "string") - message.action_timeout = parseInt(object.action_timeout, 10); - else if (typeof object.action_timeout === "number") - message.action_timeout = object.action_timeout; - else if (typeof object.action_timeout === "object") - message.action_timeout = new $util.LongBits(object.action_timeout.low >>> 0, object.action_timeout.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an ExecuteVtctlCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @static - * @param {vtctldata.ExecuteVtctlCommandRequest} message ExecuteVtctlCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteVtctlCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.args = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.action_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.action_timeout = options.longs === String ? "0" : 0; - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; - } - if (message.action_timeout != null && message.hasOwnProperty("action_timeout")) - if (typeof message.action_timeout === "number") - object.action_timeout = options.longs === String ? String(message.action_timeout) : message.action_timeout; - else - object.action_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.action_timeout) : options.longs === Number ? new $util.LongBits(message.action_timeout.low >>> 0, message.action_timeout.high >>> 0).toNumber() : message.action_timeout; - return object; - }; - - /** - * Converts this ExecuteVtctlCommandRequest to JSON. - * @function toJSON - * @memberof vtctldata.ExecuteVtctlCommandRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteVtctlCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteVtctlCommandRequest; - })(); - - vtctldata.ExecuteVtctlCommandResponse = (function() { - - /** - * Properties of an ExecuteVtctlCommandResponse. - * @memberof vtctldata - * @interface IExecuteVtctlCommandResponse - * @property {logutil.IEvent|null} [event] ExecuteVtctlCommandResponse event - */ - - /** - * Constructs a new ExecuteVtctlCommandResponse. - * @memberof vtctldata - * @classdesc Represents an ExecuteVtctlCommandResponse. - * @implements IExecuteVtctlCommandResponse - * @constructor - * @param {vtctldata.IExecuteVtctlCommandResponse=} [properties] Properties to set - */ - function ExecuteVtctlCommandResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteVtctlCommandResponse event. - * @member {logutil.IEvent|null|undefined} event - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @instance - */ - ExecuteVtctlCommandResponse.prototype.event = null; - - /** - * Creates a new ExecuteVtctlCommandResponse instance using the specified properties. - * @function create - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {vtctldata.IExecuteVtctlCommandResponse=} [properties] Properties to set - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse instance - */ - ExecuteVtctlCommandResponse.create = function create(properties) { - return new ExecuteVtctlCommandResponse(properties); - }; - - /** - * Encodes the specified ExecuteVtctlCommandResponse message. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {vtctldata.IExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteVtctlCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.logutil.Event.encode(message.event, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteVtctlCommandResponse message, length delimited. Does not implicitly {@link vtctldata.ExecuteVtctlCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {vtctldata.IExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteVtctlCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteVtctlCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ExecuteVtctlCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.event = $root.logutil.Event.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteVtctlCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteVtctlCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteVtctlCommandResponse message. - * @function verify - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteVtctlCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.event != null && message.hasOwnProperty("event")) { - var error = $root.logutil.Event.verify(message.event); - if (error) - return "event." + error; - } - return null; - }; - - /** - * Creates an ExecuteVtctlCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ExecuteVtctlCommandResponse} ExecuteVtctlCommandResponse - */ - ExecuteVtctlCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ExecuteVtctlCommandResponse) - return object; - var message = new $root.vtctldata.ExecuteVtctlCommandResponse(); - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".vtctldata.ExecuteVtctlCommandResponse.event: object expected"); - message.event = $root.logutil.Event.fromObject(object.event); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteVtctlCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @static - * @param {vtctldata.ExecuteVtctlCommandResponse} message ExecuteVtctlCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteVtctlCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.event = null; - if (message.event != null && message.hasOwnProperty("event")) - object.event = $root.logutil.Event.toObject(message.event, options); - return object; - }; - - /** - * Converts this ExecuteVtctlCommandResponse to JSON. - * @function toJSON - * @memberof vtctldata.ExecuteVtctlCommandResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteVtctlCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExecuteVtctlCommandResponse; - })(); - - vtctldata.TableMaterializeSettings = (function() { - - /** - * Properties of a TableMaterializeSettings. - * @memberof vtctldata - * @interface ITableMaterializeSettings - * @property {string|null} [target_table] TableMaterializeSettings target_table - * @property {string|null} [source_expression] TableMaterializeSettings source_expression - * @property {string|null} [create_ddl] TableMaterializeSettings create_ddl - */ - - /** - * Constructs a new TableMaterializeSettings. - * @memberof vtctldata - * @classdesc Represents a TableMaterializeSettings. - * @implements ITableMaterializeSettings - * @constructor - * @param {vtctldata.ITableMaterializeSettings=} [properties] Properties to set - */ - function TableMaterializeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TableMaterializeSettings target_table. - * @member {string} target_table - * @memberof vtctldata.TableMaterializeSettings - * @instance - */ - TableMaterializeSettings.prototype.target_table = ""; - - /** - * TableMaterializeSettings source_expression. - * @member {string} source_expression - * @memberof vtctldata.TableMaterializeSettings - * @instance - */ - TableMaterializeSettings.prototype.source_expression = ""; - - /** - * TableMaterializeSettings create_ddl. - * @member {string} create_ddl - * @memberof vtctldata.TableMaterializeSettings - * @instance - */ - TableMaterializeSettings.prototype.create_ddl = ""; - - /** - * Creates a new TableMaterializeSettings instance using the specified properties. - * @function create - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {vtctldata.ITableMaterializeSettings=} [properties] Properties to set - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings instance - */ - TableMaterializeSettings.create = function create(properties) { - return new TableMaterializeSettings(properties); - }; - - /** - * Encodes the specified TableMaterializeSettings message. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. - * @function encode - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {vtctldata.ITableMaterializeSettings} message TableMaterializeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableMaterializeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target_table != null && Object.hasOwnProperty.call(message, "target_table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.target_table); - if (message.source_expression != null && Object.hasOwnProperty.call(message, "source_expression")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_expression); - if (message.create_ddl != null && Object.hasOwnProperty.call(message, "create_ddl")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.create_ddl); - return writer; - }; - - /** - * Encodes the specified TableMaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.TableMaterializeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {vtctldata.ITableMaterializeSettings} message TableMaterializeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableMaterializeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableMaterializeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TableMaterializeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.target_table = reader.string(); - break; - case 2: - message.source_expression = reader.string(); - break; - case 3: - message.create_ddl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TableMaterializeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableMaterializeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TableMaterializeSettings message. - * @function verify - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableMaterializeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target_table != null && message.hasOwnProperty("target_table")) - if (!$util.isString(message.target_table)) - return "target_table: string expected"; - if (message.source_expression != null && message.hasOwnProperty("source_expression")) - if (!$util.isString(message.source_expression)) - return "source_expression: string expected"; - if (message.create_ddl != null && message.hasOwnProperty("create_ddl")) - if (!$util.isString(message.create_ddl)) - return "create_ddl: string expected"; - return null; - }; - - /** - * Creates a TableMaterializeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.TableMaterializeSettings} TableMaterializeSettings - */ - TableMaterializeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TableMaterializeSettings) - return object; - var message = new $root.vtctldata.TableMaterializeSettings(); - if (object.target_table != null) - message.target_table = String(object.target_table); - if (object.source_expression != null) - message.source_expression = String(object.source_expression); - if (object.create_ddl != null) - message.create_ddl = String(object.create_ddl); - return message; - }; - - /** - * Creates a plain object from a TableMaterializeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.TableMaterializeSettings - * @static - * @param {vtctldata.TableMaterializeSettings} message TableMaterializeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableMaterializeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target_table = ""; - object.source_expression = ""; - object.create_ddl = ""; - } - if (message.target_table != null && message.hasOwnProperty("target_table")) - object.target_table = message.target_table; - if (message.source_expression != null && message.hasOwnProperty("source_expression")) - object.source_expression = message.source_expression; - if (message.create_ddl != null && message.hasOwnProperty("create_ddl")) - object.create_ddl = message.create_ddl; - return object; - }; - - /** - * Converts this TableMaterializeSettings to JSON. - * @function toJSON - * @memberof vtctldata.TableMaterializeSettings - * @instance - * @returns {Object.} JSON object - */ - TableMaterializeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TableMaterializeSettings; - })(); - - vtctldata.MaterializeSettings = (function() { - - /** - * Properties of a MaterializeSettings. - * @memberof vtctldata - * @interface IMaterializeSettings - * @property {string|null} [workflow] MaterializeSettings workflow - * @property {string|null} [source_keyspace] MaterializeSettings source_keyspace - * @property {string|null} [target_keyspace] MaterializeSettings target_keyspace - * @property {boolean|null} [stop_after_copy] MaterializeSettings stop_after_copy - * @property {Array.|null} [table_settings] MaterializeSettings table_settings - * @property {string|null} [cell] MaterializeSettings cell - * @property {string|null} [tablet_types] MaterializeSettings tablet_types - * @property {string|null} [external_cluster] MaterializeSettings external_cluster - */ - - /** - * Constructs a new MaterializeSettings. - * @memberof vtctldata - * @classdesc Represents a MaterializeSettings. - * @implements IMaterializeSettings - * @constructor - * @param {vtctldata.IMaterializeSettings=} [properties] Properties to set - */ - function MaterializeSettings(properties) { - this.table_settings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaterializeSettings workflow. - * @member {string} workflow - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.workflow = ""; - - /** - * MaterializeSettings source_keyspace. - * @member {string} source_keyspace - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.source_keyspace = ""; - - /** - * MaterializeSettings target_keyspace. - * @member {string} target_keyspace - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.target_keyspace = ""; - - /** - * MaterializeSettings stop_after_copy. - * @member {boolean} stop_after_copy - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.stop_after_copy = false; - - /** - * MaterializeSettings table_settings. - * @member {Array.} table_settings - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.table_settings = $util.emptyArray; - - /** - * MaterializeSettings cell. - * @member {string} cell - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.cell = ""; - - /** - * MaterializeSettings tablet_types. - * @member {string} tablet_types - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.tablet_types = ""; - - /** - * MaterializeSettings external_cluster. - * @member {string} external_cluster - * @memberof vtctldata.MaterializeSettings - * @instance - */ - MaterializeSettings.prototype.external_cluster = ""; - - /** - * Creates a new MaterializeSettings instance using the specified properties. - * @function create - * @memberof vtctldata.MaterializeSettings - * @static - * @param {vtctldata.IMaterializeSettings=} [properties] Properties to set - * @returns {vtctldata.MaterializeSettings} MaterializeSettings instance - */ - MaterializeSettings.create = function create(properties) { - return new MaterializeSettings(properties); - }; - - /** - * Encodes the specified MaterializeSettings message. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. - * @function encode - * @memberof vtctldata.MaterializeSettings - * @static - * @param {vtctldata.IMaterializeSettings} message MaterializeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaterializeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.workflow); - if (message.source_keyspace != null && Object.hasOwnProperty.call(message, "source_keyspace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_keyspace); - if (message.target_keyspace != null && Object.hasOwnProperty.call(message, "target_keyspace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target_keyspace); - if (message.stop_after_copy != null && Object.hasOwnProperty.call(message, "stop_after_copy")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.stop_after_copy); - if (message.table_settings != null && message.table_settings.length) - for (var i = 0; i < message.table_settings.length; ++i) - $root.vtctldata.TableMaterializeSettings.encode(message.table_settings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.cell); - if (message.tablet_types != null && Object.hasOwnProperty.call(message, "tablet_types")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.tablet_types); - if (message.external_cluster != null && Object.hasOwnProperty.call(message, "external_cluster")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.external_cluster); - return writer; - }; - - /** - * Encodes the specified MaterializeSettings message, length delimited. Does not implicitly {@link vtctldata.MaterializeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.MaterializeSettings - * @static - * @param {vtctldata.IMaterializeSettings} message MaterializeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaterializeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaterializeSettings message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.MaterializeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.MaterializeSettings} MaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaterializeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.MaterializeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.workflow = reader.string(); - break; - case 2: - message.source_keyspace = reader.string(); - break; - case 3: - message.target_keyspace = reader.string(); - break; - case 4: - message.stop_after_copy = reader.bool(); - break; - case 5: - if (!(message.table_settings && message.table_settings.length)) - message.table_settings = []; - message.table_settings.push($root.vtctldata.TableMaterializeSettings.decode(reader, reader.uint32())); - break; - case 6: - message.cell = reader.string(); - break; - case 7: - message.tablet_types = reader.string(); - break; - case 8: - message.external_cluster = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaterializeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.MaterializeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.MaterializeSettings} MaterializeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaterializeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaterializeSettings message. - * @function verify - * @memberof vtctldata.MaterializeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaterializeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.workflow != null && message.hasOwnProperty("workflow")) - if (!$util.isString(message.workflow)) - return "workflow: string expected"; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - if (!$util.isString(message.source_keyspace)) - return "source_keyspace: string expected"; - if (message.target_keyspace != null && message.hasOwnProperty("target_keyspace")) - if (!$util.isString(message.target_keyspace)) - return "target_keyspace: string expected"; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - if (typeof message.stop_after_copy !== "boolean") - return "stop_after_copy: boolean expected"; - if (message.table_settings != null && message.hasOwnProperty("table_settings")) { - if (!Array.isArray(message.table_settings)) - return "table_settings: array expected"; - for (var i = 0; i < message.table_settings.length; ++i) { - var error = $root.vtctldata.TableMaterializeSettings.verify(message.table_settings[i]); - if (error) - return "table_settings." + error; - } - } - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) - if (!$util.isString(message.tablet_types)) - return "tablet_types: string expected"; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - if (!$util.isString(message.external_cluster)) - return "external_cluster: string expected"; - return null; - }; - - /** - * Creates a MaterializeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.MaterializeSettings - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.MaterializeSettings} MaterializeSettings - */ - MaterializeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.MaterializeSettings) - return object; - var message = new $root.vtctldata.MaterializeSettings(); - if (object.workflow != null) - message.workflow = String(object.workflow); - if (object.source_keyspace != null) - message.source_keyspace = String(object.source_keyspace); - if (object.target_keyspace != null) - message.target_keyspace = String(object.target_keyspace); - if (object.stop_after_copy != null) - message.stop_after_copy = Boolean(object.stop_after_copy); - if (object.table_settings) { - if (!Array.isArray(object.table_settings)) - throw TypeError(".vtctldata.MaterializeSettings.table_settings: array expected"); - message.table_settings = []; - for (var i = 0; i < object.table_settings.length; ++i) { - if (typeof object.table_settings[i] !== "object") - throw TypeError(".vtctldata.MaterializeSettings.table_settings: object expected"); - message.table_settings[i] = $root.vtctldata.TableMaterializeSettings.fromObject(object.table_settings[i]); - } - } - if (object.cell != null) - message.cell = String(object.cell); - if (object.tablet_types != null) - message.tablet_types = String(object.tablet_types); - if (object.external_cluster != null) - message.external_cluster = String(object.external_cluster); - return message; - }; - - /** - * Creates a plain object from a MaterializeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.MaterializeSettings - * @static - * @param {vtctldata.MaterializeSettings} message MaterializeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaterializeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.table_settings = []; - if (options.defaults) { - object.workflow = ""; - object.source_keyspace = ""; - object.target_keyspace = ""; - object.stop_after_copy = false; - object.cell = ""; - object.tablet_types = ""; - object.external_cluster = ""; - } - if (message.workflow != null && message.hasOwnProperty("workflow")) - object.workflow = message.workflow; - if (message.source_keyspace != null && message.hasOwnProperty("source_keyspace")) - object.source_keyspace = message.source_keyspace; - if (message.target_keyspace != null && message.hasOwnProperty("target_keyspace")) - object.target_keyspace = message.target_keyspace; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - object.stop_after_copy = message.stop_after_copy; - if (message.table_settings && message.table_settings.length) { - object.table_settings = []; - for (var j = 0; j < message.table_settings.length; ++j) - object.table_settings[j] = $root.vtctldata.TableMaterializeSettings.toObject(message.table_settings[j], options); - } - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.tablet_types != null && message.hasOwnProperty("tablet_types")) - object.tablet_types = message.tablet_types; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - object.external_cluster = message.external_cluster; - return object; - }; - - /** - * Converts this MaterializeSettings to JSON. - * @function toJSON - * @memberof vtctldata.MaterializeSettings - * @instance - * @returns {Object.} JSON object - */ - MaterializeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MaterializeSettings; - })(); - - vtctldata.Keyspace = (function() { - - /** - * Properties of a Keyspace. - * @memberof vtctldata - * @interface IKeyspace - * @property {string|null} [name] Keyspace name - * @property {topodata.IKeyspace|null} [keyspace] Keyspace keyspace - */ - - /** - * Constructs a new Keyspace. - * @memberof vtctldata - * @classdesc Represents a Keyspace. - * @implements IKeyspace - * @constructor - * @param {vtctldata.IKeyspace=} [properties] Properties to set - */ - function Keyspace(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Keyspace name. - * @member {string} name - * @memberof vtctldata.Keyspace - * @instance - */ - Keyspace.prototype.name = ""; - - /** - * Keyspace keyspace. - * @member {topodata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.Keyspace - * @instance - */ - Keyspace.prototype.keyspace = null; - - /** - * Creates a new Keyspace instance using the specified properties. - * @function create - * @memberof vtctldata.Keyspace - * @static - * @param {vtctldata.IKeyspace=} [properties] Properties to set - * @returns {vtctldata.Keyspace} Keyspace instance - */ - Keyspace.create = function create(properties) { - return new Keyspace(properties); - }; - - /** - * Encodes the specified Keyspace message. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. - * @function encode - * @memberof vtctldata.Keyspace - * @static - * @param {vtctldata.IKeyspace} message Keyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Keyspace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.topodata.Keyspace.encode(message.keyspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtctldata.Keyspace.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Keyspace - * @static - * @param {vtctldata.IKeyspace} message Keyspace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Keyspace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Keyspace message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Keyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Keyspace} Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Keyspace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Keyspace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.keyspace = $root.topodata.Keyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Keyspace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Keyspace} Keyspace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Keyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Keyspace message. - * @function verify - * @memberof vtctldata.Keyspace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Keyspace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.topodata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } - return null; - }; - - /** - * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Keyspace - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Keyspace} Keyspace - */ - Keyspace.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Keyspace) - return object; - var message = new $root.vtctldata.Keyspace(); - if (object.name != null) - message.name = String(object.name); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.Keyspace.keyspace: object expected"); - message.keyspace = $root.topodata.Keyspace.fromObject(object.keyspace); - } - return message; - }; - - /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Keyspace - * @static - * @param {vtctldata.Keyspace} message Keyspace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Keyspace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.keyspace = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.topodata.Keyspace.toObject(message.keyspace, options); - return object; - }; - - /** - * Converts this Keyspace to JSON. - * @function toJSON - * @memberof vtctldata.Keyspace - * @instance - * @returns {Object.} JSON object - */ - Keyspace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Keyspace; - })(); - - vtctldata.Shard = (function() { - - /** - * Properties of a Shard. - * @memberof vtctldata - * @interface IShard - * @property {string|null} [keyspace] Shard keyspace - * @property {string|null} [name] Shard name - * @property {topodata.IShard|null} [shard] Shard shard - */ - - /** - * Constructs a new Shard. - * @memberof vtctldata - * @classdesc Represents a Shard. - * @implements IShard - * @constructor - * @param {vtctldata.IShard=} [properties] Properties to set - */ - function Shard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Shard keyspace. - * @member {string} keyspace - * @memberof vtctldata.Shard - * @instance - */ - Shard.prototype.keyspace = ""; - - /** - * Shard name. - * @member {string} name - * @memberof vtctldata.Shard - * @instance - */ - Shard.prototype.name = ""; - - /** - * Shard shard. - * @member {topodata.IShard|null|undefined} shard - * @memberof vtctldata.Shard - * @instance - */ - Shard.prototype.shard = null; - - /** - * Creates a new Shard instance using the specified properties. - * @function create - * @memberof vtctldata.Shard - * @static - * @param {vtctldata.IShard=} [properties] Properties to set - * @returns {vtctldata.Shard} Shard instance - */ - Shard.create = function create(properties) { - return new Shard(properties); - }; - - /** - * Encodes the specified Shard message. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. - * @function encode - * @memberof vtctldata.Shard - * @static - * @param {vtctldata.IShard} message Shard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Shard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.topodata.Shard.encode(message.shard, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Shard message, length delimited. Does not implicitly {@link vtctldata.Shard.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Shard - * @static - * @param {vtctldata.IShard} message Shard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Shard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Shard message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Shard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Shard} Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Shard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Shard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - message.shard = $root.topodata.Shard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Shard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Shard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Shard} Shard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Shard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Shard message. - * @function verify - * @memberof vtctldata.Shard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Shard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.topodata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } - return null; - }; - - /** - * Creates a Shard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Shard - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Shard} Shard - */ - Shard.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Shard) - return object; - var message = new $root.vtctldata.Shard(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.name != null) - message.name = String(object.name); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.Shard.shard: object expected"); - message.shard = $root.topodata.Shard.fromObject(object.shard); - } - return message; - }; - - /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Shard - * @static - * @param {vtctldata.Shard} message Shard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Shard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.name = ""; - object.shard = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.topodata.Shard.toObject(message.shard, options); - return object; - }; - - /** - * Converts this Shard to JSON. - * @function toJSON - * @memberof vtctldata.Shard - * @instance - * @returns {Object.} JSON object - */ - Shard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Shard; - })(); - - vtctldata.Workflow = (function() { - - /** - * Properties of a Workflow. - * @memberof vtctldata - * @interface IWorkflow - * @property {string|null} [name] Workflow name - * @property {vtctldata.Workflow.IReplicationLocation|null} [source] Workflow source - * @property {vtctldata.Workflow.IReplicationLocation|null} [target] Workflow target - * @property {number|Long|null} [max_v_replication_lag] Workflow max_v_replication_lag - * @property {Object.|null} [shard_streams] Workflow shard_streams - */ - - /** - * Constructs a new Workflow. - * @memberof vtctldata - * @classdesc Represents a Workflow. - * @implements IWorkflow - * @constructor - * @param {vtctldata.IWorkflow=} [properties] Properties to set - */ - function Workflow(properties) { - this.shard_streams = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Workflow name. - * @member {string} name - * @memberof vtctldata.Workflow - * @instance - */ - Workflow.prototype.name = ""; - - /** - * Workflow source. - * @member {vtctldata.Workflow.IReplicationLocation|null|undefined} source - * @memberof vtctldata.Workflow - * @instance - */ - Workflow.prototype.source = null; - - /** - * Workflow target. - * @member {vtctldata.Workflow.IReplicationLocation|null|undefined} target - * @memberof vtctldata.Workflow - * @instance - */ - Workflow.prototype.target = null; - - /** - * Workflow max_v_replication_lag. - * @member {number|Long} max_v_replication_lag - * @memberof vtctldata.Workflow - * @instance - */ - Workflow.prototype.max_v_replication_lag = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Workflow shard_streams. - * @member {Object.} shard_streams - * @memberof vtctldata.Workflow - * @instance - */ - Workflow.prototype.shard_streams = $util.emptyObject; - - /** - * Creates a new Workflow instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow - * @static - * @param {vtctldata.IWorkflow=} [properties] Properties to set - * @returns {vtctldata.Workflow} Workflow instance - */ - Workflow.create = function create(properties) { - return new Workflow(properties); - }; - - /** - * Encodes the specified Workflow message. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow - * @static - * @param {vtctldata.IWorkflow} message Workflow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Workflow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.vtctldata.Workflow.ReplicationLocation.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.vtctldata.Workflow.ReplicationLocation.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.max_v_replication_lag != null && Object.hasOwnProperty.call(message, "max_v_replication_lag")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.max_v_replication_lag); - if (message.shard_streams != null && Object.hasOwnProperty.call(message, "shard_streams")) - for (var keys = Object.keys(message.shard_streams), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.Workflow.ShardStream.encode(message.shard_streams[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Workflow message, length delimited. Does not implicitly {@link vtctldata.Workflow.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow - * @static - * @param {vtctldata.IWorkflow} message Workflow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Workflow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Workflow message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow} Workflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Workflow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.source = $root.vtctldata.Workflow.ReplicationLocation.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.vtctldata.Workflow.ReplicationLocation.decode(reader, reader.uint32()); - break; - case 4: - message.max_v_replication_lag = reader.int64(); - break; - case 5: - if (message.shard_streams === $util.emptyObject) - message.shard_streams = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.Workflow.ShardStream.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.shard_streams[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Workflow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow} Workflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Workflow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Workflow message. - * @function verify - * @memberof vtctldata.Workflow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Workflow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.vtctldata.Workflow.ReplicationLocation.verify(message.source); - if (error) - return "source." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.vtctldata.Workflow.ReplicationLocation.verify(message.target); - if (error) - return "target." + error; - } - if (message.max_v_replication_lag != null && message.hasOwnProperty("max_v_replication_lag")) - if (!$util.isInteger(message.max_v_replication_lag) && !(message.max_v_replication_lag && $util.isInteger(message.max_v_replication_lag.low) && $util.isInteger(message.max_v_replication_lag.high))) - return "max_v_replication_lag: integer|Long expected"; - if (message.shard_streams != null && message.hasOwnProperty("shard_streams")) { - if (!$util.isObject(message.shard_streams)) - return "shard_streams: object expected"; - var key = Object.keys(message.shard_streams); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.Workflow.ShardStream.verify(message.shard_streams[key[i]]); - if (error) - return "shard_streams." + error; - } - } - return null; - }; - - /** - * Creates a Workflow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow} Workflow - */ - Workflow.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow) - return object; - var message = new $root.vtctldata.Workflow(); - if (object.name != null) - message.name = String(object.name); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".vtctldata.Workflow.source: object expected"); - message.source = $root.vtctldata.Workflow.ReplicationLocation.fromObject(object.source); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".vtctldata.Workflow.target: object expected"); - message.target = $root.vtctldata.Workflow.ReplicationLocation.fromObject(object.target); - } - if (object.max_v_replication_lag != null) - if ($util.Long) - (message.max_v_replication_lag = $util.Long.fromValue(object.max_v_replication_lag)).unsigned = false; - else if (typeof object.max_v_replication_lag === "string") - message.max_v_replication_lag = parseInt(object.max_v_replication_lag, 10); - else if (typeof object.max_v_replication_lag === "number") - message.max_v_replication_lag = object.max_v_replication_lag; - else if (typeof object.max_v_replication_lag === "object") - message.max_v_replication_lag = new $util.LongBits(object.max_v_replication_lag.low >>> 0, object.max_v_replication_lag.high >>> 0).toNumber(); - if (object.shard_streams) { - if (typeof object.shard_streams !== "object") - throw TypeError(".vtctldata.Workflow.shard_streams: object expected"); - message.shard_streams = {}; - for (var keys = Object.keys(object.shard_streams), i = 0; i < keys.length; ++i) { - if (typeof object.shard_streams[keys[i]] !== "object") - throw TypeError(".vtctldata.Workflow.shard_streams: object expected"); - message.shard_streams[keys[i]] = $root.vtctldata.Workflow.ShardStream.fromObject(object.shard_streams[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Workflow message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow - * @static - * @param {vtctldata.Workflow} message Workflow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Workflow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.shard_streams = {}; - if (options.defaults) { - object.name = ""; - object.source = null; - object.target = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_v_replication_lag = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_v_replication_lag = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.vtctldata.Workflow.ReplicationLocation.toObject(message.source, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.vtctldata.Workflow.ReplicationLocation.toObject(message.target, options); - if (message.max_v_replication_lag != null && message.hasOwnProperty("max_v_replication_lag")) - if (typeof message.max_v_replication_lag === "number") - object.max_v_replication_lag = options.longs === String ? String(message.max_v_replication_lag) : message.max_v_replication_lag; - else - object.max_v_replication_lag = options.longs === String ? $util.Long.prototype.toString.call(message.max_v_replication_lag) : options.longs === Number ? new $util.LongBits(message.max_v_replication_lag.low >>> 0, message.max_v_replication_lag.high >>> 0).toNumber() : message.max_v_replication_lag; - var keys2; - if (message.shard_streams && (keys2 = Object.keys(message.shard_streams)).length) { - object.shard_streams = {}; - for (var j = 0; j < keys2.length; ++j) - object.shard_streams[keys2[j]] = $root.vtctldata.Workflow.ShardStream.toObject(message.shard_streams[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Workflow to JSON. - * @function toJSON - * @memberof vtctldata.Workflow - * @instance - * @returns {Object.} JSON object - */ - Workflow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Workflow.ReplicationLocation = (function() { - - /** - * Properties of a ReplicationLocation. - * @memberof vtctldata.Workflow - * @interface IReplicationLocation - * @property {string|null} [keyspace] ReplicationLocation keyspace - * @property {Array.|null} [shards] ReplicationLocation shards - */ - - /** - * Constructs a new ReplicationLocation. - * @memberof vtctldata.Workflow - * @classdesc Represents a ReplicationLocation. - * @implements IReplicationLocation - * @constructor - * @param {vtctldata.Workflow.IReplicationLocation=} [properties] Properties to set - */ - function ReplicationLocation(properties) { - this.shards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReplicationLocation keyspace. - * @member {string} keyspace - * @memberof vtctldata.Workflow.ReplicationLocation - * @instance - */ - ReplicationLocation.prototype.keyspace = ""; - - /** - * ReplicationLocation shards. - * @member {Array.} shards - * @memberof vtctldata.Workflow.ReplicationLocation - * @instance - */ - ReplicationLocation.prototype.shards = $util.emptyArray; - - /** - * Creates a new ReplicationLocation instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.IReplicationLocation=} [properties] Properties to set - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation instance - */ - ReplicationLocation.create = function create(properties) { - return new ReplicationLocation(properties); - }; - - /** - * Encodes the specified ReplicationLocation message. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.IReplicationLocation} message ReplicationLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shards[i]); - return writer; - }; - - /** - * Encodes the specified ReplicationLocation message, length delimited. Does not implicitly {@link vtctldata.Workflow.ReplicationLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.IReplicationLocation} message ReplicationLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplicationLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplicationLocation message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.ReplicationLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - if (!(message.shards && message.shards.length)) - message.shards = []; - message.shards.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplicationLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplicationLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplicationLocation message. - * @function verify - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplicationLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) - if (!$util.isString(message.shards[i])) - return "shards: string[] expected"; - } - return null; - }; - - /** - * Creates a ReplicationLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.ReplicationLocation} ReplicationLocation - */ - ReplicationLocation.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.ReplicationLocation) - return object; - var message = new $root.vtctldata.Workflow.ReplicationLocation(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".vtctldata.Workflow.ReplicationLocation.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) - message.shards[i] = String(object.shards[i]); - } - return message; - }; - - /** - * Creates a plain object from a ReplicationLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.ReplicationLocation - * @static - * @param {vtctldata.Workflow.ReplicationLocation} message ReplicationLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplicationLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shards = []; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = message.shards[j]; - } - return object; - }; - - /** - * Converts this ReplicationLocation to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.ReplicationLocation - * @instance - * @returns {Object.} JSON object - */ - ReplicationLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReplicationLocation; - })(); - - Workflow.ShardStream = (function() { - - /** - * Properties of a ShardStream. - * @memberof vtctldata.Workflow - * @interface IShardStream - * @property {Array.|null} [streams] ShardStream streams - * @property {Array.|null} [tablet_controls] ShardStream tablet_controls - * @property {boolean|null} [is_primary_serving] ShardStream is_primary_serving - */ - - /** - * Constructs a new ShardStream. - * @memberof vtctldata.Workflow - * @classdesc Represents a ShardStream. - * @implements IShardStream - * @constructor - * @param {vtctldata.Workflow.IShardStream=} [properties] Properties to set - */ - function ShardStream(properties) { - this.streams = []; - this.tablet_controls = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardStream streams. - * @member {Array.} streams - * @memberof vtctldata.Workflow.ShardStream - * @instance - */ - ShardStream.prototype.streams = $util.emptyArray; - - /** - * ShardStream tablet_controls. - * @member {Array.} tablet_controls - * @memberof vtctldata.Workflow.ShardStream - * @instance - */ - ShardStream.prototype.tablet_controls = $util.emptyArray; - - /** - * ShardStream is_primary_serving. - * @member {boolean} is_primary_serving - * @memberof vtctldata.Workflow.ShardStream - * @instance - */ - ShardStream.prototype.is_primary_serving = false; - - /** - * Creates a new ShardStream instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.IShardStream=} [properties] Properties to set - * @returns {vtctldata.Workflow.ShardStream} ShardStream instance - */ - ShardStream.create = function create(properties) { - return new ShardStream(properties); - }; - - /** - * Encodes the specified ShardStream message. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.IShardStream} message ShardStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardStream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.streams != null && message.streams.length) - for (var i = 0; i < message.streams.length; ++i) - $root.vtctldata.Workflow.Stream.encode(message.streams[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tablet_controls != null && message.tablet_controls.length) - for (var i = 0; i < message.tablet_controls.length; ++i) - $root.topodata.Shard.TabletControl.encode(message.tablet_controls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.is_primary_serving != null && Object.hasOwnProperty.call(message, "is_primary_serving")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.is_primary_serving); - return writer; - }; - - /** - * Encodes the specified ShardStream message, length delimited. Does not implicitly {@link vtctldata.Workflow.ShardStream.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.IShardStream} message ShardStream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardStream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardStream message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.ShardStream} ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardStream.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.ShardStream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.streams && message.streams.length)) - message.streams = []; - message.streams.push($root.vtctldata.Workflow.Stream.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.tablet_controls && message.tablet_controls.length)) - message.tablet_controls = []; - message.tablet_controls.push($root.topodata.Shard.TabletControl.decode(reader, reader.uint32())); - break; - case 3: - message.is_primary_serving = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardStream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.ShardStream} ShardStream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardStream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardStream message. - * @function verify - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardStream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.streams != null && message.hasOwnProperty("streams")) { - if (!Array.isArray(message.streams)) - return "streams: array expected"; - for (var i = 0; i < message.streams.length; ++i) { - var error = $root.vtctldata.Workflow.Stream.verify(message.streams[i]); - if (error) - return "streams." + error; - } - } - if (message.tablet_controls != null && message.hasOwnProperty("tablet_controls")) { - if (!Array.isArray(message.tablet_controls)) - return "tablet_controls: array expected"; - for (var i = 0; i < message.tablet_controls.length; ++i) { - var error = $root.topodata.Shard.TabletControl.verify(message.tablet_controls[i]); - if (error) - return "tablet_controls." + error; - } - } - if (message.is_primary_serving != null && message.hasOwnProperty("is_primary_serving")) - if (typeof message.is_primary_serving !== "boolean") - return "is_primary_serving: boolean expected"; - return null; - }; - - /** - * Creates a ShardStream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.ShardStream} ShardStream - */ - ShardStream.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.ShardStream) - return object; - var message = new $root.vtctldata.Workflow.ShardStream(); - if (object.streams) { - if (!Array.isArray(object.streams)) - throw TypeError(".vtctldata.Workflow.ShardStream.streams: array expected"); - message.streams = []; - for (var i = 0; i < object.streams.length; ++i) { - if (typeof object.streams[i] !== "object") - throw TypeError(".vtctldata.Workflow.ShardStream.streams: object expected"); - message.streams[i] = $root.vtctldata.Workflow.Stream.fromObject(object.streams[i]); - } - } - if (object.tablet_controls) { - if (!Array.isArray(object.tablet_controls)) - throw TypeError(".vtctldata.Workflow.ShardStream.tablet_controls: array expected"); - message.tablet_controls = []; - for (var i = 0; i < object.tablet_controls.length; ++i) { - if (typeof object.tablet_controls[i] !== "object") - throw TypeError(".vtctldata.Workflow.ShardStream.tablet_controls: object expected"); - message.tablet_controls[i] = $root.topodata.Shard.TabletControl.fromObject(object.tablet_controls[i]); - } - } - if (object.is_primary_serving != null) - message.is_primary_serving = Boolean(object.is_primary_serving); - return message; - }; - - /** - * Creates a plain object from a ShardStream message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.ShardStream - * @static - * @param {vtctldata.Workflow.ShardStream} message ShardStream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardStream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.streams = []; - object.tablet_controls = []; - } - if (options.defaults) - object.is_primary_serving = false; - if (message.streams && message.streams.length) { - object.streams = []; - for (var j = 0; j < message.streams.length; ++j) - object.streams[j] = $root.vtctldata.Workflow.Stream.toObject(message.streams[j], options); - } - if (message.tablet_controls && message.tablet_controls.length) { - object.tablet_controls = []; - for (var j = 0; j < message.tablet_controls.length; ++j) - object.tablet_controls[j] = $root.topodata.Shard.TabletControl.toObject(message.tablet_controls[j], options); - } - if (message.is_primary_serving != null && message.hasOwnProperty("is_primary_serving")) - object.is_primary_serving = message.is_primary_serving; - return object; - }; - - /** - * Converts this ShardStream to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.ShardStream - * @instance - * @returns {Object.} JSON object - */ - ShardStream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ShardStream; - })(); - - Workflow.Stream = (function() { - - /** - * Properties of a Stream. - * @memberof vtctldata.Workflow - * @interface IStream - * @property {number|Long|null} [id] Stream id - * @property {string|null} [shard] Stream shard - * @property {topodata.ITabletAlias|null} [tablet] Stream tablet - * @property {binlogdata.IBinlogSource|null} [binlog_source] Stream binlog_source - * @property {string|null} [position] Stream position - * @property {string|null} [stop_position] Stream stop_position - * @property {string|null} [state] Stream state - * @property {string|null} [db_name] Stream db_name - * @property {vttime.ITime|null} [transaction_timestamp] Stream transaction_timestamp - * @property {vttime.ITime|null} [time_updated] Stream time_updated - * @property {string|null} [message] Stream message - * @property {Array.|null} [copy_states] Stream copy_states - */ - - /** - * Constructs a new Stream. - * @memberof vtctldata.Workflow - * @classdesc Represents a Stream. - * @implements IStream - * @constructor - * @param {vtctldata.Workflow.IStream=} [properties] Properties to set - */ - function Stream(properties) { - this.copy_states = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Stream id. - * @member {number|Long} id - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Stream shard. - * @member {string} shard - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.shard = ""; - - /** - * Stream tablet. - * @member {topodata.ITabletAlias|null|undefined} tablet - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.tablet = null; - - /** - * Stream binlog_source. - * @member {binlogdata.IBinlogSource|null|undefined} binlog_source - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.binlog_source = null; - - /** - * Stream position. - * @member {string} position - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.position = ""; - - /** - * Stream stop_position. - * @member {string} stop_position - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.stop_position = ""; - - /** - * Stream state. - * @member {string} state - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.state = ""; - - /** - * Stream db_name. - * @member {string} db_name - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.db_name = ""; - - /** - * Stream transaction_timestamp. - * @member {vttime.ITime|null|undefined} transaction_timestamp - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.transaction_timestamp = null; - - /** - * Stream time_updated. - * @member {vttime.ITime|null|undefined} time_updated - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.time_updated = null; - - /** - * Stream message. - * @member {string} message - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.message = ""; - - /** - * Stream copy_states. - * @member {Array.} copy_states - * @memberof vtctldata.Workflow.Stream - * @instance - */ - Stream.prototype.copy_states = $util.emptyArray; - - /** - * Creates a new Stream instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.IStream=} [properties] Properties to set - * @returns {vtctldata.Workflow.Stream} Stream instance - */ - Stream.create = function create(properties) { - return new Stream(properties); - }; - - /** - * Encodes the specified Stream message. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.binlog_source != null && Object.hasOwnProperty.call(message, "binlog_source")) - $root.binlogdata.BinlogSource.encode(message.binlog_source, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.position); - if (message.stop_position != null && Object.hasOwnProperty.call(message, "stop_position")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.stop_position); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.state); - if (message.db_name != null && Object.hasOwnProperty.call(message, "db_name")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.db_name); - if (message.transaction_timestamp != null && Object.hasOwnProperty.call(message, "transaction_timestamp")) - $root.vttime.Time.encode(message.transaction_timestamp, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.time_updated != null && Object.hasOwnProperty.call(message, "time_updated")) - $root.vttime.Time.encode(message.time_updated, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.message); - if (message.copy_states != null && message.copy_states.length) - for (var i = 0; i < message.copy_states.length; ++i) - $root.vtctldata.Workflow.Stream.CopyState.encode(message.copy_states[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.IStream} message Stream message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Stream.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Stream message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.binlog_source = $root.binlogdata.BinlogSource.decode(reader, reader.uint32()); - break; - case 5: - message.position = reader.string(); - break; - case 6: - message.stop_position = reader.string(); - break; - case 7: - message.state = reader.string(); - break; - case 8: - message.db_name = reader.string(); - break; - case 9: - message.transaction_timestamp = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 10: - message.time_updated = $root.vttime.Time.decode(reader, reader.uint32()); - break; - case 11: - message.message = reader.string(); - break; - case 12: - if (!(message.copy_states && message.copy_states.length)) - message.copy_states = []; - message.copy_states.push($root.vtctldata.Workflow.Stream.CopyState.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Stream message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.Stream - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.Stream} Stream - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Stream.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Stream message. - * @function verify - * @memberof vtctldata.Workflow.Stream - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Stream.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.TabletAlias.verify(message.tablet); - if (error) - return "tablet." + error; - } - if (message.binlog_source != null && message.hasOwnProperty("binlog_source")) { - var error = $root.binlogdata.BinlogSource.verify(message.binlog_source); - if (error) - return "binlog_source." + error; - } - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.stop_position != null && message.hasOwnProperty("stop_position")) - if (!$util.isString(message.stop_position)) - return "stop_position: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - if (!$util.isString(message.state)) - return "state: string expected"; - if (message.db_name != null && message.hasOwnProperty("db_name")) - if (!$util.isString(message.db_name)) - return "db_name: string expected"; - if (message.transaction_timestamp != null && message.hasOwnProperty("transaction_timestamp")) { - var error = $root.vttime.Time.verify(message.transaction_timestamp); - if (error) - return "transaction_timestamp." + error; - } - if (message.time_updated != null && message.hasOwnProperty("time_updated")) { - var error = $root.vttime.Time.verify(message.time_updated); - if (error) - return "time_updated." + error; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.copy_states != null && message.hasOwnProperty("copy_states")) { - if (!Array.isArray(message.copy_states)) - return "copy_states: array expected"; - for (var i = 0; i < message.copy_states.length; ++i) { - var error = $root.vtctldata.Workflow.Stream.CopyState.verify(message.copy_states[i]); - if (error) - return "copy_states." + error; - } - } - return null; - }; - - /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.Stream - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.Stream} Stream - */ - Stream.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.Stream) - return object; - var message = new $root.vtctldata.Workflow.Stream(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - if (object.shard != null) - message.shard = String(object.shard); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.Workflow.Stream.tablet: object expected"); - message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); - } - if (object.binlog_source != null) { - if (typeof object.binlog_source !== "object") - throw TypeError(".vtctldata.Workflow.Stream.binlog_source: object expected"); - message.binlog_source = $root.binlogdata.BinlogSource.fromObject(object.binlog_source); - } - if (object.position != null) - message.position = String(object.position); - if (object.stop_position != null) - message.stop_position = String(object.stop_position); - if (object.state != null) - message.state = String(object.state); - if (object.db_name != null) - message.db_name = String(object.db_name); - if (object.transaction_timestamp != null) { - if (typeof object.transaction_timestamp !== "object") - throw TypeError(".vtctldata.Workflow.Stream.transaction_timestamp: object expected"); - message.transaction_timestamp = $root.vttime.Time.fromObject(object.transaction_timestamp); - } - if (object.time_updated != null) { - if (typeof object.time_updated !== "object") - throw TypeError(".vtctldata.Workflow.Stream.time_updated: object expected"); - message.time_updated = $root.vttime.Time.fromObject(object.time_updated); - } - if (object.message != null) - message.message = String(object.message); - if (object.copy_states) { - if (!Array.isArray(object.copy_states)) - throw TypeError(".vtctldata.Workflow.Stream.copy_states: array expected"); - message.copy_states = []; - for (var i = 0; i < object.copy_states.length; ++i) { - if (typeof object.copy_states[i] !== "object") - throw TypeError(".vtctldata.Workflow.Stream.copy_states: object expected"); - message.copy_states[i] = $root.vtctldata.Workflow.Stream.CopyState.fromObject(object.copy_states[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.Stream - * @static - * @param {vtctldata.Workflow.Stream} message Stream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.copy_states = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.shard = ""; - object.tablet = null; - object.binlog_source = null; - object.position = ""; - object.stop_position = ""; - object.state = ""; - object.db_name = ""; - object.transaction_timestamp = null; - object.time_updated = null; - object.message = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); - if (message.binlog_source != null && message.hasOwnProperty("binlog_source")) - object.binlog_source = $root.binlogdata.BinlogSource.toObject(message.binlog_source, options); - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.stop_position != null && message.hasOwnProperty("stop_position")) - object.stop_position = message.stop_position; - if (message.state != null && message.hasOwnProperty("state")) - object.state = message.state; - if (message.db_name != null && message.hasOwnProperty("db_name")) - object.db_name = message.db_name; - if (message.transaction_timestamp != null && message.hasOwnProperty("transaction_timestamp")) - object.transaction_timestamp = $root.vttime.Time.toObject(message.transaction_timestamp, options); - if (message.time_updated != null && message.hasOwnProperty("time_updated")) - object.time_updated = $root.vttime.Time.toObject(message.time_updated, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.copy_states && message.copy_states.length) { - object.copy_states = []; - for (var j = 0; j < message.copy_states.length; ++j) - object.copy_states[j] = $root.vtctldata.Workflow.Stream.CopyState.toObject(message.copy_states[j], options); - } - return object; - }; - - /** - * Converts this Stream to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.Stream - * @instance - * @returns {Object.} JSON object - */ - Stream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - Stream.CopyState = (function() { - - /** - * Properties of a CopyState. - * @memberof vtctldata.Workflow.Stream - * @interface ICopyState - * @property {string|null} [table] CopyState table - * @property {string|null} [last_pk] CopyState last_pk - */ - - /** - * Constructs a new CopyState. - * @memberof vtctldata.Workflow.Stream - * @classdesc Represents a CopyState. - * @implements ICopyState - * @constructor - * @param {vtctldata.Workflow.Stream.ICopyState=} [properties] Properties to set - */ - function CopyState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CopyState table. - * @member {string} table - * @memberof vtctldata.Workflow.Stream.CopyState - * @instance - */ - CopyState.prototype.table = ""; - - /** - * CopyState last_pk. - * @member {string} last_pk - * @memberof vtctldata.Workflow.Stream.CopyState - * @instance - */ - CopyState.prototype.last_pk = ""; - - /** - * Creates a new CopyState instance using the specified properties. - * @function create - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.ICopyState=} [properties] Properties to set - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState instance - */ - CopyState.create = function create(properties) { - return new CopyState(properties); - }; - - /** - * Encodes the specified CopyState message. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @function encode - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.ICopyState} message CopyState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CopyState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.last_pk != null && Object.hasOwnProperty.call(message, "last_pk")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.last_pk); - return writer; - }; - - /** - * Encodes the specified CopyState message, length delimited. Does not implicitly {@link vtctldata.Workflow.Stream.CopyState.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.ICopyState} message CopyState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CopyState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CopyState message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CopyState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.Workflow.Stream.CopyState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table = reader.string(); - break; - case 2: - message.last_pk = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CopyState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CopyState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CopyState message. - * @function verify - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CopyState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.last_pk != null && message.hasOwnProperty("last_pk")) - if (!$util.isString(message.last_pk)) - return "last_pk: string expected"; - return null; - }; - - /** - * Creates a CopyState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.Workflow.Stream.CopyState} CopyState - */ - CopyState.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.Workflow.Stream.CopyState) - return object; - var message = new $root.vtctldata.Workflow.Stream.CopyState(); - if (object.table != null) - message.table = String(object.table); - if (object.last_pk != null) - message.last_pk = String(object.last_pk); - return message; - }; - - /** - * Creates a plain object from a CopyState message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.Workflow.Stream.CopyState - * @static - * @param {vtctldata.Workflow.Stream.CopyState} message CopyState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CopyState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.table = ""; - object.last_pk = ""; - } - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.last_pk != null && message.hasOwnProperty("last_pk")) - object.last_pk = message.last_pk; - return object; - }; - - /** - * Converts this CopyState to JSON. - * @function toJSON - * @memberof vtctldata.Workflow.Stream.CopyState - * @instance - * @returns {Object.} JSON object - */ - CopyState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CopyState; - })(); - - return Stream; - })(); - - return Workflow; - })(); - - vtctldata.ChangeTabletTypeRequest = (function() { - - /** - * Properties of a ChangeTabletTypeRequest. - * @memberof vtctldata - * @interface IChangeTabletTypeRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] ChangeTabletTypeRequest tablet_alias - * @property {topodata.TabletType|null} [db_type] ChangeTabletTypeRequest db_type - * @property {boolean|null} [dry_run] ChangeTabletTypeRequest dry_run - */ - - /** - * Constructs a new ChangeTabletTypeRequest. - * @memberof vtctldata - * @classdesc Represents a ChangeTabletTypeRequest. - * @implements IChangeTabletTypeRequest - * @constructor - * @param {vtctldata.IChangeTabletTypeRequest=} [properties] Properties to set - */ - function ChangeTabletTypeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChangeTabletTypeRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.ChangeTabletTypeRequest - * @instance - */ - ChangeTabletTypeRequest.prototype.tablet_alias = null; - - /** - * ChangeTabletTypeRequest db_type. - * @member {topodata.TabletType} db_type - * @memberof vtctldata.ChangeTabletTypeRequest - * @instance - */ - ChangeTabletTypeRequest.prototype.db_type = 0; - - /** - * ChangeTabletTypeRequest dry_run. - * @member {boolean} dry_run - * @memberof vtctldata.ChangeTabletTypeRequest - * @instance - */ - ChangeTabletTypeRequest.prototype.dry_run = false; - - /** - * Creates a new ChangeTabletTypeRequest instance using the specified properties. - * @function create - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {vtctldata.IChangeTabletTypeRequest=} [properties] Properties to set - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest instance - */ - ChangeTabletTypeRequest.create = function create(properties) { - return new ChangeTabletTypeRequest(properties); - }; - - /** - * Encodes the specified ChangeTabletTypeRequest message. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {vtctldata.IChangeTabletTypeRequest} message ChangeTabletTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTabletTypeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.db_type != null && Object.hasOwnProperty.call(message, "db_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.db_type); - if (message.dry_run != null && Object.hasOwnProperty.call(message, "dry_run")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dry_run); - return writer; - }; - - /** - * Encodes the specified ChangeTabletTypeRequest message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {vtctldata.IChangeTabletTypeRequest} message ChangeTabletTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTabletTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTabletTypeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ChangeTabletTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - message.db_type = reader.int32(); - break; - case 3: - message.dry_run = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChangeTabletTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTabletTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChangeTabletTypeRequest message. - * @function verify - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChangeTabletTypeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.db_type != null && message.hasOwnProperty("db_type")) - switch (message.db_type) { - default: - return "db_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - if (typeof message.dry_run !== "boolean") - return "dry_run: boolean expected"; - return null; - }; - - /** - * Creates a ChangeTabletTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ChangeTabletTypeRequest} ChangeTabletTypeRequest - */ - ChangeTabletTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ChangeTabletTypeRequest) - return object; - var message = new $root.vtctldata.ChangeTabletTypeRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.ChangeTabletTypeRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - switch (object.db_type) { - case "UNKNOWN": - case 0: - message.db_type = 0; - break; - case "MASTER": - case 1: - message.db_type = 1; - break; - case "REPLICA": - case 2: - message.db_type = 2; - break; - case "RDONLY": - case 3: - message.db_type = 3; - break; - case "BATCH": - case 3: - message.db_type = 3; - break; - case "SPARE": - case 4: - message.db_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.db_type = 5; - break; - case "BACKUP": - case 6: - message.db_type = 6; - break; - case "RESTORE": - case 7: - message.db_type = 7; - break; - case "DRAINED": - case 8: - message.db_type = 8; - break; - } - if (object.dry_run != null) - message.dry_run = Boolean(object.dry_run); - return message; - }; - - /** - * Creates a plain object from a ChangeTabletTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ChangeTabletTypeRequest - * @static - * @param {vtctldata.ChangeTabletTypeRequest} message ChangeTabletTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChangeTabletTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tablet_alias = null; - object.db_type = options.enums === String ? "UNKNOWN" : 0; - object.dry_run = false; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.db_type != null && message.hasOwnProperty("db_type")) - object.db_type = options.enums === String ? $root.topodata.TabletType[message.db_type] : message.db_type; - if (message.dry_run != null && message.hasOwnProperty("dry_run")) - object.dry_run = message.dry_run; - return object; - }; - - /** - * Converts this ChangeTabletTypeRequest to JSON. - * @function toJSON - * @memberof vtctldata.ChangeTabletTypeRequest - * @instance - * @returns {Object.} JSON object - */ - ChangeTabletTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ChangeTabletTypeRequest; - })(); - - vtctldata.ChangeTabletTypeResponse = (function() { - - /** - * Properties of a ChangeTabletTypeResponse. - * @memberof vtctldata - * @interface IChangeTabletTypeResponse - * @property {topodata.ITablet|null} [before_tablet] ChangeTabletTypeResponse before_tablet - * @property {topodata.ITablet|null} [after_tablet] ChangeTabletTypeResponse after_tablet - * @property {boolean|null} [was_dry_run] ChangeTabletTypeResponse was_dry_run - */ - - /** - * Constructs a new ChangeTabletTypeResponse. - * @memberof vtctldata - * @classdesc Represents a ChangeTabletTypeResponse. - * @implements IChangeTabletTypeResponse - * @constructor - * @param {vtctldata.IChangeTabletTypeResponse=} [properties] Properties to set - */ - function ChangeTabletTypeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChangeTabletTypeResponse before_tablet. - * @member {topodata.ITablet|null|undefined} before_tablet - * @memberof vtctldata.ChangeTabletTypeResponse - * @instance - */ - ChangeTabletTypeResponse.prototype.before_tablet = null; - - /** - * ChangeTabletTypeResponse after_tablet. - * @member {topodata.ITablet|null|undefined} after_tablet - * @memberof vtctldata.ChangeTabletTypeResponse - * @instance - */ - ChangeTabletTypeResponse.prototype.after_tablet = null; - - /** - * ChangeTabletTypeResponse was_dry_run. - * @member {boolean} was_dry_run - * @memberof vtctldata.ChangeTabletTypeResponse - * @instance - */ - ChangeTabletTypeResponse.prototype.was_dry_run = false; - - /** - * Creates a new ChangeTabletTypeResponse instance using the specified properties. - * @function create - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {vtctldata.IChangeTabletTypeResponse=} [properties] Properties to set - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse instance - */ - ChangeTabletTypeResponse.create = function create(properties) { - return new ChangeTabletTypeResponse(properties); - }; - - /** - * Encodes the specified ChangeTabletTypeResponse message. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {vtctldata.IChangeTabletTypeResponse} message ChangeTabletTypeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTabletTypeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.before_tablet != null && Object.hasOwnProperty.call(message, "before_tablet")) - $root.topodata.Tablet.encode(message.before_tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after_tablet != null && Object.hasOwnProperty.call(message, "after_tablet")) - $root.topodata.Tablet.encode(message.after_tablet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.was_dry_run != null && Object.hasOwnProperty.call(message, "was_dry_run")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.was_dry_run); - return writer; - }; - - /** - * Encodes the specified ChangeTabletTypeResponse message, length delimited. Does not implicitly {@link vtctldata.ChangeTabletTypeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {vtctldata.IChangeTabletTypeResponse} message ChangeTabletTypeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChangeTabletTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTabletTypeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ChangeTabletTypeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.before_tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); - break; - case 2: - message.after_tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); - break; - case 3: - message.was_dry_run = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChangeTabletTypeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChangeTabletTypeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChangeTabletTypeResponse message. - * @function verify - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChangeTabletTypeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.before_tablet != null && message.hasOwnProperty("before_tablet")) { - var error = $root.topodata.Tablet.verify(message.before_tablet); - if (error) - return "before_tablet." + error; - } - if (message.after_tablet != null && message.hasOwnProperty("after_tablet")) { - var error = $root.topodata.Tablet.verify(message.after_tablet); - if (error) - return "after_tablet." + error; - } - if (message.was_dry_run != null && message.hasOwnProperty("was_dry_run")) - if (typeof message.was_dry_run !== "boolean") - return "was_dry_run: boolean expected"; - return null; - }; - - /** - * Creates a ChangeTabletTypeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ChangeTabletTypeResponse} ChangeTabletTypeResponse - */ - ChangeTabletTypeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ChangeTabletTypeResponse) - return object; - var message = new $root.vtctldata.ChangeTabletTypeResponse(); - if (object.before_tablet != null) { - if (typeof object.before_tablet !== "object") - throw TypeError(".vtctldata.ChangeTabletTypeResponse.before_tablet: object expected"); - message.before_tablet = $root.topodata.Tablet.fromObject(object.before_tablet); - } - if (object.after_tablet != null) { - if (typeof object.after_tablet !== "object") - throw TypeError(".vtctldata.ChangeTabletTypeResponse.after_tablet: object expected"); - message.after_tablet = $root.topodata.Tablet.fromObject(object.after_tablet); - } - if (object.was_dry_run != null) - message.was_dry_run = Boolean(object.was_dry_run); - return message; - }; - - /** - * Creates a plain object from a ChangeTabletTypeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ChangeTabletTypeResponse - * @static - * @param {vtctldata.ChangeTabletTypeResponse} message ChangeTabletTypeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChangeTabletTypeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.before_tablet = null; - object.after_tablet = null; - object.was_dry_run = false; - } - if (message.before_tablet != null && message.hasOwnProperty("before_tablet")) - object.before_tablet = $root.topodata.Tablet.toObject(message.before_tablet, options); - if (message.after_tablet != null && message.hasOwnProperty("after_tablet")) - object.after_tablet = $root.topodata.Tablet.toObject(message.after_tablet, options); - if (message.was_dry_run != null && message.hasOwnProperty("was_dry_run")) - object.was_dry_run = message.was_dry_run; - return object; - }; - - /** - * Converts this ChangeTabletTypeResponse to JSON. - * @function toJSON - * @memberof vtctldata.ChangeTabletTypeResponse - * @instance - * @returns {Object.} JSON object - */ - ChangeTabletTypeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ChangeTabletTypeResponse; - })(); - - vtctldata.CreateKeyspaceRequest = (function() { - - /** - * Properties of a CreateKeyspaceRequest. - * @memberof vtctldata - * @interface ICreateKeyspaceRequest - * @property {string|null} [name] CreateKeyspaceRequest name - * @property {boolean|null} [force] CreateKeyspaceRequest force - * @property {boolean|null} [allow_empty_v_schema] CreateKeyspaceRequest allow_empty_v_schema - * @property {string|null} [sharding_column_name] CreateKeyspaceRequest sharding_column_name - * @property {topodata.KeyspaceIdType|null} [sharding_column_type] CreateKeyspaceRequest sharding_column_type - * @property {Array.|null} [served_froms] CreateKeyspaceRequest served_froms - * @property {topodata.KeyspaceType|null} [type] CreateKeyspaceRequest type - * @property {string|null} [base_keyspace] CreateKeyspaceRequest base_keyspace - * @property {vttime.ITime|null} [snapshot_time] CreateKeyspaceRequest snapshot_time - */ - - /** - * Constructs a new CreateKeyspaceRequest. - * @memberof vtctldata - * @classdesc Represents a CreateKeyspaceRequest. - * @implements ICreateKeyspaceRequest - * @constructor - * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set - */ - function CreateKeyspaceRequest(properties) { - this.served_froms = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateKeyspaceRequest name. - * @member {string} name - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.name = ""; - - /** - * CreateKeyspaceRequest force. - * @member {boolean} force - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.force = false; - - /** - * CreateKeyspaceRequest allow_empty_v_schema. - * @member {boolean} allow_empty_v_schema - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.allow_empty_v_schema = false; - - /** - * CreateKeyspaceRequest sharding_column_name. - * @member {string} sharding_column_name - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.sharding_column_name = ""; - - /** - * CreateKeyspaceRequest sharding_column_type. - * @member {topodata.KeyspaceIdType} sharding_column_type - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.sharding_column_type = 0; - - /** - * CreateKeyspaceRequest served_froms. - * @member {Array.} served_froms - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.served_froms = $util.emptyArray; - - /** - * CreateKeyspaceRequest type. - * @member {topodata.KeyspaceType} type - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.type = 0; - - /** - * CreateKeyspaceRequest base_keyspace. - * @member {string} base_keyspace - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.base_keyspace = ""; - - /** - * CreateKeyspaceRequest snapshot_time. - * @member {vttime.ITime|null|undefined} snapshot_time - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - */ - CreateKeyspaceRequest.prototype.snapshot_time = null; - - /** - * Creates a new CreateKeyspaceRequest instance using the specified properties. - * @function create - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {vtctldata.ICreateKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest instance - */ - CreateKeyspaceRequest.create = function create(properties) { - return new CreateKeyspaceRequest(properties); - }; - - /** - * Encodes the specified CreateKeyspaceRequest message. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateKeyspaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - if (message.allow_empty_v_schema != null && Object.hasOwnProperty.call(message, "allow_empty_v_schema")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allow_empty_v_schema); - if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, "sharding_column_name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sharding_column_name); - if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, "sharding_column_type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sharding_column_type); - if (message.served_froms != null && message.served_froms.length) - for (var i = 0; i < message.served_froms.length; ++i) - $root.topodata.Keyspace.ServedFrom.encode(message.served_froms[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.base_keyspace); - if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) - $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {vtctldata.ICreateKeyspaceRequest} message CreateKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKeyspaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.force = reader.bool(); - break; - case 3: - message.allow_empty_v_schema = reader.bool(); - break; - case 4: - message.sharding_column_name = reader.string(); - break; - case 5: - message.sharding_column_type = reader.int32(); - break; - case 6: - if (!(message.served_froms && message.served_froms.length)) - message.served_froms = []; - message.served_froms.push($root.topodata.Keyspace.ServedFrom.decode(reader, reader.uint32())); - break; - case 7: - message.type = reader.int32(); - break; - case 8: - message.base_keyspace = reader.string(); - break; - case 9: - message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateKeyspaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateKeyspaceRequest message. - * @function verify - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateKeyspaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) - if (typeof message.allow_empty_v_schema !== "boolean") - return "allow_empty_v_schema: boolean expected"; - if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) - if (!$util.isString(message.sharding_column_name)) - return "sharding_column_name: string expected"; - if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) - switch (message.sharding_column_type) { - default: - return "sharding_column_type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.served_froms != null && message.hasOwnProperty("served_froms")) { - if (!Array.isArray(message.served_froms)) - return "served_froms: array expected"; - for (var i = 0; i < message.served_froms.length; ++i) { - var error = $root.topodata.Keyspace.ServedFrom.verify(message.served_froms[i]); - if (error) - return "served_froms." + error; - } - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - if (!$util.isString(message.base_keyspace)) - return "base_keyspace: string expected"; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { - var error = $root.vttime.Time.verify(message.snapshot_time); - if (error) - return "snapshot_time." + error; - } - return null; - }; - - /** - * Creates a CreateKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CreateKeyspaceRequest} CreateKeyspaceRequest - */ - CreateKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateKeyspaceRequest) - return object; - var message = new $root.vtctldata.CreateKeyspaceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.allow_empty_v_schema != null) - message.allow_empty_v_schema = Boolean(object.allow_empty_v_schema); - if (object.sharding_column_name != null) - message.sharding_column_name = String(object.sharding_column_name); - switch (object.sharding_column_type) { - case "UNSET": - case 0: - message.sharding_column_type = 0; - break; - case "UINT64": - case 1: - message.sharding_column_type = 1; - break; - case "BYTES": - case 2: - message.sharding_column_type = 2; - break; - } - if (object.served_froms) { - if (!Array.isArray(object.served_froms)) - throw TypeError(".vtctldata.CreateKeyspaceRequest.served_froms: array expected"); - message.served_froms = []; - for (var i = 0; i < object.served_froms.length; ++i) { - if (typeof object.served_froms[i] !== "object") - throw TypeError(".vtctldata.CreateKeyspaceRequest.served_froms: object expected"); - message.served_froms[i] = $root.topodata.Keyspace.ServedFrom.fromObject(object.served_froms[i]); - } - } - switch (object.type) { - case "NORMAL": - case 0: - message.type = 0; - break; - case "SNAPSHOT": - case 1: - message.type = 1; - break; - } - if (object.base_keyspace != null) - message.base_keyspace = String(object.base_keyspace); - if (object.snapshot_time != null) { - if (typeof object.snapshot_time !== "object") - throw TypeError(".vtctldata.CreateKeyspaceRequest.snapshot_time: object expected"); - message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); - } - return message; - }; - - /** - * Creates a plain object from a CreateKeyspaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CreateKeyspaceRequest - * @static - * @param {vtctldata.CreateKeyspaceRequest} message CreateKeyspaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateKeyspaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.served_froms = []; - if (options.defaults) { - object.name = ""; - object.force = false; - object.allow_empty_v_schema = false; - object.sharding_column_name = ""; - object.sharding_column_type = options.enums === String ? "UNSET" : 0; - object.type = options.enums === String ? "NORMAL" : 0; - object.base_keyspace = ""; - object.snapshot_time = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.allow_empty_v_schema != null && message.hasOwnProperty("allow_empty_v_schema")) - object.allow_empty_v_schema = message.allow_empty_v_schema; - if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) - object.sharding_column_name = message.sharding_column_name; - if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) - object.sharding_column_type = options.enums === String ? $root.topodata.KeyspaceIdType[message.sharding_column_type] : message.sharding_column_type; - if (message.served_froms && message.served_froms.length) { - object.served_froms = []; - for (var j = 0; j < message.served_froms.length; ++j) - object.served_froms[j] = $root.topodata.Keyspace.ServedFrom.toObject(message.served_froms[j], options); - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.topodata.KeyspaceType[message.type] : message.type; - if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) - object.base_keyspace = message.base_keyspace; - if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) - object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); - return object; - }; - - /** - * Converts this CreateKeyspaceRequest to JSON. - * @function toJSON - * @memberof vtctldata.CreateKeyspaceRequest - * @instance - * @returns {Object.} JSON object - */ - CreateKeyspaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateKeyspaceRequest; - })(); - - vtctldata.CreateKeyspaceResponse = (function() { - - /** - * Properties of a CreateKeyspaceResponse. - * @memberof vtctldata - * @interface ICreateKeyspaceResponse - * @property {vtctldata.IKeyspace|null} [keyspace] CreateKeyspaceResponse keyspace - */ - - /** - * Constructs a new CreateKeyspaceResponse. - * @memberof vtctldata - * @classdesc Represents a CreateKeyspaceResponse. - * @implements ICreateKeyspaceResponse - * @constructor - * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set - */ - function CreateKeyspaceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateKeyspaceResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.CreateKeyspaceResponse - * @instance - */ - CreateKeyspaceResponse.prototype.keyspace = null; - - /** - * Creates a new CreateKeyspaceResponse instance using the specified properties. - * @function create - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {vtctldata.ICreateKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse instance - */ - CreateKeyspaceResponse.create = function create(properties) { - return new CreateKeyspaceResponse(properties); - }; - - /** - * Encodes the specified CreateKeyspaceResponse message. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateKeyspaceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.CreateKeyspaceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {vtctldata.ICreateKeyspaceResponse} message CreateKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKeyspaceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateKeyspaceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateKeyspaceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateKeyspaceResponse message. - * @function verify - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateKeyspaceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } - return null; - }; - - /** - * Creates a CreateKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CreateKeyspaceResponse} CreateKeyspaceResponse - */ - CreateKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateKeyspaceResponse) - return object; - var message = new $root.vtctldata.CreateKeyspaceResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.CreateKeyspaceResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); - } - return message; - }; - - /** - * Creates a plain object from a CreateKeyspaceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CreateKeyspaceResponse - * @static - * @param {vtctldata.CreateKeyspaceResponse} message CreateKeyspaceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateKeyspaceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); - return object; - }; - - /** - * Converts this CreateKeyspaceResponse to JSON. - * @function toJSON - * @memberof vtctldata.CreateKeyspaceResponse - * @instance - * @returns {Object.} JSON object - */ - CreateKeyspaceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateKeyspaceResponse; - })(); - - vtctldata.CreateShardRequest = (function() { - - /** - * Properties of a CreateShardRequest. - * @memberof vtctldata - * @interface ICreateShardRequest - * @property {string|null} [keyspace] CreateShardRequest keyspace - * @property {string|null} [shard_name] CreateShardRequest shard_name - * @property {boolean|null} [force] CreateShardRequest force - * @property {boolean|null} [include_parent] CreateShardRequest include_parent - */ - - /** - * Constructs a new CreateShardRequest. - * @memberof vtctldata - * @classdesc Represents a CreateShardRequest. - * @implements ICreateShardRequest - * @constructor - * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set - */ - function CreateShardRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.keyspace = ""; - - /** - * CreateShardRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.shard_name = ""; - - /** - * CreateShardRequest force. - * @member {boolean} force - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.force = false; - - /** - * CreateShardRequest include_parent. - * @member {boolean} include_parent - * @memberof vtctldata.CreateShardRequest - * @instance - */ - CreateShardRequest.prototype.include_parent = false; - - /** - * Creates a new CreateShardRequest instance using the specified properties. - * @function create - * @memberof vtctldata.CreateShardRequest - * @static - * @param {vtctldata.ICreateShardRequest=} [properties] Properties to set - * @returns {vtctldata.CreateShardRequest} CreateShardRequest instance - */ - CreateShardRequest.create = function create(properties) { - return new CreateShardRequest(properties); - }; - - /** - * Encodes the specified CreateShardRequest message. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.CreateShardRequest - * @static - * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.include_parent != null && Object.hasOwnProperty.call(message, "include_parent")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_parent); - return writer; - }; - - /** - * Encodes the specified CreateShardRequest message, length delimited. Does not implicitly {@link vtctldata.CreateShardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CreateShardRequest - * @static - * @param {vtctldata.ICreateShardRequest} message CreateShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateShardRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CreateShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateShardRequest} CreateShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard_name = reader.string(); - break; - case 3: - message.force = reader.bool(); - break; - case 4: - message.include_parent = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateShardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CreateShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateShardRequest} CreateShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateShardRequest message. - * @function verify - * @memberof vtctldata.CreateShardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateShardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.include_parent != null && message.hasOwnProperty("include_parent")) - if (typeof message.include_parent !== "boolean") - return "include_parent: boolean expected"; - return null; - }; - - /** - * Creates a CreateShardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CreateShardRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CreateShardRequest} CreateShardRequest - */ - CreateShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateShardRequest) - return object; - var message = new $root.vtctldata.CreateShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.include_parent != null) - message.include_parent = Boolean(object.include_parent); - return message; - }; - - /** - * Creates a plain object from a CreateShardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CreateShardRequest - * @static - * @param {vtctldata.CreateShardRequest} message CreateShardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateShardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard_name = ""; - object.force = false; - object.include_parent = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.include_parent != null && message.hasOwnProperty("include_parent")) - object.include_parent = message.include_parent; - return object; - }; - - /** - * Converts this CreateShardRequest to JSON. - * @function toJSON - * @memberof vtctldata.CreateShardRequest - * @instance - * @returns {Object.} JSON object - */ - CreateShardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateShardRequest; - })(); - - vtctldata.CreateShardResponse = (function() { - - /** - * Properties of a CreateShardResponse. - * @memberof vtctldata - * @interface ICreateShardResponse - * @property {vtctldata.IKeyspace|null} [keyspace] CreateShardResponse keyspace - * @property {vtctldata.IShard|null} [shard] CreateShardResponse shard - * @property {boolean|null} [shard_already_exists] CreateShardResponse shard_already_exists - */ - - /** - * Constructs a new CreateShardResponse. - * @memberof vtctldata - * @classdesc Represents a CreateShardResponse. - * @implements ICreateShardResponse - * @constructor - * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set - */ - function CreateShardResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateShardResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.CreateShardResponse - * @instance - */ - CreateShardResponse.prototype.keyspace = null; - - /** - * CreateShardResponse shard. - * @member {vtctldata.IShard|null|undefined} shard - * @memberof vtctldata.CreateShardResponse - * @instance - */ - CreateShardResponse.prototype.shard = null; - - /** - * CreateShardResponse shard_already_exists. - * @member {boolean} shard_already_exists - * @memberof vtctldata.CreateShardResponse - * @instance - */ - CreateShardResponse.prototype.shard_already_exists = false; - - /** - * Creates a new CreateShardResponse instance using the specified properties. - * @function create - * @memberof vtctldata.CreateShardResponse - * @static - * @param {vtctldata.ICreateShardResponse=} [properties] Properties to set - * @returns {vtctldata.CreateShardResponse} CreateShardResponse instance - */ - CreateShardResponse.create = function create(properties) { - return new CreateShardResponse(properties); - }; - - /** - * Encodes the specified CreateShardResponse message. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.CreateShardResponse - * @static - * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShardResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shard_already_exists != null && Object.hasOwnProperty.call(message, "shard_already_exists")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.shard_already_exists); - return writer; - }; - - /** - * Encodes the specified CreateShardResponse message, length delimited. Does not implicitly {@link vtctldata.CreateShardResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.CreateShardResponse - * @static - * @param {vtctldata.ICreateShardResponse} message CreateShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateShardResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.CreateShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.CreateShardResponse} CreateShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShardResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.CreateShardResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); - break; - case 2: - message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); - break; - case 3: - message.shard_already_exists = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateShardResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.CreateShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.CreateShardResponse} CreateShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShardResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateShardResponse message. - * @function verify - * @memberof vtctldata.CreateShardResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateShardResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.vtctldata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } - if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) - if (typeof message.shard_already_exists !== "boolean") - return "shard_already_exists: boolean expected"; - return null; - }; - - /** - * Creates a CreateShardResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.CreateShardResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.CreateShardResponse} CreateShardResponse - */ - CreateShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.CreateShardResponse) - return object; - var message = new $root.vtctldata.CreateShardResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.CreateShardResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); - } - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.CreateShardResponse.shard: object expected"); - message.shard = $root.vtctldata.Shard.fromObject(object.shard); - } - if (object.shard_already_exists != null) - message.shard_already_exists = Boolean(object.shard_already_exists); - return message; - }; - - /** - * Creates a plain object from a CreateShardResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.CreateShardResponse - * @static - * @param {vtctldata.CreateShardResponse} message CreateShardResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = null; - object.shard = null; - object.shard_already_exists = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.vtctldata.Shard.toObject(message.shard, options); - if (message.shard_already_exists != null && message.hasOwnProperty("shard_already_exists")) - object.shard_already_exists = message.shard_already_exists; - return object; - }; - - /** - * Converts this CreateShardResponse to JSON. - * @function toJSON - * @memberof vtctldata.CreateShardResponse - * @instance - * @returns {Object.} JSON object - */ - CreateShardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateShardResponse; - })(); - - vtctldata.DeleteKeyspaceRequest = (function() { - - /** - * Properties of a DeleteKeyspaceRequest. - * @memberof vtctldata - * @interface IDeleteKeyspaceRequest - * @property {string|null} [keyspace] DeleteKeyspaceRequest keyspace - * @property {boolean|null} [recursive] DeleteKeyspaceRequest recursive - */ - - /** - * Constructs a new DeleteKeyspaceRequest. - * @memberof vtctldata - * @classdesc Represents a DeleteKeyspaceRequest. - * @implements IDeleteKeyspaceRequest - * @constructor - * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set - */ - function DeleteKeyspaceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - */ - DeleteKeyspaceRequest.prototype.keyspace = ""; - - /** - * DeleteKeyspaceRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - */ - DeleteKeyspaceRequest.prototype.recursive = false; - - /** - * Creates a new DeleteKeyspaceRequest instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.IDeleteKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest instance - */ - DeleteKeyspaceRequest.create = function create(properties) { - return new DeleteKeyspaceRequest(properties); - }; - - /** - * Encodes the specified DeleteKeyspaceRequest message. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); - return writer; - }; - - /** - * Encodes the specified DeleteKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.IDeleteKeyspaceRequest} message DeleteKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.recursive = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteKeyspaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteKeyspaceRequest message. - * @function verify - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteKeyspaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - return null; - }; - - /** - * Creates a DeleteKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteKeyspaceRequest} DeleteKeyspaceRequest - */ - DeleteKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteKeyspaceRequest) - return object; - var message = new $root.vtctldata.DeleteKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - return message; - }; - - /** - * Creates a plain object from a DeleteKeyspaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteKeyspaceRequest - * @static - * @param {vtctldata.DeleteKeyspaceRequest} message DeleteKeyspaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteKeyspaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.recursive = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - return object; - }; - - /** - * Converts this DeleteKeyspaceRequest to JSON. - * @function toJSON - * @memberof vtctldata.DeleteKeyspaceRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteKeyspaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteKeyspaceRequest; - })(); - - vtctldata.DeleteKeyspaceResponse = (function() { - - /** - * Properties of a DeleteKeyspaceResponse. - * @memberof vtctldata - * @interface IDeleteKeyspaceResponse - */ - - /** - * Constructs a new DeleteKeyspaceResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteKeyspaceResponse. - * @implements IDeleteKeyspaceResponse - * @constructor - * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set - */ - function DeleteKeyspaceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new DeleteKeyspaceResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.IDeleteKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse instance - */ - DeleteKeyspaceResponse.create = function create(properties) { - return new DeleteKeyspaceResponse(properties); - }; - - /** - * Encodes the specified DeleteKeyspaceResponse message. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DeleteKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteKeyspaceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.IDeleteKeyspaceResponse} message DeleteKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteKeyspaceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteKeyspaceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteKeyspaceResponse message. - * @function verify - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteKeyspaceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DeleteKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteKeyspaceResponse} DeleteKeyspaceResponse - */ - DeleteKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteKeyspaceResponse) - return object; - return new $root.vtctldata.DeleteKeyspaceResponse(); - }; - - /** - * Creates a plain object from a DeleteKeyspaceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteKeyspaceResponse - * @static - * @param {vtctldata.DeleteKeyspaceResponse} message DeleteKeyspaceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteKeyspaceResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DeleteKeyspaceResponse to JSON. - * @function toJSON - * @memberof vtctldata.DeleteKeyspaceResponse - * @instance - * @returns {Object.} JSON object - */ - DeleteKeyspaceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteKeyspaceResponse; - })(); - - vtctldata.DeleteShardsRequest = (function() { - - /** - * Properties of a DeleteShardsRequest. - * @memberof vtctldata - * @interface IDeleteShardsRequest - * @property {Array.|null} [shards] DeleteShardsRequest shards - * @property {boolean|null} [recursive] DeleteShardsRequest recursive - * @property {boolean|null} [even_if_serving] DeleteShardsRequest even_if_serving - */ - - /** - * Constructs a new DeleteShardsRequest. - * @memberof vtctldata - * @classdesc Represents a DeleteShardsRequest. - * @implements IDeleteShardsRequest - * @constructor - * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set - */ - function DeleteShardsRequest(properties) { - this.shards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteShardsRequest shards. - * @member {Array.} shards - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.shards = $util.emptyArray; - - /** - * DeleteShardsRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.recursive = false; - - /** - * DeleteShardsRequest even_if_serving. - * @member {boolean} even_if_serving - * @memberof vtctldata.DeleteShardsRequest - * @instance - */ - DeleteShardsRequest.prototype.even_if_serving = false; - - /** - * Creates a new DeleteShardsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.IDeleteShardsRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest instance - */ - DeleteShardsRequest.create = function create(properties) { - return new DeleteShardsRequest(properties); - }; - - /** - * Encodes the specified DeleteShardsRequest message. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - $root.vtctldata.Shard.encode(message.shards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.recursive); - if (message.even_if_serving != null && Object.hasOwnProperty.call(message, "even_if_serving")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.even_if_serving); - return writer; - }; - - /** - * Encodes the specified DeleteShardsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.IDeleteShardsRequest} message DeleteShardsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.shards && message.shards.length)) - message.shards = []; - message.shards.push($root.vtctldata.Shard.decode(reader, reader.uint32())); - break; - case 2: - message.recursive = reader.bool(); - break; - case 4: - message.even_if_serving = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteShardsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteShardsRequest message. - * @function verify - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteShardsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) { - var error = $root.vtctldata.Shard.verify(message.shards[i]); - if (error) - return "shards." + error; - } - } - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) - if (typeof message.even_if_serving !== "boolean") - return "even_if_serving: boolean expected"; - return null; - }; - - /** - * Creates a DeleteShardsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteShardsRequest} DeleteShardsRequest - */ - DeleteShardsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteShardsRequest) - return object; - var message = new $root.vtctldata.DeleteShardsRequest(); - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".vtctldata.DeleteShardsRequest.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) { - if (typeof object.shards[i] !== "object") - throw TypeError(".vtctldata.DeleteShardsRequest.shards: object expected"); - message.shards[i] = $root.vtctldata.Shard.fromObject(object.shards[i]); - } - } - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - if (object.even_if_serving != null) - message.even_if_serving = Boolean(object.even_if_serving); - return message; - }; - - /** - * Creates a plain object from a DeleteShardsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteShardsRequest - * @static - * @param {vtctldata.DeleteShardsRequest} message DeleteShardsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteShardsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shards = []; - if (options.defaults) { - object.recursive = false; - object.even_if_serving = false; - } - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = $root.vtctldata.Shard.toObject(message.shards[j], options); - } - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - if (message.even_if_serving != null && message.hasOwnProperty("even_if_serving")) - object.even_if_serving = message.even_if_serving; - return object; - }; - - /** - * Converts this DeleteShardsRequest to JSON. - * @function toJSON - * @memberof vtctldata.DeleteShardsRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteShardsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteShardsRequest; - })(); - - vtctldata.DeleteShardsResponse = (function() { - - /** - * Properties of a DeleteShardsResponse. - * @memberof vtctldata - * @interface IDeleteShardsResponse - */ - - /** - * Constructs a new DeleteShardsResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteShardsResponse. - * @implements IDeleteShardsResponse - * @constructor - * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set - */ - function DeleteShardsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new DeleteShardsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.IDeleteShardsResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse instance - */ - DeleteShardsResponse.create = function create(properties) { - return new DeleteShardsResponse(properties); - }; - - /** - * Encodes the specified DeleteShardsResponse message. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DeleteShardsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteShardsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.IDeleteShardsResponse} message DeleteShardsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteShardsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteShardsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteShardsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteShardsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteShardsResponse message. - * @function verify - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteShardsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DeleteShardsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteShardsResponse} DeleteShardsResponse - */ - DeleteShardsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteShardsResponse) - return object; - return new $root.vtctldata.DeleteShardsResponse(); - }; - - /** - * Creates a plain object from a DeleteShardsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteShardsResponse - * @static - * @param {vtctldata.DeleteShardsResponse} message DeleteShardsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteShardsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DeleteShardsResponse to JSON. - * @function toJSON - * @memberof vtctldata.DeleteShardsResponse - * @instance - * @returns {Object.} JSON object - */ - DeleteShardsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteShardsResponse; - })(); - - vtctldata.DeleteTabletsRequest = (function() { - - /** - * Properties of a DeleteTabletsRequest. - * @memberof vtctldata - * @interface IDeleteTabletsRequest - * @property {Array.|null} [tablet_aliases] DeleteTabletsRequest tablet_aliases - * @property {boolean|null} [allow_primary] DeleteTabletsRequest allow_primary - */ - - /** - * Constructs a new DeleteTabletsRequest. - * @memberof vtctldata - * @classdesc Represents a DeleteTabletsRequest. - * @implements IDeleteTabletsRequest - * @constructor - * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set - */ - function DeleteTabletsRequest(properties) { - this.tablet_aliases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTabletsRequest tablet_aliases. - * @member {Array.} tablet_aliases - * @memberof vtctldata.DeleteTabletsRequest - * @instance - */ - DeleteTabletsRequest.prototype.tablet_aliases = $util.emptyArray; - - /** - * DeleteTabletsRequest allow_primary. - * @member {boolean} allow_primary - * @memberof vtctldata.DeleteTabletsRequest - * @instance - */ - DeleteTabletsRequest.prototype.allow_primary = false; - - /** - * Creates a new DeleteTabletsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {vtctldata.IDeleteTabletsRequest=} [properties] Properties to set - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest instance - */ - DeleteTabletsRequest.create = function create(properties) { - return new DeleteTabletsRequest(properties); - }; - - /** - * Encodes the specified DeleteTabletsRequest message. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTabletsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_aliases != null && message.tablet_aliases.length) - for (var i = 0; i < message.tablet_aliases.length; ++i) - $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.allow_primary != null && Object.hasOwnProperty.call(message, "allow_primary")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_primary); - return writer; - }; - - /** - * Encodes the specified DeleteTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {vtctldata.IDeleteTabletsRequest} message DeleteTabletsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTabletsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.tablet_aliases && message.tablet_aliases.length)) - message.tablet_aliases = []; - message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - case 2: - message.allow_primary = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTabletsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTabletsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTabletsRequest message. - * @function verify - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTabletsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { - if (!Array.isArray(message.tablet_aliases)) - return "tablet_aliases: array expected"; - for (var i = 0; i < message.tablet_aliases.length; ++i) { - var error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); - if (error) - return "tablet_aliases." + error; - } - } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - if (typeof message.allow_primary !== "boolean") - return "allow_primary: boolean expected"; - return null; - }; - - /** - * Creates a DeleteTabletsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteTabletsRequest} DeleteTabletsRequest - */ - DeleteTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteTabletsRequest) - return object; - var message = new $root.vtctldata.DeleteTabletsRequest(); - if (object.tablet_aliases) { - if (!Array.isArray(object.tablet_aliases)) - throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: array expected"); - message.tablet_aliases = []; - for (var i = 0; i < object.tablet_aliases.length; ++i) { - if (typeof object.tablet_aliases[i] !== "object") - throw TypeError(".vtctldata.DeleteTabletsRequest.tablet_aliases: object expected"); - message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); - } - } - if (object.allow_primary != null) - message.allow_primary = Boolean(object.allow_primary); - return message; - }; - - /** - * Creates a plain object from a DeleteTabletsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteTabletsRequest - * @static - * @param {vtctldata.DeleteTabletsRequest} message DeleteTabletsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTabletsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tablet_aliases = []; - if (options.defaults) - object.allow_primary = false; - if (message.tablet_aliases && message.tablet_aliases.length) { - object.tablet_aliases = []; - for (var j = 0; j < message.tablet_aliases.length; ++j) - object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); - } - if (message.allow_primary != null && message.hasOwnProperty("allow_primary")) - object.allow_primary = message.allow_primary; - return object; - }; - - /** - * Converts this DeleteTabletsRequest to JSON. - * @function toJSON - * @memberof vtctldata.DeleteTabletsRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTabletsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteTabletsRequest; - })(); - - vtctldata.DeleteTabletsResponse = (function() { - - /** - * Properties of a DeleteTabletsResponse. - * @memberof vtctldata - * @interface IDeleteTabletsResponse - */ - - /** - * Constructs a new DeleteTabletsResponse. - * @memberof vtctldata - * @classdesc Represents a DeleteTabletsResponse. - * @implements IDeleteTabletsResponse - * @constructor - * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set - */ - function DeleteTabletsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new DeleteTabletsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {vtctldata.IDeleteTabletsResponse=} [properties] Properties to set - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse instance - */ - DeleteTabletsResponse.create = function create(properties) { - return new DeleteTabletsResponse(properties); - }; - - /** - * Encodes the specified DeleteTabletsResponse message. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTabletsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DeleteTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.DeleteTabletsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {vtctldata.IDeleteTabletsResponse} message DeleteTabletsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTabletsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.DeleteTabletsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTabletsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTabletsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTabletsResponse message. - * @function verify - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTabletsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DeleteTabletsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.DeleteTabletsResponse} DeleteTabletsResponse - */ - DeleteTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.DeleteTabletsResponse) - return object; - return new $root.vtctldata.DeleteTabletsResponse(); - }; - - /** - * Creates a plain object from a DeleteTabletsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.DeleteTabletsResponse - * @static - * @param {vtctldata.DeleteTabletsResponse} message DeleteTabletsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTabletsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DeleteTabletsResponse to JSON. - * @function toJSON - * @memberof vtctldata.DeleteTabletsResponse - * @instance - * @returns {Object.} JSON object - */ - DeleteTabletsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteTabletsResponse; - })(); - - vtctldata.EmergencyReparentShardRequest = (function() { - - /** - * Properties of an EmergencyReparentShardRequest. - * @memberof vtctldata - * @interface IEmergencyReparentShardRequest - * @property {string|null} [keyspace] EmergencyReparentShardRequest keyspace - * @property {string|null} [shard] EmergencyReparentShardRequest shard - * @property {topodata.ITabletAlias|null} [new_primary] EmergencyReparentShardRequest new_primary - * @property {Array.|null} [ignore_replicas] EmergencyReparentShardRequest ignore_replicas - * @property {vttime.IDuration|null} [wait_replicas_timeout] EmergencyReparentShardRequest wait_replicas_timeout - */ - - /** - * Constructs a new EmergencyReparentShardRequest. - * @memberof vtctldata - * @classdesc Represents an EmergencyReparentShardRequest. - * @implements IEmergencyReparentShardRequest - * @constructor - * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set - */ - function EmergencyReparentShardRequest(properties) { - this.ignore_replicas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EmergencyReparentShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.keyspace = ""; - - /** - * EmergencyReparentShardRequest shard. - * @member {string} shard - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.shard = ""; - - /** - * EmergencyReparentShardRequest new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.new_primary = null; - - /** - * EmergencyReparentShardRequest ignore_replicas. - * @member {Array.} ignore_replicas - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.ignore_replicas = $util.emptyArray; - - /** - * EmergencyReparentShardRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - */ - EmergencyReparentShardRequest.prototype.wait_replicas_timeout = null; - - /** - * Creates a new EmergencyReparentShardRequest instance using the specified properties. - * @function create - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {vtctldata.IEmergencyReparentShardRequest=} [properties] Properties to set - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest instance - */ - EmergencyReparentShardRequest.create = function create(properties) { - return new EmergencyReparentShardRequest(properties); - }; - - /** - * Encodes the specified EmergencyReparentShardRequest message. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmergencyReparentShardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.ignore_replicas != null && message.ignore_replicas.length) - for (var i = 0; i < message.ignore_replicas.length; ++i) - $root.topodata.TabletAlias.encode(message.ignore_replicas[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EmergencyReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {vtctldata.IEmergencyReparentShardRequest} message EmergencyReparentShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmergencyReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmergencyReparentShardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.ignore_replicas && message.ignore_replicas.length)) - message.ignore_replicas = []; - message.ignore_replicas.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - case 5: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EmergencyReparentShardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmergencyReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EmergencyReparentShardRequest message. - * @function verify - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EmergencyReparentShardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) { - var error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.ignore_replicas != null && message.hasOwnProperty("ignore_replicas")) { - if (!Array.isArray(message.ignore_replicas)) - return "ignore_replicas: array expected"; - for (var i = 0; i < message.ignore_replicas.length; ++i) { - var error = $root.topodata.TabletAlias.verify(message.ignore_replicas[i]); - if (error) - return "ignore_replicas." + error; - } - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); - if (error) - return "wait_replicas_timeout." + error; - } - return null; - }; - - /** - * Creates an EmergencyReparentShardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.EmergencyReparentShardRequest} EmergencyReparentShardRequest - */ - EmergencyReparentShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.EmergencyReparentShardRequest) - return object; - var message = new $root.vtctldata.EmergencyReparentShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.ignore_replicas) { - if (!Array.isArray(object.ignore_replicas)) - throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: array expected"); - message.ignore_replicas = []; - for (var i = 0; i < object.ignore_replicas.length; ++i) { - if (typeof object.ignore_replicas[i] !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.ignore_replicas: object expected"); - message.ignore_replicas[i] = $root.topodata.TabletAlias.fromObject(object.ignore_replicas[i]); - } - } - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); - } - return message; - }; - - /** - * Creates a plain object from an EmergencyReparentShardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.EmergencyReparentShardRequest - * @static - * @param {vtctldata.EmergencyReparentShardRequest} message EmergencyReparentShardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EmergencyReparentShardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ignore_replicas = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.wait_replicas_timeout = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.ignore_replicas && message.ignore_replicas.length) { - object.ignore_replicas = []; - for (var j = 0; j < message.ignore_replicas.length; ++j) - object.ignore_replicas[j] = $root.topodata.TabletAlias.toObject(message.ignore_replicas[j], options); - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); - return object; - }; - - /** - * Converts this EmergencyReparentShardRequest to JSON. - * @function toJSON - * @memberof vtctldata.EmergencyReparentShardRequest - * @instance - * @returns {Object.} JSON object - */ - EmergencyReparentShardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EmergencyReparentShardRequest; - })(); - - vtctldata.EmergencyReparentShardResponse = (function() { - - /** - * Properties of an EmergencyReparentShardResponse. - * @memberof vtctldata - * @interface IEmergencyReparentShardResponse - * @property {string|null} [keyspace] EmergencyReparentShardResponse keyspace - * @property {string|null} [shard] EmergencyReparentShardResponse shard - * @property {topodata.ITabletAlias|null} [promoted_primary] EmergencyReparentShardResponse promoted_primary - * @property {Array.|null} [events] EmergencyReparentShardResponse events - */ - - /** - * Constructs a new EmergencyReparentShardResponse. - * @memberof vtctldata - * @classdesc Represents an EmergencyReparentShardResponse. - * @implements IEmergencyReparentShardResponse - * @constructor - * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set - */ - function EmergencyReparentShardResponse(properties) { - this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EmergencyReparentShardResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.keyspace = ""; - - /** - * EmergencyReparentShardResponse shard. - * @member {string} shard - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.shard = ""; - - /** - * EmergencyReparentShardResponse promoted_primary. - * @member {topodata.ITabletAlias|null|undefined} promoted_primary - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.promoted_primary = null; - - /** - * EmergencyReparentShardResponse events. - * @member {Array.} events - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - */ - EmergencyReparentShardResponse.prototype.events = $util.emptyArray; - - /** - * Creates a new EmergencyReparentShardResponse instance using the specified properties. - * @function create - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {vtctldata.IEmergencyReparentShardResponse=} [properties] Properties to set - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse instance - */ - EmergencyReparentShardResponse.create = function create(properties) { - return new EmergencyReparentShardResponse(properties); - }; - - /** - * Encodes the specified EmergencyReparentShardResponse message. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmergencyReparentShardResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) - $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EmergencyReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.EmergencyReparentShardResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {vtctldata.IEmergencyReparentShardResponse} message EmergencyReparentShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EmergencyReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmergencyReparentShardResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.EmergencyReparentShardResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EmergencyReparentShardResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EmergencyReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EmergencyReparentShardResponse message. - * @function verify - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EmergencyReparentShardResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { - var error = $root.topodata.TabletAlias.verify(message.promoted_primary); - if (error) - return "promoted_primary." + error; - } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates an EmergencyReparentShardResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.EmergencyReparentShardResponse} EmergencyReparentShardResponse - */ - EmergencyReparentShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.EmergencyReparentShardResponse) - return object; - var message = new $root.vtctldata.EmergencyReparentShardResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.promoted_primary != null) { - if (typeof object.promoted_primary !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardResponse.promoted_primary: object expected"); - message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.EmergencyReparentShardResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EmergencyReparentShardResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.EmergencyReparentShardResponse - * @static - * @param {vtctldata.EmergencyReparentShardResponse} message EmergencyReparentShardResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EmergencyReparentShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.promoted_primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) - object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this EmergencyReparentShardResponse to JSON. - * @function toJSON - * @memberof vtctldata.EmergencyReparentShardResponse - * @instance - * @returns {Object.} JSON object - */ - EmergencyReparentShardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EmergencyReparentShardResponse; - })(); - - vtctldata.FindAllShardsInKeyspaceRequest = (function() { - - /** - * Properties of a FindAllShardsInKeyspaceRequest. - * @memberof vtctldata - * @interface IFindAllShardsInKeyspaceRequest - * @property {string|null} [keyspace] FindAllShardsInKeyspaceRequest keyspace - */ - - /** - * Constructs a new FindAllShardsInKeyspaceRequest. - * @memberof vtctldata - * @classdesc Represents a FindAllShardsInKeyspaceRequest. - * @implements IFindAllShardsInKeyspaceRequest - * @constructor - * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set - */ - function FindAllShardsInKeyspaceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FindAllShardsInKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @instance - */ - FindAllShardsInKeyspaceRequest.prototype.keyspace = ""; - - /** - * Creates a new FindAllShardsInKeyspaceRequest instance using the specified properties. - * @function create - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest instance - */ - FindAllShardsInKeyspaceRequest.create = function create(properties) { - return new FindAllShardsInKeyspaceRequest(properties); - }; - - /** - * Encodes the specified FindAllShardsInKeyspaceRequest message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindAllShardsInKeyspaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified FindAllShardsInKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {vtctldata.IFindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindAllShardsInKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindAllShardsInKeyspaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FindAllShardsInKeyspaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindAllShardsInKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FindAllShardsInKeyspaceRequest message. - * @function verify - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FindAllShardsInKeyspaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a FindAllShardsInKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.FindAllShardsInKeyspaceRequest} FindAllShardsInKeyspaceRequest - */ - FindAllShardsInKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceRequest) - return object; - var message = new $root.vtctldata.FindAllShardsInKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a FindAllShardsInKeyspaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @static - * @param {vtctldata.FindAllShardsInKeyspaceRequest} message FindAllShardsInKeyspaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FindAllShardsInKeyspaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this FindAllShardsInKeyspaceRequest to JSON. - * @function toJSON - * @memberof vtctldata.FindAllShardsInKeyspaceRequest - * @instance - * @returns {Object.} JSON object - */ - FindAllShardsInKeyspaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FindAllShardsInKeyspaceRequest; - })(); - - vtctldata.FindAllShardsInKeyspaceResponse = (function() { - - /** - * Properties of a FindAllShardsInKeyspaceResponse. - * @memberof vtctldata - * @interface IFindAllShardsInKeyspaceResponse - * @property {Object.|null} [shards] FindAllShardsInKeyspaceResponse shards - */ - - /** - * Constructs a new FindAllShardsInKeyspaceResponse. - * @memberof vtctldata - * @classdesc Represents a FindAllShardsInKeyspaceResponse. - * @implements IFindAllShardsInKeyspaceResponse - * @constructor - * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set - */ - function FindAllShardsInKeyspaceResponse(properties) { - this.shards = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FindAllShardsInKeyspaceResponse shards. - * @member {Object.} shards - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @instance - */ - FindAllShardsInKeyspaceResponse.prototype.shards = $util.emptyObject; - - /** - * Creates a new FindAllShardsInKeyspaceResponse instance using the specified properties. - * @function create - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse instance - */ - FindAllShardsInKeyspaceResponse.create = function create(properties) { - return new FindAllShardsInKeyspaceResponse(properties); - }; - - /** - * Encodes the specified FindAllShardsInKeyspaceResponse message. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindAllShardsInKeyspaceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shards != null && Object.hasOwnProperty.call(message, "shards")) - for (var keys = Object.keys(message.shards), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.vtctldata.Shard.encode(message.shards[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified FindAllShardsInKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.FindAllShardsInKeyspaceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {vtctldata.IFindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindAllShardsInKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindAllShardsInKeyspaceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.shards === $util.emptyObject) - message.shards = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.vtctldata.Shard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.shards[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FindAllShardsInKeyspaceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindAllShardsInKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FindAllShardsInKeyspaceResponse message. - * @function verify - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FindAllShardsInKeyspaceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!$util.isObject(message.shards)) - return "shards: object expected"; - var key = Object.keys(message.shards); - for (var i = 0; i < key.length; ++i) { - var error = $root.vtctldata.Shard.verify(message.shards[key[i]]); - if (error) - return "shards." + error; - } - } - return null; - }; - - /** - * Creates a FindAllShardsInKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.FindAllShardsInKeyspaceResponse} FindAllShardsInKeyspaceResponse - */ - FindAllShardsInKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.FindAllShardsInKeyspaceResponse) - return object; - var message = new $root.vtctldata.FindAllShardsInKeyspaceResponse(); - if (object.shards) { - if (typeof object.shards !== "object") - throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); - message.shards = {}; - for (var keys = Object.keys(object.shards), i = 0; i < keys.length; ++i) { - if (typeof object.shards[keys[i]] !== "object") - throw TypeError(".vtctldata.FindAllShardsInKeyspaceResponse.shards: object expected"); - message.shards[keys[i]] = $root.vtctldata.Shard.fromObject(object.shards[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a FindAllShardsInKeyspaceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @static - * @param {vtctldata.FindAllShardsInKeyspaceResponse} message FindAllShardsInKeyspaceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FindAllShardsInKeyspaceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.shards = {}; - var keys2; - if (message.shards && (keys2 = Object.keys(message.shards)).length) { - object.shards = {}; - for (var j = 0; j < keys2.length; ++j) - object.shards[keys2[j]] = $root.vtctldata.Shard.toObject(message.shards[keys2[j]], options); - } - return object; - }; - - /** - * Converts this FindAllShardsInKeyspaceResponse to JSON. - * @function toJSON - * @memberof vtctldata.FindAllShardsInKeyspaceResponse - * @instance - * @returns {Object.} JSON object - */ - FindAllShardsInKeyspaceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FindAllShardsInKeyspaceResponse; - })(); - - vtctldata.GetBackupsRequest = (function() { - - /** - * Properties of a GetBackupsRequest. - * @memberof vtctldata - * @interface IGetBackupsRequest - * @property {string|null} [keyspace] GetBackupsRequest keyspace - * @property {string|null} [shard] GetBackupsRequest shard - */ - - /** - * Constructs a new GetBackupsRequest. - * @memberof vtctldata - * @classdesc Represents a GetBackupsRequest. - * @implements IGetBackupsRequest - * @constructor - * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set - */ - function GetBackupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.keyspace = ""; - - /** - * GetBackupsRequest shard. - * @member {string} shard - * @memberof vtctldata.GetBackupsRequest - * @instance - */ - GetBackupsRequest.prototype.shard = ""; - - /** - * Creates a new GetBackupsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {vtctldata.IGetBackupsRequest=} [properties] Properties to set - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest instance - */ - GetBackupsRequest.create = function create(properties) { - return new GetBackupsRequest(properties); - }; - - /** - * Encodes the specified GetBackupsRequest message. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - return writer; - }; - - /** - * Encodes the specified GetBackupsRequest message, length delimited. Does not implicitly {@link vtctldata.GetBackupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {vtctldata.IGetBackupsRequest} message GetBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupsRequest message. - * @function verify - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - return null; - }; - - /** - * Creates a GetBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetBackupsRequest} GetBackupsRequest - */ - GetBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetBackupsRequest) - return object; - var message = new $root.vtctldata.GetBackupsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - return message; - }; - - /** - * Creates a plain object from a GetBackupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetBackupsRequest - * @static - * @param {vtctldata.GetBackupsRequest} message GetBackupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - return object; - }; - - /** - * Converts this GetBackupsRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetBackupsRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetBackupsRequest; - })(); - - vtctldata.GetBackupsResponse = (function() { - - /** - * Properties of a GetBackupsResponse. - * @memberof vtctldata - * @interface IGetBackupsResponse - * @property {Array.|null} [backups] GetBackupsResponse backups - */ - - /** - * Constructs a new GetBackupsResponse. - * @memberof vtctldata - * @classdesc Represents a GetBackupsResponse. - * @implements IGetBackupsResponse - * @constructor - * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set - */ - function GetBackupsResponse(properties) { - this.backups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupsResponse backups. - * @member {Array.} backups - * @memberof vtctldata.GetBackupsResponse - * @instance - */ - GetBackupsResponse.prototype.backups = $util.emptyArray; - - /** - * Creates a new GetBackupsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {vtctldata.IGetBackupsResponse=} [properties] Properties to set - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse instance - */ - GetBackupsResponse.create = function create(properties) { - return new GetBackupsResponse(properties); - }; - - /** - * Encodes the specified GetBackupsResponse message. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.mysqlctl.BackupInfo.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetBackupsResponse message, length delimited. Does not implicitly {@link vtctldata.GetBackupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {vtctldata.IGetBackupsResponse} message GetBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetBackupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.mysqlctl.BackupInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupsResponse message. - * @function verify - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.mysqlctl.BackupInfo.verify(message.backups[i]); - if (error) - return "backups." + error; - } - } - return null; - }; - - /** - * Creates a GetBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetBackupsResponse} GetBackupsResponse - */ - GetBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetBackupsResponse) - return object; - var message = new $root.vtctldata.GetBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".vtctldata.GetBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".vtctldata.GetBackupsResponse.backups: object expected"); - message.backups[i] = $root.mysqlctl.BackupInfo.fromObject(object.backups[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetBackupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetBackupsResponse - * @static - * @param {vtctldata.GetBackupsResponse} message GetBackupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backups = []; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.mysqlctl.BackupInfo.toObject(message.backups[j], options); - } - return object; - }; - - /** - * Converts this GetBackupsResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetBackupsResponse - * @instance - * @returns {Object.} JSON object - */ - GetBackupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetBackupsResponse; - })(); - - vtctldata.GetCellInfoNamesRequest = (function() { - - /** - * Properties of a GetCellInfoNamesRequest. - * @memberof vtctldata - * @interface IGetCellInfoNamesRequest - */ - - /** - * Constructs a new GetCellInfoNamesRequest. - * @memberof vtctldata - * @classdesc Represents a GetCellInfoNamesRequest. - * @implements IGetCellInfoNamesRequest - * @constructor - * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set - */ - function GetCellInfoNamesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new GetCellInfoNamesRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {vtctldata.IGetCellInfoNamesRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest instance - */ - GetCellInfoNamesRequest.create = function create(properties) { - return new GetCellInfoNamesRequest(properties); - }; - - /** - * Encodes the specified GetCellInfoNamesRequest message. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoNamesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified GetCellInfoNamesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {vtctldata.IGetCellInfoNamesRequest} message GetCellInfoNamesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoNamesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoNamesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCellInfoNamesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoNamesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCellInfoNamesRequest message. - * @function verify - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCellInfoNamesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a GetCellInfoNamesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoNamesRequest} GetCellInfoNamesRequest - */ - GetCellInfoNamesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoNamesRequest) - return object; - return new $root.vtctldata.GetCellInfoNamesRequest(); - }; - - /** - * Creates a plain object from a GetCellInfoNamesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetCellInfoNamesRequest - * @static - * @param {vtctldata.GetCellInfoNamesRequest} message GetCellInfoNamesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCellInfoNamesRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this GetCellInfoNamesRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetCellInfoNamesRequest - * @instance - * @returns {Object.} JSON object - */ - GetCellInfoNamesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCellInfoNamesRequest; - })(); - - vtctldata.GetCellInfoNamesResponse = (function() { - - /** - * Properties of a GetCellInfoNamesResponse. - * @memberof vtctldata - * @interface IGetCellInfoNamesResponse - * @property {Array.|null} [names] GetCellInfoNamesResponse names - */ - - /** - * Constructs a new GetCellInfoNamesResponse. - * @memberof vtctldata - * @classdesc Represents a GetCellInfoNamesResponse. - * @implements IGetCellInfoNamesResponse - * @constructor - * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set - */ - function GetCellInfoNamesResponse(properties) { - this.names = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetCellInfoNamesResponse names. - * @member {Array.} names - * @memberof vtctldata.GetCellInfoNamesResponse - * @instance - */ - GetCellInfoNamesResponse.prototype.names = $util.emptyArray; - - /** - * Creates a new GetCellInfoNamesResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {vtctldata.IGetCellInfoNamesResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse instance - */ - GetCellInfoNamesResponse.create = function create(properties) { - return new GetCellInfoNamesResponse(properties); - }; - - /** - * Encodes the specified GetCellInfoNamesResponse message. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoNamesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.names != null && message.names.length) - for (var i = 0; i < message.names.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.names[i]); - return writer; - }; - - /** - * Encodes the specified GetCellInfoNamesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoNamesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {vtctldata.IGetCellInfoNamesResponse} message GetCellInfoNamesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoNamesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoNamesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoNamesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.names && message.names.length)) - message.names = []; - message.names.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCellInfoNamesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoNamesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCellInfoNamesResponse message. - * @function verify - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCellInfoNamesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.names != null && message.hasOwnProperty("names")) { - if (!Array.isArray(message.names)) - return "names: array expected"; - for (var i = 0; i < message.names.length; ++i) - if (!$util.isString(message.names[i])) - return "names: string[] expected"; - } - return null; - }; - - /** - * Creates a GetCellInfoNamesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoNamesResponse} GetCellInfoNamesResponse - */ - GetCellInfoNamesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoNamesResponse) - return object; - var message = new $root.vtctldata.GetCellInfoNamesResponse(); - if (object.names) { - if (!Array.isArray(object.names)) - throw TypeError(".vtctldata.GetCellInfoNamesResponse.names: array expected"); - message.names = []; - for (var i = 0; i < object.names.length; ++i) - message.names[i] = String(object.names[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetCellInfoNamesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetCellInfoNamesResponse - * @static - * @param {vtctldata.GetCellInfoNamesResponse} message GetCellInfoNamesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCellInfoNamesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.names = []; - if (message.names && message.names.length) { - object.names = []; - for (var j = 0; j < message.names.length; ++j) - object.names[j] = message.names[j]; - } - return object; - }; - - /** - * Converts this GetCellInfoNamesResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetCellInfoNamesResponse - * @instance - * @returns {Object.} JSON object - */ - GetCellInfoNamesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCellInfoNamesResponse; - })(); - - vtctldata.GetCellInfoRequest = (function() { - - /** - * Properties of a GetCellInfoRequest. - * @memberof vtctldata - * @interface IGetCellInfoRequest - * @property {string|null} [cell] GetCellInfoRequest cell - */ - - /** - * Constructs a new GetCellInfoRequest. - * @memberof vtctldata - * @classdesc Represents a GetCellInfoRequest. - * @implements IGetCellInfoRequest - * @constructor - * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set - */ - function GetCellInfoRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetCellInfoRequest cell. - * @member {string} cell - * @memberof vtctldata.GetCellInfoRequest - * @instance - */ - GetCellInfoRequest.prototype.cell = ""; - - /** - * Creates a new GetCellInfoRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {vtctldata.IGetCellInfoRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest instance - */ - GetCellInfoRequest.create = function create(properties) { - return new GetCellInfoRequest(properties); - }; - - /** - * Encodes the specified GetCellInfoRequest message. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); - return writer; - }; - - /** - * Encodes the specified GetCellInfoRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {vtctldata.IGetCellInfoRequest} message GetCellInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cell = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCellInfoRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCellInfoRequest message. - * @function verify - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCellInfoRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - return null; - }; - - /** - * Creates a GetCellInfoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoRequest} GetCellInfoRequest - */ - GetCellInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoRequest) - return object; - var message = new $root.vtctldata.GetCellInfoRequest(); - if (object.cell != null) - message.cell = String(object.cell); - return message; - }; - - /** - * Creates a plain object from a GetCellInfoRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetCellInfoRequest - * @static - * @param {vtctldata.GetCellInfoRequest} message GetCellInfoRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCellInfoRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - return object; - }; - - /** - * Converts this GetCellInfoRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetCellInfoRequest - * @instance - * @returns {Object.} JSON object - */ - GetCellInfoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCellInfoRequest; - })(); - - vtctldata.GetCellInfoResponse = (function() { - - /** - * Properties of a GetCellInfoResponse. - * @memberof vtctldata - * @interface IGetCellInfoResponse - * @property {topodata.ICellInfo|null} [cell_info] GetCellInfoResponse cell_info - */ - - /** - * Constructs a new GetCellInfoResponse. - * @memberof vtctldata - * @classdesc Represents a GetCellInfoResponse. - * @implements IGetCellInfoResponse - * @constructor - * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set - */ - function GetCellInfoResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetCellInfoResponse cell_info. - * @member {topodata.ICellInfo|null|undefined} cell_info - * @memberof vtctldata.GetCellInfoResponse - * @instance - */ - GetCellInfoResponse.prototype.cell_info = null; - - /** - * Creates a new GetCellInfoResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {vtctldata.IGetCellInfoResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse instance - */ - GetCellInfoResponse.create = function create(properties) { - return new GetCellInfoResponse(properties); - }; - - /** - * Encodes the specified GetCellInfoResponse message. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cell_info != null && Object.hasOwnProperty.call(message, "cell_info")) - $root.topodata.CellInfo.encode(message.cell_info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetCellInfoResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellInfoResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {vtctldata.IGetCellInfoResponse} message GetCellInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellInfoResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cell_info = $root.topodata.CellInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCellInfoResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellInfoResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCellInfoResponse message. - * @function verify - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCellInfoResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) { - var error = $root.topodata.CellInfo.verify(message.cell_info); - if (error) - return "cell_info." + error; - } - return null; - }; - - /** - * Creates a GetCellInfoResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetCellInfoResponse} GetCellInfoResponse - */ - GetCellInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellInfoResponse) - return object; - var message = new $root.vtctldata.GetCellInfoResponse(); - if (object.cell_info != null) { - if (typeof object.cell_info !== "object") - throw TypeError(".vtctldata.GetCellInfoResponse.cell_info: object expected"); - message.cell_info = $root.topodata.CellInfo.fromObject(object.cell_info); - } - return message; - }; - - /** - * Creates a plain object from a GetCellInfoResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetCellInfoResponse - * @static - * @param {vtctldata.GetCellInfoResponse} message GetCellInfoResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCellInfoResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cell_info = null; - if (message.cell_info != null && message.hasOwnProperty("cell_info")) - object.cell_info = $root.topodata.CellInfo.toObject(message.cell_info, options); - return object; - }; - - /** - * Converts this GetCellInfoResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetCellInfoResponse - * @instance - * @returns {Object.} JSON object - */ - GetCellInfoResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCellInfoResponse; - })(); - - vtctldata.GetCellsAliasesRequest = (function() { - - /** - * Properties of a GetCellsAliasesRequest. - * @memberof vtctldata - * @interface IGetCellsAliasesRequest - */ - - /** - * Constructs a new GetCellsAliasesRequest. - * @memberof vtctldata - * @classdesc Represents a GetCellsAliasesRequest. - * @implements IGetCellsAliasesRequest - * @constructor - * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set - */ - function GetCellsAliasesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new GetCellsAliasesRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {vtctldata.IGetCellsAliasesRequest=} [properties] Properties to set - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest instance - */ - GetCellsAliasesRequest.create = function create(properties) { - return new GetCellsAliasesRequest(properties); - }; - - /** - * Encodes the specified GetCellsAliasesRequest message. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellsAliasesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified GetCellsAliasesRequest message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {vtctldata.IGetCellsAliasesRequest} message GetCellsAliasesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellsAliasesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellsAliasesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCellsAliasesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellsAliasesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCellsAliasesRequest message. - * @function verify - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCellsAliasesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a GetCellsAliasesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetCellsAliasesRequest} GetCellsAliasesRequest - */ - GetCellsAliasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellsAliasesRequest) - return object; - return new $root.vtctldata.GetCellsAliasesRequest(); - }; - - /** - * Creates a plain object from a GetCellsAliasesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetCellsAliasesRequest - * @static - * @param {vtctldata.GetCellsAliasesRequest} message GetCellsAliasesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCellsAliasesRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this GetCellsAliasesRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetCellsAliasesRequest - * @instance - * @returns {Object.} JSON object - */ - GetCellsAliasesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCellsAliasesRequest; - })(); - - vtctldata.GetCellsAliasesResponse = (function() { - - /** - * Properties of a GetCellsAliasesResponse. - * @memberof vtctldata - * @interface IGetCellsAliasesResponse - * @property {Object.|null} [aliases] GetCellsAliasesResponse aliases - */ - - /** - * Constructs a new GetCellsAliasesResponse. - * @memberof vtctldata - * @classdesc Represents a GetCellsAliasesResponse. - * @implements IGetCellsAliasesResponse - * @constructor - * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set - */ - function GetCellsAliasesResponse(properties) { - this.aliases = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetCellsAliasesResponse aliases. - * @member {Object.} aliases - * @memberof vtctldata.GetCellsAliasesResponse - * @instance - */ - GetCellsAliasesResponse.prototype.aliases = $util.emptyObject; - - /** - * Creates a new GetCellsAliasesResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {vtctldata.IGetCellsAliasesResponse=} [properties] Properties to set - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse instance - */ - GetCellsAliasesResponse.create = function create(properties) { - return new GetCellsAliasesResponse(properties); - }; - - /** - * Encodes the specified GetCellsAliasesResponse message. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellsAliasesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.aliases != null && Object.hasOwnProperty.call(message, "aliases")) - for (var keys = Object.keys(message.aliases), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.CellsAlias.encode(message.aliases[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified GetCellsAliasesResponse message, length delimited. Does not implicitly {@link vtctldata.GetCellsAliasesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {vtctldata.IGetCellsAliasesResponse} message GetCellsAliasesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCellsAliasesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellsAliasesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetCellsAliasesResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.aliases === $util.emptyObject) - message.aliases = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.CellsAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.aliases[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetCellsAliasesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCellsAliasesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCellsAliasesResponse message. - * @function verify - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCellsAliasesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.aliases != null && message.hasOwnProperty("aliases")) { - if (!$util.isObject(message.aliases)) - return "aliases: object expected"; - var key = Object.keys(message.aliases); - for (var i = 0; i < key.length; ++i) { - var error = $root.topodata.CellsAlias.verify(message.aliases[key[i]]); - if (error) - return "aliases." + error; - } - } - return null; - }; - - /** - * Creates a GetCellsAliasesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetCellsAliasesResponse} GetCellsAliasesResponse - */ - GetCellsAliasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetCellsAliasesResponse) - return object; - var message = new $root.vtctldata.GetCellsAliasesResponse(); - if (object.aliases) { - if (typeof object.aliases !== "object") - throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); - message.aliases = {}; - for (var keys = Object.keys(object.aliases), i = 0; i < keys.length; ++i) { - if (typeof object.aliases[keys[i]] !== "object") - throw TypeError(".vtctldata.GetCellsAliasesResponse.aliases: object expected"); - message.aliases[keys[i]] = $root.topodata.CellsAlias.fromObject(object.aliases[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetCellsAliasesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetCellsAliasesResponse - * @static - * @param {vtctldata.GetCellsAliasesResponse} message GetCellsAliasesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCellsAliasesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.aliases = {}; - var keys2; - if (message.aliases && (keys2 = Object.keys(message.aliases)).length) { - object.aliases = {}; - for (var j = 0; j < keys2.length; ++j) - object.aliases[keys2[j]] = $root.topodata.CellsAlias.toObject(message.aliases[keys2[j]], options); - } - return object; - }; - - /** - * Converts this GetCellsAliasesResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetCellsAliasesResponse - * @instance - * @returns {Object.} JSON object - */ - GetCellsAliasesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCellsAliasesResponse; - })(); - - vtctldata.GetKeyspacesRequest = (function() { - - /** - * Properties of a GetKeyspacesRequest. - * @memberof vtctldata - * @interface IGetKeyspacesRequest - */ - - /** - * Constructs a new GetKeyspacesRequest. - * @memberof vtctldata - * @classdesc Represents a GetKeyspacesRequest. - * @implements IGetKeyspacesRequest - * @constructor - * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set - */ - function GetKeyspacesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new GetKeyspacesRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {vtctldata.IGetKeyspacesRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest instance - */ - GetKeyspacesRequest.create = function create(properties) { - return new GetKeyspacesRequest(properties); - }; - - /** - * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspacesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {vtctldata.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspacesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetKeyspacesRequest message. - * @function verify - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetKeyspacesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspacesRequest} GetKeyspacesRequest - */ - GetKeyspacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspacesRequest) - return object; - return new $root.vtctldata.GetKeyspacesRequest(); - }; - - /** - * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetKeyspacesRequest - * @static - * @param {vtctldata.GetKeyspacesRequest} message GetKeyspacesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetKeyspacesRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this GetKeyspacesRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetKeyspacesRequest - * @instance - * @returns {Object.} JSON object - */ - GetKeyspacesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetKeyspacesRequest; - })(); - - vtctldata.GetKeyspacesResponse = (function() { - - /** - * Properties of a GetKeyspacesResponse. - * @memberof vtctldata - * @interface IGetKeyspacesResponse - * @property {Array.|null} [keyspaces] GetKeyspacesResponse keyspaces - */ - - /** - * Constructs a new GetKeyspacesResponse. - * @memberof vtctldata - * @classdesc Represents a GetKeyspacesResponse. - * @implements IGetKeyspacesResponse - * @constructor - * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set - */ - function GetKeyspacesResponse(properties) { - this.keyspaces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetKeyspacesResponse keyspaces. - * @member {Array.} keyspaces - * @memberof vtctldata.GetKeyspacesResponse - * @instance - */ - GetKeyspacesResponse.prototype.keyspaces = $util.emptyArray; - - /** - * Creates a new GetKeyspacesResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {vtctldata.IGetKeyspacesResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse instance - */ - GetKeyspacesResponse.create = function create(properties) { - return new GetKeyspacesResponse(properties); - }; - - /** - * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspacesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspaces != null && message.keyspaces.length) - for (var i = 0; i < message.keyspaces.length; ++i) - $root.vtctldata.Keyspace.encode(message.keyspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspacesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {vtctldata.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspacesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspacesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keyspaces && message.keyspaces.length)) - message.keyspaces = []; - message.keyspaces.push($root.vtctldata.Keyspace.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetKeyspacesResponse message. - * @function verify - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetKeyspacesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspaces != null && message.hasOwnProperty("keyspaces")) { - if (!Array.isArray(message.keyspaces)) - return "keyspaces: array expected"; - for (var i = 0; i < message.keyspaces.length; ++i) { - var error = $root.vtctldata.Keyspace.verify(message.keyspaces[i]); - if (error) - return "keyspaces." + error; - } - } - return null; - }; - - /** - * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspacesResponse} GetKeyspacesResponse - */ - GetKeyspacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspacesResponse) - return object; - var message = new $root.vtctldata.GetKeyspacesResponse(); - if (object.keyspaces) { - if (!Array.isArray(object.keyspaces)) - throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: array expected"); - message.keyspaces = []; - for (var i = 0; i < object.keyspaces.length; ++i) { - if (typeof object.keyspaces[i] !== "object") - throw TypeError(".vtctldata.GetKeyspacesResponse.keyspaces: object expected"); - message.keyspaces[i] = $root.vtctldata.Keyspace.fromObject(object.keyspaces[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetKeyspacesResponse - * @static - * @param {vtctldata.GetKeyspacesResponse} message GetKeyspacesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetKeyspacesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keyspaces = []; - if (message.keyspaces && message.keyspaces.length) { - object.keyspaces = []; - for (var j = 0; j < message.keyspaces.length; ++j) - object.keyspaces[j] = $root.vtctldata.Keyspace.toObject(message.keyspaces[j], options); - } - return object; - }; - - /** - * Converts this GetKeyspacesResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetKeyspacesResponse - * @instance - * @returns {Object.} JSON object - */ - GetKeyspacesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetKeyspacesResponse; - })(); - - vtctldata.GetKeyspaceRequest = (function() { - - /** - * Properties of a GetKeyspaceRequest. - * @memberof vtctldata - * @interface IGetKeyspaceRequest - * @property {string|null} [keyspace] GetKeyspaceRequest keyspace - */ - - /** - * Constructs a new GetKeyspaceRequest. - * @memberof vtctldata - * @classdesc Represents a GetKeyspaceRequest. - * @implements IGetKeyspaceRequest - * @constructor - * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set - */ - function GetKeyspaceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetKeyspaceRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetKeyspaceRequest - * @instance - */ - GetKeyspaceRequest.prototype.keyspace = ""; - - /** - * Creates a new GetKeyspaceRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {vtctldata.IGetKeyspaceRequest=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest instance - */ - GetKeyspaceRequest.create = function create(properties) { - return new GetKeyspaceRequest(properties); - }; - - /** - * Encodes the specified GetKeyspaceRequest message. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified GetKeyspaceRequest message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {vtctldata.IGetKeyspaceRequest} message GetKeyspaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetKeyspaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetKeyspaceRequest message. - * @function verify - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetKeyspaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a GetKeyspaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceRequest} GetKeyspaceRequest - */ - GetKeyspaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceRequest) - return object; - var message = new $root.vtctldata.GetKeyspaceRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a GetKeyspaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetKeyspaceRequest - * @static - * @param {vtctldata.GetKeyspaceRequest} message GetKeyspaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetKeyspaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this GetKeyspaceRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetKeyspaceRequest - * @instance - * @returns {Object.} JSON object - */ - GetKeyspaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetKeyspaceRequest; - })(); - - vtctldata.GetKeyspaceResponse = (function() { - - /** - * Properties of a GetKeyspaceResponse. - * @memberof vtctldata - * @interface IGetKeyspaceResponse - * @property {vtctldata.IKeyspace|null} [keyspace] GetKeyspaceResponse keyspace - */ - - /** - * Constructs a new GetKeyspaceResponse. - * @memberof vtctldata - * @classdesc Represents a GetKeyspaceResponse. - * @implements IGetKeyspaceResponse - * @constructor - * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set - */ - function GetKeyspaceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetKeyspaceResponse keyspace. - * @member {vtctldata.IKeyspace|null|undefined} keyspace - * @memberof vtctldata.GetKeyspaceResponse - * @instance - */ - GetKeyspaceResponse.prototype.keyspace = null; - - /** - * Creates a new GetKeyspaceResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {vtctldata.IGetKeyspaceResponse=} [properties] Properties to set - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse instance - */ - GetKeyspaceResponse.create = function create(properties) { - return new GetKeyspaceResponse(properties); - }; - - /** - * Encodes the specified GetKeyspaceResponse message. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspaceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetKeyspaceResponse message, length delimited. Does not implicitly {@link vtctldata.GetKeyspaceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {vtctldata.IGetKeyspaceResponse} message GetKeyspaceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyspaceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspaceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetKeyspaceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = $root.vtctldata.Keyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetKeyspaceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyspaceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetKeyspaceResponse message. - * @function verify - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetKeyspaceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) { - var error = $root.vtctldata.Keyspace.verify(message.keyspace); - if (error) - return "keyspace." + error; - } - return null; - }; - - /** - * Creates a GetKeyspaceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetKeyspaceResponse} GetKeyspaceResponse - */ - GetKeyspaceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetKeyspaceResponse) - return object; - var message = new $root.vtctldata.GetKeyspaceResponse(); - if (object.keyspace != null) { - if (typeof object.keyspace !== "object") - throw TypeError(".vtctldata.GetKeyspaceResponse.keyspace: object expected"); - message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); - } - return message; - }; - - /** - * Creates a plain object from a GetKeyspaceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetKeyspaceResponse - * @static - * @param {vtctldata.GetKeyspaceResponse} message GetKeyspaceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetKeyspaceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = null; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); - return object; - }; - - /** - * Converts this GetKeyspaceResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetKeyspaceResponse - * @instance - * @returns {Object.} JSON object - */ - GetKeyspaceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetKeyspaceResponse; - })(); - - vtctldata.GetSchemaRequest = (function() { - - /** - * Properties of a GetSchemaRequest. - * @memberof vtctldata - * @interface IGetSchemaRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetSchemaRequest tablet_alias - * @property {Array.|null} [tables] GetSchemaRequest tables - * @property {Array.|null} [exclude_tables] GetSchemaRequest exclude_tables - * @property {boolean|null} [include_views] GetSchemaRequest include_views - * @property {boolean|null} [table_names_only] GetSchemaRequest table_names_only - * @property {boolean|null} [table_sizes_only] GetSchemaRequest table_sizes_only - */ - - /** - * Constructs a new GetSchemaRequest. - * @memberof vtctldata - * @classdesc Represents a GetSchemaRequest. - * @implements IGetSchemaRequest - * @constructor - * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set - */ - function GetSchemaRequest(properties) { - this.tables = []; - this.exclude_tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemaRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tablet_alias = null; - - /** - * GetSchemaRequest tables. - * @member {Array.} tables - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.tables = $util.emptyArray; - - /** - * GetSchemaRequest exclude_tables. - * @member {Array.} exclude_tables - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.exclude_tables = $util.emptyArray; - - /** - * GetSchemaRequest include_views. - * @member {boolean} include_views - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.include_views = false; - - /** - * GetSchemaRequest table_names_only. - * @member {boolean} table_names_only - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_names_only = false; - - /** - * GetSchemaRequest table_sizes_only. - * @member {boolean} table_sizes_only - * @memberof vtctldata.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.table_sizes_only = false; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {vtctldata.IGetSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest instance - */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); - }; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); - if (message.exclude_tables != null && message.exclude_tables.length) - for (var i = 0; i < message.exclude_tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exclude_tables[i]); - if (message.include_views != null && Object.hasOwnProperty.call(message, "include_views")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.include_views); - if (message.table_names_only != null && Object.hasOwnProperty.call(message, "table_names_only")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.table_names_only); - if (message.table_sizes_only != null && Object.hasOwnProperty.call(message, "table_sizes_only")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.table_sizes_only); - return writer; - }; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {vtctldata.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 3: - if (!(message.exclude_tables && message.exclude_tables.length)) - message.exclude_tables = []; - message.exclude_tables.push(reader.string()); - break; - case 4: - message.include_views = reader.bool(); - break; - case 5: - message.table_names_only = reader.bool(); - break; - case 6: - message.table_sizes_only = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaRequest message. - * @function verify - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.exclude_tables != null && message.hasOwnProperty("exclude_tables")) { - if (!Array.isArray(message.exclude_tables)) - return "exclude_tables: array expected"; - for (var i = 0; i < message.exclude_tables.length; ++i) - if (!$util.isString(message.exclude_tables[i])) - return "exclude_tables: string[] expected"; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - if (typeof message.include_views !== "boolean") - return "include_views: boolean expected"; - if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) - if (typeof message.table_names_only !== "boolean") - return "table_names_only: boolean expected"; - if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) - if (typeof message.table_sizes_only !== "boolean") - return "table_sizes_only: boolean expected"; - return null; - }; - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaRequest} GetSchemaRequest - */ - GetSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaRequest) - return object; - var message = new $root.vtctldata.GetSchemaRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetSchemaRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".vtctldata.GetSchemaRequest.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.exclude_tables) { - if (!Array.isArray(object.exclude_tables)) - throw TypeError(".vtctldata.GetSchemaRequest.exclude_tables: array expected"); - message.exclude_tables = []; - for (var i = 0; i < object.exclude_tables.length; ++i) - message.exclude_tables[i] = String(object.exclude_tables[i]); - } - if (object.include_views != null) - message.include_views = Boolean(object.include_views); - if (object.table_names_only != null) - message.table_names_only = Boolean(object.table_names_only); - if (object.table_sizes_only != null) - message.table_sizes_only = Boolean(object.table_sizes_only); - return message; - }; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSchemaRequest - * @static - * @param {vtctldata.GetSchemaRequest} message GetSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tables = []; - object.exclude_tables = []; - } - if (options.defaults) { - object.tablet_alias = null; - object.include_views = false; - object.table_names_only = false; - object.table_sizes_only = false; - } - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.exclude_tables && message.exclude_tables.length) { - object.exclude_tables = []; - for (var j = 0; j < message.exclude_tables.length; ++j) - object.exclude_tables[j] = message.exclude_tables[j]; - } - if (message.include_views != null && message.hasOwnProperty("include_views")) - object.include_views = message.include_views; - if (message.table_names_only != null && message.hasOwnProperty("table_names_only")) - object.table_names_only = message.table_names_only; - if (message.table_sizes_only != null && message.hasOwnProperty("table_sizes_only")) - object.table_sizes_only = message.table_sizes_only; - return object; - }; - - /** - * Converts this GetSchemaRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemaRequest; - })(); - - vtctldata.GetSchemaResponse = (function() { - - /** - * Properties of a GetSchemaResponse. - * @memberof vtctldata - * @interface IGetSchemaResponse - * @property {tabletmanagerdata.ISchemaDefinition|null} [schema] GetSchemaResponse schema - */ - - /** - * Constructs a new GetSchemaResponse. - * @memberof vtctldata - * @classdesc Represents a GetSchemaResponse. - * @implements IGetSchemaResponse - * @constructor - * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set - */ - function GetSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemaResponse schema. - * @member {tabletmanagerdata.ISchemaDefinition|null|undefined} schema - * @memberof vtctldata.GetSchemaResponse - * @instance - */ - GetSchemaResponse.prototype.schema = null; - - /** - * Creates a new GetSchemaResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {vtctldata.IGetSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse instance - */ - GetSchemaResponse.create = function create(properties) { - return new GetSchemaResponse(properties); - }; - - /** - * Encodes the specified GetSchemaResponse message. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.tabletmanagerdata.SchemaDefinition.encode(message.schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {vtctldata.IGetSchemaResponse} message GetSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schema = $root.tabletmanagerdata.SchemaDefinition.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaResponse message. - * @function verify - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.tabletmanagerdata.SchemaDefinition.verify(message.schema); - if (error) - return "schema." + error; - } - return null; - }; - - /** - * Creates a GetSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSchemaResponse} GetSchemaResponse - */ - GetSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSchemaResponse) - return object; - var message = new $root.vtctldata.GetSchemaResponse(); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".vtctldata.GetSchemaResponse.schema: object expected"); - message.schema = $root.tabletmanagerdata.SchemaDefinition.fromObject(object.schema); - } - return message; - }; - - /** - * Creates a plain object from a GetSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSchemaResponse - * @static - * @param {vtctldata.GetSchemaResponse} message GetSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.schema = null; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.tabletmanagerdata.SchemaDefinition.toObject(message.schema, options); - return object; - }; - - /** - * Converts this GetSchemaResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - GetSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSchemaResponse; - })(); - - vtctldata.GetShardRequest = (function() { - - /** - * Properties of a GetShardRequest. - * @memberof vtctldata - * @interface IGetShardRequest - * @property {string|null} [keyspace] GetShardRequest keyspace - * @property {string|null} [shard_name] GetShardRequest shard_name - */ - - /** - * Constructs a new GetShardRequest. - * @memberof vtctldata - * @classdesc Represents a GetShardRequest. - * @implements IGetShardRequest - * @constructor - * @param {vtctldata.IGetShardRequest=} [properties] Properties to set - */ - function GetShardRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetShardRequest - * @instance - */ - GetShardRequest.prototype.keyspace = ""; - - /** - * GetShardRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.GetShardRequest - * @instance - */ - GetShardRequest.prototype.shard_name = ""; - - /** - * Creates a new GetShardRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetShardRequest - * @static - * @param {vtctldata.IGetShardRequest=} [properties] Properties to set - * @returns {vtctldata.GetShardRequest} GetShardRequest instance - */ - GetShardRequest.create = function create(properties) { - return new GetShardRequest(properties); - }; - - /** - * Encodes the specified GetShardRequest message. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetShardRequest - * @static - * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetShardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); - return writer; - }; - - /** - * Encodes the specified GetShardRequest message, length delimited. Does not implicitly {@link vtctldata.GetShardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetShardRequest - * @static - * @param {vtctldata.IGetShardRequest} message GetShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetShardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetShardRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardRequest} GetShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetShardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard_name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetShardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardRequest} GetShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetShardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetShardRequest message. - * @function verify - * @memberof vtctldata.GetShardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetShardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; - return null; - }; - - /** - * Creates a GetShardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetShardRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetShardRequest} GetShardRequest - */ - GetShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardRequest) - return object; - var message = new $root.vtctldata.GetShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); - return message; - }; - - /** - * Creates a plain object from a GetShardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetShardRequest - * @static - * @param {vtctldata.GetShardRequest} message GetShardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetShardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard_name = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; - return object; - }; - - /** - * Converts this GetShardRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetShardRequest - * @instance - * @returns {Object.} JSON object - */ - GetShardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetShardRequest; - })(); - - vtctldata.GetShardResponse = (function() { - - /** - * Properties of a GetShardResponse. - * @memberof vtctldata - * @interface IGetShardResponse - * @property {vtctldata.IShard|null} [shard] GetShardResponse shard - */ - - /** - * Constructs a new GetShardResponse. - * @memberof vtctldata - * @classdesc Represents a GetShardResponse. - * @implements IGetShardResponse - * @constructor - * @param {vtctldata.IGetShardResponse=} [properties] Properties to set - */ - function GetShardResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetShardResponse shard. - * @member {vtctldata.IShard|null|undefined} shard - * @memberof vtctldata.GetShardResponse - * @instance - */ - GetShardResponse.prototype.shard = null; - - /** - * Creates a new GetShardResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetShardResponse - * @static - * @param {vtctldata.IGetShardResponse=} [properties] Properties to set - * @returns {vtctldata.GetShardResponse} GetShardResponse instance - */ - GetShardResponse.create = function create(properties) { - return new GetShardResponse(properties); - }; - - /** - * Encodes the specified GetShardResponse message. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetShardResponse - * @static - * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetShardResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - $root.vtctldata.Shard.encode(message.shard, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetShardResponse message, length delimited. Does not implicitly {@link vtctldata.GetShardResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetShardResponse - * @static - * @param {vtctldata.IGetShardResponse} message GetShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetShardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetShardResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetShardResponse} GetShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetShardResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetShardResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.shard = $root.vtctldata.Shard.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetShardResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetShardResponse} GetShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetShardResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetShardResponse message. - * @function verify - * @memberof vtctldata.GetShardResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetShardResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shard != null && message.hasOwnProperty("shard")) { - var error = $root.vtctldata.Shard.verify(message.shard); - if (error) - return "shard." + error; - } - return null; - }; - - /** - * Creates a GetShardResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetShardResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetShardResponse} GetShardResponse - */ - GetShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetShardResponse) - return object; - var message = new $root.vtctldata.GetShardResponse(); - if (object.shard != null) { - if (typeof object.shard !== "object") - throw TypeError(".vtctldata.GetShardResponse.shard: object expected"); - message.shard = $root.vtctldata.Shard.fromObject(object.shard); - } - return message; - }; - - /** - * Creates a plain object from a GetShardResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetShardResponse - * @static - * @param {vtctldata.GetShardResponse} message GetShardResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.shard = null; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = $root.vtctldata.Shard.toObject(message.shard, options); - return object; - }; - - /** - * Converts this GetShardResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetShardResponse - * @instance - * @returns {Object.} JSON object - */ - GetShardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetShardResponse; - })(); - - vtctldata.GetSrvKeyspacesRequest = (function() { - - /** - * Properties of a GetSrvKeyspacesRequest. - * @memberof vtctldata - * @interface IGetSrvKeyspacesRequest - * @property {string|null} [keyspace] GetSrvKeyspacesRequest keyspace - * @property {Array.|null} [cells] GetSrvKeyspacesRequest cells - */ - - /** - * Constructs a new GetSrvKeyspacesRequest. - * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspacesRequest. - * @implements IGetSrvKeyspacesRequest - * @constructor - * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set - */ - function GetSrvKeyspacesRequest(properties) { - this.cells = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSrvKeyspacesRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetSrvKeyspacesRequest - * @instance - */ - GetSrvKeyspacesRequest.prototype.keyspace = ""; - - /** - * GetSrvKeyspacesRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetSrvKeyspacesRequest - * @instance - */ - GetSrvKeyspacesRequest.prototype.cells = $util.emptyArray; - - /** - * Creates a new GetSrvKeyspacesRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {vtctldata.IGetSrvKeyspacesRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest instance - */ - GetSrvKeyspacesRequest.create = function create(properties) { - return new GetSrvKeyspacesRequest(properties); - }; - - /** - * Encodes the specified GetSrvKeyspacesRequest message. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvKeyspacesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); - return writer; - }; - - /** - * Encodes the specified GetSrvKeyspacesRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {vtctldata.IGetSrvKeyspacesRequest} message GetSrvKeyspacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvKeyspacesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSrvKeyspacesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSrvKeyspacesRequest message. - * @function verify - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSrvKeyspacesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - return null; - }; - - /** - * Creates a GetSrvKeyspacesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspacesRequest} GetSrvKeyspacesRequest - */ - GetSrvKeyspacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspacesRequest) - return object; - var message = new $root.vtctldata.GetSrvKeyspacesRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetSrvKeyspacesRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetSrvKeyspacesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSrvKeyspacesRequest - * @static - * @param {vtctldata.GetSrvKeyspacesRequest} message GetSrvKeyspacesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSrvKeyspacesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - return object; - }; - - /** - * Converts this GetSrvKeyspacesRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetSrvKeyspacesRequest - * @instance - * @returns {Object.} JSON object - */ - GetSrvKeyspacesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSrvKeyspacesRequest; - })(); - - vtctldata.GetSrvKeyspacesResponse = (function() { - - /** - * Properties of a GetSrvKeyspacesResponse. - * @memberof vtctldata - * @interface IGetSrvKeyspacesResponse - * @property {Object.|null} [srv_keyspaces] GetSrvKeyspacesResponse srv_keyspaces - */ - - /** - * Constructs a new GetSrvKeyspacesResponse. - * @memberof vtctldata - * @classdesc Represents a GetSrvKeyspacesResponse. - * @implements IGetSrvKeyspacesResponse - * @constructor - * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set - */ - function GetSrvKeyspacesResponse(properties) { - this.srv_keyspaces = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSrvKeyspacesResponse srv_keyspaces. - * @member {Object.} srv_keyspaces - * @memberof vtctldata.GetSrvKeyspacesResponse - * @instance - */ - GetSrvKeyspacesResponse.prototype.srv_keyspaces = $util.emptyObject; - - /** - * Creates a new GetSrvKeyspacesResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {vtctldata.IGetSrvKeyspacesResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse instance - */ - GetSrvKeyspacesResponse.create = function create(properties) { - return new GetSrvKeyspacesResponse(properties); - }; - - /** - * Encodes the specified GetSrvKeyspacesResponse message. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvKeyspacesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.srv_keyspaces != null && Object.hasOwnProperty.call(message, "srv_keyspaces")) - for (var keys = Object.keys(message.srv_keyspaces), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.SrvKeyspace.encode(message.srv_keyspaces[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified GetSrvKeyspacesResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvKeyspacesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {vtctldata.IGetSrvKeyspacesResponse} message GetSrvKeyspacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvKeyspacesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvKeyspacesResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.srv_keyspaces === $util.emptyObject) - message.srv_keyspaces = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.SrvKeyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.srv_keyspaces[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSrvKeyspacesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSrvKeyspacesResponse message. - * @function verify - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSrvKeyspacesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.srv_keyspaces != null && message.hasOwnProperty("srv_keyspaces")) { - if (!$util.isObject(message.srv_keyspaces)) - return "srv_keyspaces: object expected"; - var key = Object.keys(message.srv_keyspaces); - for (var i = 0; i < key.length; ++i) { - var error = $root.topodata.SrvKeyspace.verify(message.srv_keyspaces[key[i]]); - if (error) - return "srv_keyspaces." + error; - } - } - return null; - }; - - /** - * Creates a GetSrvKeyspacesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvKeyspacesResponse} GetSrvKeyspacesResponse - */ - GetSrvKeyspacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvKeyspacesResponse) - return object; - var message = new $root.vtctldata.GetSrvKeyspacesResponse(); - if (object.srv_keyspaces) { - if (typeof object.srv_keyspaces !== "object") - throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); - message.srv_keyspaces = {}; - for (var keys = Object.keys(object.srv_keyspaces), i = 0; i < keys.length; ++i) { - if (typeof object.srv_keyspaces[keys[i]] !== "object") - throw TypeError(".vtctldata.GetSrvKeyspacesResponse.srv_keyspaces: object expected"); - message.srv_keyspaces[keys[i]] = $root.topodata.SrvKeyspace.fromObject(object.srv_keyspaces[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetSrvKeyspacesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSrvKeyspacesResponse - * @static - * @param {vtctldata.GetSrvKeyspacesResponse} message GetSrvKeyspacesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSrvKeyspacesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.srv_keyspaces = {}; - var keys2; - if (message.srv_keyspaces && (keys2 = Object.keys(message.srv_keyspaces)).length) { - object.srv_keyspaces = {}; - for (var j = 0; j < keys2.length; ++j) - object.srv_keyspaces[keys2[j]] = $root.topodata.SrvKeyspace.toObject(message.srv_keyspaces[keys2[j]], options); - } - return object; - }; - - /** - * Converts this GetSrvKeyspacesResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetSrvKeyspacesResponse - * @instance - * @returns {Object.} JSON object - */ - GetSrvKeyspacesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSrvKeyspacesResponse; - })(); - - vtctldata.GetSrvVSchemaRequest = (function() { - - /** - * Properties of a GetSrvVSchemaRequest. - * @memberof vtctldata - * @interface IGetSrvVSchemaRequest - * @property {string|null} [cell] GetSrvVSchemaRequest cell - */ - - /** - * Constructs a new GetSrvVSchemaRequest. - * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemaRequest. - * @implements IGetSrvVSchemaRequest - * @constructor - * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set - */ - function GetSrvVSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSrvVSchemaRequest cell. - * @member {string} cell - * @memberof vtctldata.GetSrvVSchemaRequest - * @instance - */ - GetSrvVSchemaRequest.prototype.cell = ""; - - /** - * Creates a new GetSrvVSchemaRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {vtctldata.IGetSrvVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest instance - */ - GetSrvVSchemaRequest.create = function create(properties) { - return new GetSrvVSchemaRequest(properties); - }; - - /** - * Encodes the specified GetSrvVSchemaRequest message. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvVSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cell); - return writer; - }; - - /** - * Encodes the specified GetSrvVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {vtctldata.IGetSrvVSchemaRequest} message GetSrvVSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvVSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cell = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSrvVSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSrvVSchemaRequest message. - * @function verify - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSrvVSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - return null; - }; - - /** - * Creates a GetSrvVSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemaRequest} GetSrvVSchemaRequest - */ - GetSrvVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemaRequest) - return object; - var message = new $root.vtctldata.GetSrvVSchemaRequest(); - if (object.cell != null) - message.cell = String(object.cell); - return message; - }; - - /** - * Creates a plain object from a GetSrvVSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSrvVSchemaRequest - * @static - * @param {vtctldata.GetSrvVSchemaRequest} message GetSrvVSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSrvVSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cell = ""; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - return object; - }; - - /** - * Converts this GetSrvVSchemaRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetSrvVSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetSrvVSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSrvVSchemaRequest; - })(); - - vtctldata.GetSrvVSchemaResponse = (function() { - - /** - * Properties of a GetSrvVSchemaResponse. - * @memberof vtctldata - * @interface IGetSrvVSchemaResponse - * @property {vschema.ISrvVSchema|null} [srv_v_schema] GetSrvVSchemaResponse srv_v_schema - */ - - /** - * Constructs a new GetSrvVSchemaResponse. - * @memberof vtctldata - * @classdesc Represents a GetSrvVSchemaResponse. - * @implements IGetSrvVSchemaResponse - * @constructor - * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set - */ - function GetSrvVSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSrvVSchemaResponse srv_v_schema. - * @member {vschema.ISrvVSchema|null|undefined} srv_v_schema - * @memberof vtctldata.GetSrvVSchemaResponse - * @instance - */ - GetSrvVSchemaResponse.prototype.srv_v_schema = null; - - /** - * Creates a new GetSrvVSchemaResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {vtctldata.IGetSrvVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse instance - */ - GetSrvVSchemaResponse.create = function create(properties) { - return new GetSrvVSchemaResponse(properties); - }; - - /** - * Encodes the specified GetSrvVSchemaResponse message. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvVSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.srv_v_schema != null && Object.hasOwnProperty.call(message, "srv_v_schema")) - $root.vschema.SrvVSchema.encode(message.srv_v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetSrvVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetSrvVSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {vtctldata.IGetSrvVSchemaResponse} message GetSrvVSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSrvVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvVSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetSrvVSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.srv_v_schema = $root.vschema.SrvVSchema.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSrvVSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSrvVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSrvVSchemaResponse message. - * @function verify - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSrvVSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) { - var error = $root.vschema.SrvVSchema.verify(message.srv_v_schema); - if (error) - return "srv_v_schema." + error; - } - return null; - }; - - /** - * Creates a GetSrvVSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetSrvVSchemaResponse} GetSrvVSchemaResponse - */ - GetSrvVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetSrvVSchemaResponse) - return object; - var message = new $root.vtctldata.GetSrvVSchemaResponse(); - if (object.srv_v_schema != null) { - if (typeof object.srv_v_schema !== "object") - throw TypeError(".vtctldata.GetSrvVSchemaResponse.srv_v_schema: object expected"); - message.srv_v_schema = $root.vschema.SrvVSchema.fromObject(object.srv_v_schema); - } - return message; - }; - - /** - * Creates a plain object from a GetSrvVSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetSrvVSchemaResponse - * @static - * @param {vtctldata.GetSrvVSchemaResponse} message GetSrvVSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSrvVSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.srv_v_schema = null; - if (message.srv_v_schema != null && message.hasOwnProperty("srv_v_schema")) - object.srv_v_schema = $root.vschema.SrvVSchema.toObject(message.srv_v_schema, options); - return object; - }; - - /** - * Converts this GetSrvVSchemaResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetSrvVSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - GetSrvVSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetSrvVSchemaResponse; - })(); - - vtctldata.GetTabletRequest = (function() { - - /** - * Properties of a GetTabletRequest. - * @memberof vtctldata - * @interface IGetTabletRequest - * @property {topodata.ITabletAlias|null} [tablet_alias] GetTabletRequest tablet_alias - */ - - /** - * Constructs a new GetTabletRequest. - * @memberof vtctldata - * @classdesc Represents a GetTabletRequest. - * @implements IGetTabletRequest - * @constructor - * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set - */ - function GetTabletRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletRequest tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} tablet_alias - * @memberof vtctldata.GetTabletRequest - * @instance - */ - GetTabletRequest.prototype.tablet_alias = null; - - /** - * Creates a new GetTabletRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetTabletRequest - * @static - * @param {vtctldata.IGetTabletRequest=} [properties] Properties to set - * @returns {vtctldata.GetTabletRequest} GetTabletRequest instance - */ - GetTabletRequest.create = function create(properties) { - return new GetTabletRequest(properties); - }; - - /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetTabletRequest - * @static - * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) - $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetTabletRequest - * @static - * @param {vtctldata.IGetTabletRequest} message GetTabletRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetTabletRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletRequest} GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetTabletRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletRequest} GetTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletRequest message. - * @function verify - * @memberof vtctldata.GetTabletRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) - return "tablet_alias." + error; - } - return null; - }; - - /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetTabletRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletRequest} GetTabletRequest - */ - GetTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletRequest) - return object; - var message = new $root.vtctldata.GetTabletRequest(); - if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== "object") - throw TypeError(".vtctldata.GetTabletRequest.tablet_alias: object expected"); - message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); - } - return message; - }; - - /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetTabletRequest - * @static - * @param {vtctldata.GetTabletRequest} message GetTabletRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) - object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); - return object; - }; - - /** - * Converts this GetTabletRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetTabletRequest - * @instance - * @returns {Object.} JSON object - */ - GetTabletRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletRequest; - })(); - - vtctldata.GetTabletResponse = (function() { - - /** - * Properties of a GetTabletResponse. - * @memberof vtctldata - * @interface IGetTabletResponse - * @property {topodata.ITablet|null} [tablet] GetTabletResponse tablet - */ - - /** - * Constructs a new GetTabletResponse. - * @memberof vtctldata - * @classdesc Represents a GetTabletResponse. - * @implements IGetTabletResponse - * @constructor - * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set - */ - function GetTabletResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletResponse tablet. - * @member {topodata.ITablet|null|undefined} tablet - * @memberof vtctldata.GetTabletResponse - * @instance - */ - GetTabletResponse.prototype.tablet = null; - - /** - * Creates a new GetTabletResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetTabletResponse - * @static - * @param {vtctldata.IGetTabletResponse=} [properties] Properties to set - * @returns {vtctldata.GetTabletResponse} GetTabletResponse instance - */ - GetTabletResponse.create = function create(properties) { - return new GetTabletResponse(properties); - }; - - /** - * Encodes the specified GetTabletResponse message. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetTabletResponse - * @static - * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.Tablet.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetTabletResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetTabletResponse - * @static - * @param {vtctldata.IGetTabletResponse} message GetTabletResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetTabletResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletResponse} GetTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet = $root.topodata.Tablet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetTabletResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletResponse} GetTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletResponse message. - * @function verify - * @memberof vtctldata.GetTabletResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.Tablet.verify(message.tablet); - if (error) - return "tablet." + error; - } - return null; - }; - - /** - * Creates a GetTabletResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetTabletResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletResponse} GetTabletResponse - */ - GetTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletResponse) - return object; - var message = new $root.vtctldata.GetTabletResponse(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.GetTabletResponse.tablet: object expected"); - message.tablet = $root.topodata.Tablet.fromObject(object.tablet); - } - return message; - }; - - /** - * Creates a plain object from a GetTabletResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetTabletResponse - * @static - * @param {vtctldata.GetTabletResponse} message GetTabletResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.Tablet.toObject(message.tablet, options); - return object; - }; - - /** - * Converts this GetTabletResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetTabletResponse - * @instance - * @returns {Object.} JSON object - */ - GetTabletResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletResponse; - })(); - - vtctldata.GetTabletsRequest = (function() { - - /** - * Properties of a GetTabletsRequest. - * @memberof vtctldata - * @interface IGetTabletsRequest - * @property {string|null} [keyspace] GetTabletsRequest keyspace - * @property {string|null} [shard] GetTabletsRequest shard - * @property {Array.|null} [cells] GetTabletsRequest cells - * @property {boolean|null} [strict] GetTabletsRequest strict - * @property {Array.|null} [tablet_aliases] GetTabletsRequest tablet_aliases - */ - - /** - * Constructs a new GetTabletsRequest. - * @memberof vtctldata - * @classdesc Represents a GetTabletsRequest. - * @implements IGetTabletsRequest - * @constructor - * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set - */ - function GetTabletsRequest(properties) { - this.cells = []; - this.tablet_aliases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.keyspace = ""; - - /** - * GetTabletsRequest shard. - * @member {string} shard - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.shard = ""; - - /** - * GetTabletsRequest cells. - * @member {Array.} cells - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.cells = $util.emptyArray; - - /** - * GetTabletsRequest strict. - * @member {boolean} strict - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.strict = false; - - /** - * GetTabletsRequest tablet_aliases. - * @member {Array.} tablet_aliases - * @memberof vtctldata.GetTabletsRequest - * @instance - */ - GetTabletsRequest.prototype.tablet_aliases = $util.emptyArray; - - /** - * Creates a new GetTabletsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {vtctldata.IGetTabletsRequest=} [properties] Properties to set - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest instance - */ - GetTabletsRequest.create = function create(properties) { - return new GetTabletsRequest(properties); - }; - - /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cells[i]); - if (message.strict != null && Object.hasOwnProperty.call(message, "strict")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strict); - if (message.tablet_aliases != null && message.tablet_aliases.length) - for (var i = 0; i < message.tablet_aliases.length; ++i) - $root.topodata.TabletAlias.encode(message.tablet_aliases[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtctldata.GetTabletsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {vtctldata.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push(reader.string()); - break; - case 4: - message.strict = reader.bool(); - break; - case 5: - if (!(message.tablet_aliases && message.tablet_aliases.length)) - message.tablet_aliases = []; - message.tablet_aliases.push($root.topodata.TabletAlias.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletsRequest message. - * @function verify - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) - return "cells: string[] expected"; - } - if (message.strict != null && message.hasOwnProperty("strict")) - if (typeof message.strict !== "boolean") - return "strict: boolean expected"; - if (message.tablet_aliases != null && message.hasOwnProperty("tablet_aliases")) { - if (!Array.isArray(message.tablet_aliases)) - return "tablet_aliases: array expected"; - for (var i = 0; i < message.tablet_aliases.length; ++i) { - var error = $root.topodata.TabletAlias.verify(message.tablet_aliases[i]); - if (error) - return "tablet_aliases." + error; - } - } - return null; - }; - - /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletsRequest} GetTabletsRequest - */ - GetTabletsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletsRequest) - return object; - var message = new $root.vtctldata.GetTabletsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".vtctldata.GetTabletsRequest.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) - message.cells[i] = String(object.cells[i]); - } - if (object.strict != null) - message.strict = Boolean(object.strict); - if (object.tablet_aliases) { - if (!Array.isArray(object.tablet_aliases)) - throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: array expected"); - message.tablet_aliases = []; - for (var i = 0; i < object.tablet_aliases.length; ++i) { - if (typeof object.tablet_aliases[i] !== "object") - throw TypeError(".vtctldata.GetTabletsRequest.tablet_aliases: object expected"); - message.tablet_aliases[i] = $root.topodata.TabletAlias.fromObject(object.tablet_aliases[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetTabletsRequest - * @static - * @param {vtctldata.GetTabletsRequest} message GetTabletsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.cells = []; - object.tablet_aliases = []; - } - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.strict = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = message.cells[j]; - } - if (message.strict != null && message.hasOwnProperty("strict")) - object.strict = message.strict; - if (message.tablet_aliases && message.tablet_aliases.length) { - object.tablet_aliases = []; - for (var j = 0; j < message.tablet_aliases.length; ++j) - object.tablet_aliases[j] = $root.topodata.TabletAlias.toObject(message.tablet_aliases[j], options); - } - return object; - }; - - /** - * Converts this GetTabletsRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetTabletsRequest - * @instance - * @returns {Object.} JSON object - */ - GetTabletsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletsRequest; - })(); - - vtctldata.GetTabletsResponse = (function() { - - /** - * Properties of a GetTabletsResponse. - * @memberof vtctldata - * @interface IGetTabletsResponse - * @property {Array.|null} [tablets] GetTabletsResponse tablets - */ - - /** - * Constructs a new GetTabletsResponse. - * @memberof vtctldata - * @classdesc Represents a GetTabletsResponse. - * @implements IGetTabletsResponse - * @constructor - * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set - */ - function GetTabletsResponse(properties) { - this.tablets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTabletsResponse tablets. - * @member {Array.} tablets - * @memberof vtctldata.GetTabletsResponse - * @instance - */ - GetTabletsResponse.prototype.tablets = $util.emptyArray; - - /** - * Creates a new GetTabletsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {vtctldata.IGetTabletsResponse=} [properties] Properties to set - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse instance - */ - GetTabletsResponse.create = function create(properties) { - return new GetTabletsResponse(properties); - }; - - /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablets != null && message.tablets.length) - for (var i = 0; i < message.tablets.length; ++i) - $root.topodata.Tablet.encode(message.tablets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetTabletsResponse message, length delimited. Does not implicitly {@link vtctldata.GetTabletsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {vtctldata.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetTabletsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.tablets && message.tablets.length)) - message.tablets = []; - message.tablets.push($root.topodata.Tablet.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTabletsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTabletsResponse message. - * @function verify - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTabletsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablets != null && message.hasOwnProperty("tablets")) { - if (!Array.isArray(message.tablets)) - return "tablets: array expected"; - for (var i = 0; i < message.tablets.length; ++i) { - var error = $root.topodata.Tablet.verify(message.tablets[i]); - if (error) - return "tablets." + error; - } - } - return null; - }; - - /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetTabletsResponse} GetTabletsResponse - */ - GetTabletsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetTabletsResponse) - return object; - var message = new $root.vtctldata.GetTabletsResponse(); - if (object.tablets) { - if (!Array.isArray(object.tablets)) - throw TypeError(".vtctldata.GetTabletsResponse.tablets: array expected"); - message.tablets = []; - for (var i = 0; i < object.tablets.length; ++i) { - if (typeof object.tablets[i] !== "object") - throw TypeError(".vtctldata.GetTabletsResponse.tablets: object expected"); - message.tablets[i] = $root.topodata.Tablet.fromObject(object.tablets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetTabletsResponse - * @static - * @param {vtctldata.GetTabletsResponse} message GetTabletsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTabletsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tablets = []; - if (message.tablets && message.tablets.length) { - object.tablets = []; - for (var j = 0; j < message.tablets.length; ++j) - object.tablets[j] = $root.topodata.Tablet.toObject(message.tablets[j], options); - } - return object; - }; - - /** - * Converts this GetTabletsResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetTabletsResponse - * @instance - * @returns {Object.} JSON object - */ - GetTabletsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetTabletsResponse; - })(); - - vtctldata.GetVSchemaRequest = (function() { - - /** - * Properties of a GetVSchemaRequest. - * @memberof vtctldata - * @interface IGetVSchemaRequest - * @property {string|null} [keyspace] GetVSchemaRequest keyspace - */ - - /** - * Constructs a new GetVSchemaRequest. - * @memberof vtctldata - * @classdesc Represents a GetVSchemaRequest. - * @implements IGetVSchemaRequest - * @constructor - * @param {vtctldata.IGetVSchemaRequest=} [properties] Properties to set - */ - function GetVSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVSchemaRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetVSchemaRequest - * @instance - */ - GetVSchemaRequest.prototype.keyspace = ""; - - /** - * Creates a new GetVSchemaRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {vtctldata.IGetVSchemaRequest=} [properties] Properties to set - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest instance - */ - GetVSchemaRequest.create = function create(properties) { - return new GetVSchemaRequest(properties); - }; - - /** - * Encodes the specified GetVSchemaRequest message. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {vtctldata.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - return writer; - }; - - /** - * Encodes the specified GetVSchemaRequest message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {vtctldata.IGetVSchemaRequest} message GetVSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVSchemaRequest message. - * @function verify - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVSchemaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - return null; - }; - - /** - * Creates a GetVSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetVSchemaRequest} GetVSchemaRequest - */ - GetVSchemaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetVSchemaRequest) - return object; - var message = new $root.vtctldata.GetVSchemaRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - return message; - }; - - /** - * Creates a plain object from a GetVSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetVSchemaRequest - * @static - * @param {vtctldata.GetVSchemaRequest} message GetVSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVSchemaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyspace = ""; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - return object; - }; - - /** - * Converts this GetVSchemaRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetVSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetVSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetVSchemaRequest; - })(); - - vtctldata.GetVSchemaResponse = (function() { - - /** - * Properties of a GetVSchemaResponse. - * @memberof vtctldata - * @interface IGetVSchemaResponse - * @property {vschema.IKeyspace|null} [v_schema] GetVSchemaResponse v_schema - */ - - /** - * Constructs a new GetVSchemaResponse. - * @memberof vtctldata - * @classdesc Represents a GetVSchemaResponse. - * @implements IGetVSchemaResponse - * @constructor - * @param {vtctldata.IGetVSchemaResponse=} [properties] Properties to set - */ - function GetVSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVSchemaResponse v_schema. - * @member {vschema.IKeyspace|null|undefined} v_schema - * @memberof vtctldata.GetVSchemaResponse - * @instance - */ - GetVSchemaResponse.prototype.v_schema = null; - - /** - * Creates a new GetVSchemaResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {vtctldata.IGetVSchemaResponse=} [properties] Properties to set - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse instance - */ - GetVSchemaResponse.create = function create(properties) { - return new GetVSchemaResponse(properties); - }; - - /** - * Encodes the specified GetVSchemaResponse message. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {vtctldata.IGetVSchemaResponse} message GetVSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemaResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.v_schema != null && Object.hasOwnProperty.call(message, "v_schema")) - $root.vschema.Keyspace.encode(message.v_schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetVSchemaResponse message, length delimited. Does not implicitly {@link vtctldata.GetVSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {vtctldata.IGetVSchemaResponse} message GetVSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemaResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetVSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.v_schema = $root.vschema.Keyspace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVSchemaResponse message. - * @function verify - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVSchemaResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.v_schema != null && message.hasOwnProperty("v_schema")) { - var error = $root.vschema.Keyspace.verify(message.v_schema); - if (error) - return "v_schema." + error; - } - return null; - }; - - /** - * Creates a GetVSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetVSchemaResponse} GetVSchemaResponse - */ - GetVSchemaResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetVSchemaResponse) - return object; - var message = new $root.vtctldata.GetVSchemaResponse(); - if (object.v_schema != null) { - if (typeof object.v_schema !== "object") - throw TypeError(".vtctldata.GetVSchemaResponse.v_schema: object expected"); - message.v_schema = $root.vschema.Keyspace.fromObject(object.v_schema); - } - return message; - }; - - /** - * Creates a plain object from a GetVSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetVSchemaResponse - * @static - * @param {vtctldata.GetVSchemaResponse} message GetVSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVSchemaResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.v_schema = null; - if (message.v_schema != null && message.hasOwnProperty("v_schema")) - object.v_schema = $root.vschema.Keyspace.toObject(message.v_schema, options); - return object; - }; - - /** - * Converts this GetVSchemaResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetVSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - GetVSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetVSchemaResponse; - })(); - - vtctldata.GetWorkflowsRequest = (function() { - - /** - * Properties of a GetWorkflowsRequest. - * @memberof vtctldata - * @interface IGetWorkflowsRequest - * @property {string|null} [keyspace] GetWorkflowsRequest keyspace - * @property {boolean|null} [active_only] GetWorkflowsRequest active_only - */ - - /** - * Constructs a new GetWorkflowsRequest. - * @memberof vtctldata - * @classdesc Represents a GetWorkflowsRequest. - * @implements IGetWorkflowsRequest - * @constructor - * @param {vtctldata.IGetWorkflowsRequest=} [properties] Properties to set - */ - function GetWorkflowsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetWorkflowsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.GetWorkflowsRequest - * @instance - */ - GetWorkflowsRequest.prototype.keyspace = ""; - - /** - * GetWorkflowsRequest active_only. - * @member {boolean} active_only - * @memberof vtctldata.GetWorkflowsRequest - * @instance - */ - GetWorkflowsRequest.prototype.active_only = false; - - /** - * Creates a new GetWorkflowsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {vtctldata.IGetWorkflowsRequest=} [properties] Properties to set - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest instance - */ - GetWorkflowsRequest.create = function create(properties) { - return new GetWorkflowsRequest(properties); - }; - - /** - * Encodes the specified GetWorkflowsRequest message. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {vtctldata.IGetWorkflowsRequest} message GetWorkflowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetWorkflowsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.active_only != null && Object.hasOwnProperty.call(message, "active_only")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.active_only); - return writer; - }; - - /** - * Encodes the specified GetWorkflowsRequest message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {vtctldata.IGetWorkflowsRequest} message GetWorkflowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetWorkflowsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetWorkflowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.active_only = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetWorkflowsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetWorkflowsRequest message. - * @function verify - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetWorkflowsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.active_only != null && message.hasOwnProperty("active_only")) - if (typeof message.active_only !== "boolean") - return "active_only: boolean expected"; - return null; - }; - - /** - * Creates a GetWorkflowsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetWorkflowsRequest} GetWorkflowsRequest - */ - GetWorkflowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetWorkflowsRequest) - return object; - var message = new $root.vtctldata.GetWorkflowsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.active_only != null) - message.active_only = Boolean(object.active_only); - return message; - }; - - /** - * Creates a plain object from a GetWorkflowsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetWorkflowsRequest - * @static - * @param {vtctldata.GetWorkflowsRequest} message GetWorkflowsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetWorkflowsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.active_only = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.active_only != null && message.hasOwnProperty("active_only")) - object.active_only = message.active_only; - return object; - }; - - /** - * Converts this GetWorkflowsRequest to JSON. - * @function toJSON - * @memberof vtctldata.GetWorkflowsRequest - * @instance - * @returns {Object.} JSON object - */ - GetWorkflowsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetWorkflowsRequest; - })(); - - vtctldata.GetWorkflowsResponse = (function() { - - /** - * Properties of a GetWorkflowsResponse. - * @memberof vtctldata - * @interface IGetWorkflowsResponse - * @property {Array.|null} [workflows] GetWorkflowsResponse workflows - */ - - /** - * Constructs a new GetWorkflowsResponse. - * @memberof vtctldata - * @classdesc Represents a GetWorkflowsResponse. - * @implements IGetWorkflowsResponse - * @constructor - * @param {vtctldata.IGetWorkflowsResponse=} [properties] Properties to set - */ - function GetWorkflowsResponse(properties) { - this.workflows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetWorkflowsResponse workflows. - * @member {Array.} workflows - * @memberof vtctldata.GetWorkflowsResponse - * @instance - */ - GetWorkflowsResponse.prototype.workflows = $util.emptyArray; - - /** - * Creates a new GetWorkflowsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {vtctldata.IGetWorkflowsResponse=} [properties] Properties to set - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse instance - */ - GetWorkflowsResponse.create = function create(properties) { - return new GetWorkflowsResponse(properties); - }; - - /** - * Encodes the specified GetWorkflowsResponse message. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {vtctldata.IGetWorkflowsResponse} message GetWorkflowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetWorkflowsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workflows != null && message.workflows.length) - for (var i = 0; i < message.workflows.length; ++i) - $root.vtctldata.Workflow.encode(message.workflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetWorkflowsResponse message, length delimited. Does not implicitly {@link vtctldata.GetWorkflowsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {vtctldata.IGetWorkflowsResponse} message GetWorkflowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetWorkflowsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.GetWorkflowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.workflows && message.workflows.length)) - message.workflows = []; - message.workflows.push($root.vtctldata.Workflow.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetWorkflowsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetWorkflowsResponse message. - * @function verify - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetWorkflowsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.workflows != null && message.hasOwnProperty("workflows")) { - if (!Array.isArray(message.workflows)) - return "workflows: array expected"; - for (var i = 0; i < message.workflows.length; ++i) { - var error = $root.vtctldata.Workflow.verify(message.workflows[i]); - if (error) - return "workflows." + error; - } - } - return null; - }; - - /** - * Creates a GetWorkflowsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.GetWorkflowsResponse} GetWorkflowsResponse - */ - GetWorkflowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.GetWorkflowsResponse) - return object; - var message = new $root.vtctldata.GetWorkflowsResponse(); - if (object.workflows) { - if (!Array.isArray(object.workflows)) - throw TypeError(".vtctldata.GetWorkflowsResponse.workflows: array expected"); - message.workflows = []; - for (var i = 0; i < object.workflows.length; ++i) { - if (typeof object.workflows[i] !== "object") - throw TypeError(".vtctldata.GetWorkflowsResponse.workflows: object expected"); - message.workflows[i] = $root.vtctldata.Workflow.fromObject(object.workflows[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetWorkflowsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.GetWorkflowsResponse - * @static - * @param {vtctldata.GetWorkflowsResponse} message GetWorkflowsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetWorkflowsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.workflows = []; - if (message.workflows && message.workflows.length) { - object.workflows = []; - for (var j = 0; j < message.workflows.length; ++j) - object.workflows[j] = $root.vtctldata.Workflow.toObject(message.workflows[j], options); - } - return object; - }; - - /** - * Converts this GetWorkflowsResponse to JSON. - * @function toJSON - * @memberof vtctldata.GetWorkflowsResponse - * @instance - * @returns {Object.} JSON object - */ - GetWorkflowsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetWorkflowsResponse; - })(); - - vtctldata.InitShardPrimaryRequest = (function() { - - /** - * Properties of an InitShardPrimaryRequest. - * @memberof vtctldata - * @interface IInitShardPrimaryRequest - * @property {string|null} [keyspace] InitShardPrimaryRequest keyspace - * @property {string|null} [shard] InitShardPrimaryRequest shard - * @property {topodata.ITabletAlias|null} [primary_elect_tablet_alias] InitShardPrimaryRequest primary_elect_tablet_alias - * @property {boolean|null} [force] InitShardPrimaryRequest force - * @property {vttime.IDuration|null} [wait_replicas_timeout] InitShardPrimaryRequest wait_replicas_timeout - */ - - /** - * Constructs a new InitShardPrimaryRequest. - * @memberof vtctldata - * @classdesc Represents an InitShardPrimaryRequest. - * @implements IInitShardPrimaryRequest - * @constructor - * @param {vtctldata.IInitShardPrimaryRequest=} [properties] Properties to set - */ - function InitShardPrimaryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitShardPrimaryRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.keyspace = ""; - - /** - * InitShardPrimaryRequest shard. - * @member {string} shard - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.shard = ""; - - /** - * InitShardPrimaryRequest primary_elect_tablet_alias. - * @member {topodata.ITabletAlias|null|undefined} primary_elect_tablet_alias - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.primary_elect_tablet_alias = null; - - /** - * InitShardPrimaryRequest force. - * @member {boolean} force - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.force = false; - - /** - * InitShardPrimaryRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - */ - InitShardPrimaryRequest.prototype.wait_replicas_timeout = null; - - /** - * Creates a new InitShardPrimaryRequest instance using the specified properties. - * @function create - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {vtctldata.IInitShardPrimaryRequest=} [properties] Properties to set - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest instance - */ - InitShardPrimaryRequest.create = function create(properties) { - return new InitShardPrimaryRequest(properties); - }; - - /** - * Encodes the specified InitShardPrimaryRequest message. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {vtctldata.IInitShardPrimaryRequest} message InitShardPrimaryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitShardPrimaryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.primary_elect_tablet_alias != null && Object.hasOwnProperty.call(message, "primary_elect_tablet_alias")) - $root.topodata.TabletAlias.encode(message.primary_elect_tablet_alias, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InitShardPrimaryRequest message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {vtctldata.IInitShardPrimaryRequest} message InitShardPrimaryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitShardPrimaryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitShardPrimaryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.InitShardPrimaryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.primary_elect_tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.force = reader.bool(); - break; - case 5: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitShardPrimaryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitShardPrimaryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitShardPrimaryRequest message. - * @function verify - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitShardPrimaryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.primary_elect_tablet_alias != null && message.hasOwnProperty("primary_elect_tablet_alias")) { - var error = $root.topodata.TabletAlias.verify(message.primary_elect_tablet_alias); - if (error) - return "primary_elect_tablet_alias." + error; - } - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); - if (error) - return "wait_replicas_timeout." + error; - } - return null; - }; - - /** - * Creates an InitShardPrimaryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.InitShardPrimaryRequest} InitShardPrimaryRequest - */ - InitShardPrimaryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.InitShardPrimaryRequest) - return object; - var message = new $root.vtctldata.InitShardPrimaryRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.primary_elect_tablet_alias != null) { - if (typeof object.primary_elect_tablet_alias !== "object") - throw TypeError(".vtctldata.InitShardPrimaryRequest.primary_elect_tablet_alias: object expected"); - message.primary_elect_tablet_alias = $root.topodata.TabletAlias.fromObject(object.primary_elect_tablet_alias); - } - if (object.force != null) - message.force = Boolean(object.force); - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.InitShardPrimaryRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); - } - return message; - }; - - /** - * Creates a plain object from an InitShardPrimaryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.InitShardPrimaryRequest - * @static - * @param {vtctldata.InitShardPrimaryRequest} message InitShardPrimaryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitShardPrimaryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.primary_elect_tablet_alias = null; - object.force = false; - object.wait_replicas_timeout = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.primary_elect_tablet_alias != null && message.hasOwnProperty("primary_elect_tablet_alias")) - object.primary_elect_tablet_alias = $root.topodata.TabletAlias.toObject(message.primary_elect_tablet_alias, options); - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); - return object; - }; - - /** - * Converts this InitShardPrimaryRequest to JSON. - * @function toJSON - * @memberof vtctldata.InitShardPrimaryRequest - * @instance - * @returns {Object.} JSON object - */ - InitShardPrimaryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitShardPrimaryRequest; - })(); - - vtctldata.InitShardPrimaryResponse = (function() { - - /** - * Properties of an InitShardPrimaryResponse. - * @memberof vtctldata - * @interface IInitShardPrimaryResponse - * @property {Array.|null} [events] InitShardPrimaryResponse events - */ - - /** - * Constructs a new InitShardPrimaryResponse. - * @memberof vtctldata - * @classdesc Represents an InitShardPrimaryResponse. - * @implements IInitShardPrimaryResponse - * @constructor - * @param {vtctldata.IInitShardPrimaryResponse=} [properties] Properties to set - */ - function InitShardPrimaryResponse(properties) { - this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitShardPrimaryResponse events. - * @member {Array.} events - * @memberof vtctldata.InitShardPrimaryResponse - * @instance - */ - InitShardPrimaryResponse.prototype.events = $util.emptyArray; - - /** - * Creates a new InitShardPrimaryResponse instance using the specified properties. - * @function create - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {vtctldata.IInitShardPrimaryResponse=} [properties] Properties to set - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse instance - */ - InitShardPrimaryResponse.create = function create(properties) { - return new InitShardPrimaryResponse(properties); - }; - - /** - * Encodes the specified InitShardPrimaryResponse message. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {vtctldata.IInitShardPrimaryResponse} message InitShardPrimaryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitShardPrimaryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InitShardPrimaryResponse message, length delimited. Does not implicitly {@link vtctldata.InitShardPrimaryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {vtctldata.IInitShardPrimaryResponse} message InitShardPrimaryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitShardPrimaryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitShardPrimaryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.InitShardPrimaryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitShardPrimaryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitShardPrimaryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitShardPrimaryResponse message. - * @function verify - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitShardPrimaryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates an InitShardPrimaryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.InitShardPrimaryResponse} InitShardPrimaryResponse - */ - InitShardPrimaryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.InitShardPrimaryResponse) - return object; - var message = new $root.vtctldata.InitShardPrimaryResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.InitShardPrimaryResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.InitShardPrimaryResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InitShardPrimaryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.InitShardPrimaryResponse - * @static - * @param {vtctldata.InitShardPrimaryResponse} message InitShardPrimaryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitShardPrimaryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this InitShardPrimaryResponse to JSON. - * @function toJSON - * @memberof vtctldata.InitShardPrimaryResponse - * @instance - * @returns {Object.} JSON object - */ - InitShardPrimaryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitShardPrimaryResponse; - })(); - - vtctldata.PlannedReparentShardRequest = (function() { - - /** - * Properties of a PlannedReparentShardRequest. - * @memberof vtctldata - * @interface IPlannedReparentShardRequest - * @property {string|null} [keyspace] PlannedReparentShardRequest keyspace - * @property {string|null} [shard] PlannedReparentShardRequest shard - * @property {topodata.ITabletAlias|null} [new_primary] PlannedReparentShardRequest new_primary - * @property {topodata.ITabletAlias|null} [avoid_primary] PlannedReparentShardRequest avoid_primary - * @property {vttime.IDuration|null} [wait_replicas_timeout] PlannedReparentShardRequest wait_replicas_timeout - */ - - /** - * Constructs a new PlannedReparentShardRequest. - * @memberof vtctldata - * @classdesc Represents a PlannedReparentShardRequest. - * @implements IPlannedReparentShardRequest - * @constructor - * @param {vtctldata.IPlannedReparentShardRequest=} [properties] Properties to set - */ - function PlannedReparentShardRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlannedReparentShardRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.keyspace = ""; - - /** - * PlannedReparentShardRequest shard. - * @member {string} shard - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.shard = ""; - - /** - * PlannedReparentShardRequest new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.new_primary = null; - - /** - * PlannedReparentShardRequest avoid_primary. - * @member {topodata.ITabletAlias|null|undefined} avoid_primary - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.avoid_primary = null; - - /** - * PlannedReparentShardRequest wait_replicas_timeout. - * @member {vttime.IDuration|null|undefined} wait_replicas_timeout - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - */ - PlannedReparentShardRequest.prototype.wait_replicas_timeout = null; - - /** - * Creates a new PlannedReparentShardRequest instance using the specified properties. - * @function create - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {vtctldata.IPlannedReparentShardRequest=} [properties] Properties to set - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest instance - */ - PlannedReparentShardRequest.create = function create(properties) { - return new PlannedReparentShardRequest(properties); - }; - - /** - * Encodes the specified PlannedReparentShardRequest message. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {vtctldata.IPlannedReparentShardRequest} message PlannedReparentShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlannedReparentShardRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.avoid_primary != null && Object.hasOwnProperty.call(message, "avoid_primary")) - $root.topodata.TabletAlias.encode(message.avoid_primary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.wait_replicas_timeout != null && Object.hasOwnProperty.call(message, "wait_replicas_timeout")) - $root.vttime.Duration.encode(message.wait_replicas_timeout, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PlannedReparentShardRequest message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {vtctldata.IPlannedReparentShardRequest} message PlannedReparentShardRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlannedReparentShardRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlannedReparentShardRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PlannedReparentShardRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.avoid_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 5: - message.wait_replicas_timeout = $root.vttime.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlannedReparentShardRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlannedReparentShardRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlannedReparentShardRequest message. - * @function verify - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlannedReparentShardRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) { - var error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.avoid_primary != null && message.hasOwnProperty("avoid_primary")) { - var error = $root.topodata.TabletAlias.verify(message.avoid_primary); - if (error) - return "avoid_primary." + error; - } - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) { - var error = $root.vttime.Duration.verify(message.wait_replicas_timeout); - if (error) - return "wait_replicas_timeout." + error; - } - return null; - }; - - /** - * Creates a PlannedReparentShardRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.PlannedReparentShardRequest} PlannedReparentShardRequest - */ - PlannedReparentShardRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.PlannedReparentShardRequest) - return object; - var message = new $root.vtctldata.PlannedReparentShardRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.PlannedReparentShardRequest.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.avoid_primary != null) { - if (typeof object.avoid_primary !== "object") - throw TypeError(".vtctldata.PlannedReparentShardRequest.avoid_primary: object expected"); - message.avoid_primary = $root.topodata.TabletAlias.fromObject(object.avoid_primary); - } - if (object.wait_replicas_timeout != null) { - if (typeof object.wait_replicas_timeout !== "object") - throw TypeError(".vtctldata.PlannedReparentShardRequest.wait_replicas_timeout: object expected"); - message.wait_replicas_timeout = $root.vttime.Duration.fromObject(object.wait_replicas_timeout); - } - return message; - }; - - /** - * Creates a plain object from a PlannedReparentShardRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.PlannedReparentShardRequest - * @static - * @param {vtctldata.PlannedReparentShardRequest} message PlannedReparentShardRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlannedReparentShardRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.avoid_primary = null; - object.wait_replicas_timeout = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.avoid_primary != null && message.hasOwnProperty("avoid_primary")) - object.avoid_primary = $root.topodata.TabletAlias.toObject(message.avoid_primary, options); - if (message.wait_replicas_timeout != null && message.hasOwnProperty("wait_replicas_timeout")) - object.wait_replicas_timeout = $root.vttime.Duration.toObject(message.wait_replicas_timeout, options); - return object; - }; - - /** - * Converts this PlannedReparentShardRequest to JSON. - * @function toJSON - * @memberof vtctldata.PlannedReparentShardRequest - * @instance - * @returns {Object.} JSON object - */ - PlannedReparentShardRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PlannedReparentShardRequest; - })(); - - vtctldata.PlannedReparentShardResponse = (function() { - - /** - * Properties of a PlannedReparentShardResponse. - * @memberof vtctldata - * @interface IPlannedReparentShardResponse - * @property {string|null} [keyspace] PlannedReparentShardResponse keyspace - * @property {string|null} [shard] PlannedReparentShardResponse shard - * @property {topodata.ITabletAlias|null} [promoted_primary] PlannedReparentShardResponse promoted_primary - * @property {Array.|null} [events] PlannedReparentShardResponse events - */ - - /** - * Constructs a new PlannedReparentShardResponse. - * @memberof vtctldata - * @classdesc Represents a PlannedReparentShardResponse. - * @implements IPlannedReparentShardResponse - * @constructor - * @param {vtctldata.IPlannedReparentShardResponse=} [properties] Properties to set - */ - function PlannedReparentShardResponse(properties) { - this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlannedReparentShardResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.keyspace = ""; - - /** - * PlannedReparentShardResponse shard. - * @member {string} shard - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.shard = ""; - - /** - * PlannedReparentShardResponse promoted_primary. - * @member {topodata.ITabletAlias|null|undefined} promoted_primary - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.promoted_primary = null; - - /** - * PlannedReparentShardResponse events. - * @member {Array.} events - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - */ - PlannedReparentShardResponse.prototype.events = $util.emptyArray; - - /** - * Creates a new PlannedReparentShardResponse instance using the specified properties. - * @function create - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {vtctldata.IPlannedReparentShardResponse=} [properties] Properties to set - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse instance - */ - PlannedReparentShardResponse.create = function create(properties) { - return new PlannedReparentShardResponse(properties); - }; - - /** - * Encodes the specified PlannedReparentShardResponse message. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {vtctldata.IPlannedReparentShardResponse} message PlannedReparentShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlannedReparentShardResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.promoted_primary != null && Object.hasOwnProperty.call(message, "promoted_primary")) - $root.topodata.TabletAlias.encode(message.promoted_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.logutil.Event.encode(message.events[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PlannedReparentShardResponse message, length delimited. Does not implicitly {@link vtctldata.PlannedReparentShardResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {vtctldata.IPlannedReparentShardResponse} message PlannedReparentShardResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlannedReparentShardResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlannedReparentShardResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.PlannedReparentShardResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.promoted_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.logutil.Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlannedReparentShardResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlannedReparentShardResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlannedReparentShardResponse message. - * @function verify - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlannedReparentShardResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) { - var error = $root.topodata.TabletAlias.verify(message.promoted_primary); - if (error) - return "promoted_primary." + error; - } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.logutil.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a PlannedReparentShardResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.PlannedReparentShardResponse} PlannedReparentShardResponse - */ - PlannedReparentShardResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.PlannedReparentShardResponse) - return object; - var message = new $root.vtctldata.PlannedReparentShardResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.promoted_primary != null) { - if (typeof object.promoted_primary !== "object") - throw TypeError(".vtctldata.PlannedReparentShardResponse.promoted_primary: object expected"); - message.promoted_primary = $root.topodata.TabletAlias.fromObject(object.promoted_primary); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".vtctldata.PlannedReparentShardResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".vtctldata.PlannedReparentShardResponse.events: object expected"); - message.events[i] = $root.logutil.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PlannedReparentShardResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.PlannedReparentShardResponse - * @static - * @param {vtctldata.PlannedReparentShardResponse} message PlannedReparentShardResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlannedReparentShardResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.promoted_primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.promoted_primary != null && message.hasOwnProperty("promoted_primary")) - object.promoted_primary = $root.topodata.TabletAlias.toObject(message.promoted_primary, options); - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.logutil.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this PlannedReparentShardResponse to JSON. - * @function toJSON - * @memberof vtctldata.PlannedReparentShardResponse - * @instance - * @returns {Object.} JSON object - */ - PlannedReparentShardResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PlannedReparentShardResponse; - })(); - - vtctldata.RemoveKeyspaceCellRequest = (function() { - - /** - * Properties of a RemoveKeyspaceCellRequest. - * @memberof vtctldata - * @interface IRemoveKeyspaceCellRequest - * @property {string|null} [keyspace] RemoveKeyspaceCellRequest keyspace - * @property {string|null} [cell] RemoveKeyspaceCellRequest cell - * @property {boolean|null} [force] RemoveKeyspaceCellRequest force - * @property {boolean|null} [recursive] RemoveKeyspaceCellRequest recursive - */ - - /** - * Constructs a new RemoveKeyspaceCellRequest. - * @memberof vtctldata - * @classdesc Represents a RemoveKeyspaceCellRequest. - * @implements IRemoveKeyspaceCellRequest - * @constructor - * @param {vtctldata.IRemoveKeyspaceCellRequest=} [properties] Properties to set - */ - function RemoveKeyspaceCellRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemoveKeyspaceCellRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.keyspace = ""; - - /** - * RemoveKeyspaceCellRequest cell. - * @member {string} cell - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.cell = ""; - - /** - * RemoveKeyspaceCellRequest force. - * @member {boolean} force - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.force = false; - - /** - * RemoveKeyspaceCellRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - */ - RemoveKeyspaceCellRequest.prototype.recursive = false; - - /** - * Creates a new RemoveKeyspaceCellRequest instance using the specified properties. - * @function create - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {vtctldata.IRemoveKeyspaceCellRequest=} [properties] Properties to set - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest instance - */ - RemoveKeyspaceCellRequest.create = function create(properties) { - return new RemoveKeyspaceCellRequest(properties); - }; - - /** - * Encodes the specified RemoveKeyspaceCellRequest message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {vtctldata.IRemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveKeyspaceCellRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cell); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); - return writer; - }; - - /** - * Encodes the specified RemoveKeyspaceCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {vtctldata.IRemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveKeyspaceCellRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveKeyspaceCellRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveKeyspaceCellRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.cell = reader.string(); - break; - case 3: - message.force = reader.bool(); - break; - case 4: - message.recursive = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemoveKeyspaceCellRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveKeyspaceCellRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveKeyspaceCellRequest message. - * @function verify - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveKeyspaceCellRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - return null; - }; - - /** - * Creates a RemoveKeyspaceCellRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.RemoveKeyspaceCellRequest} RemoveKeyspaceCellRequest - */ - RemoveKeyspaceCellRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveKeyspaceCellRequest) - return object; - var message = new $root.vtctldata.RemoveKeyspaceCellRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.cell != null) - message.cell = String(object.cell); - if (object.force != null) - message.force = Boolean(object.force); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - return message; - }; - - /** - * Creates a plain object from a RemoveKeyspaceCellRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @static - * @param {vtctldata.RemoveKeyspaceCellRequest} message RemoveKeyspaceCellRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveKeyspaceCellRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.cell = ""; - object.force = false; - object.recursive = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - return object; - }; - - /** - * Converts this RemoveKeyspaceCellRequest to JSON. - * @function toJSON - * @memberof vtctldata.RemoveKeyspaceCellRequest - * @instance - * @returns {Object.} JSON object - */ - RemoveKeyspaceCellRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RemoveKeyspaceCellRequest; - })(); - - vtctldata.RemoveKeyspaceCellResponse = (function() { - - /** - * Properties of a RemoveKeyspaceCellResponse. - * @memberof vtctldata - * @interface IRemoveKeyspaceCellResponse - */ - - /** - * Constructs a new RemoveKeyspaceCellResponse. - * @memberof vtctldata - * @classdesc Represents a RemoveKeyspaceCellResponse. - * @implements IRemoveKeyspaceCellResponse - * @constructor - * @param {vtctldata.IRemoveKeyspaceCellResponse=} [properties] Properties to set - */ - function RemoveKeyspaceCellResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RemoveKeyspaceCellResponse instance using the specified properties. - * @function create - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {vtctldata.IRemoveKeyspaceCellResponse=} [properties] Properties to set - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse instance - */ - RemoveKeyspaceCellResponse.create = function create(properties) { - return new RemoveKeyspaceCellResponse(properties); - }; - - /** - * Encodes the specified RemoveKeyspaceCellResponse message. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {vtctldata.IRemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveKeyspaceCellResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RemoveKeyspaceCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveKeyspaceCellResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {vtctldata.IRemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveKeyspaceCellResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveKeyspaceCellResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveKeyspaceCellResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemoveKeyspaceCellResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveKeyspaceCellResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveKeyspaceCellResponse message. - * @function verify - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveKeyspaceCellResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RemoveKeyspaceCellResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.RemoveKeyspaceCellResponse} RemoveKeyspaceCellResponse - */ - RemoveKeyspaceCellResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveKeyspaceCellResponse) - return object; - return new $root.vtctldata.RemoveKeyspaceCellResponse(); - }; - - /** - * Creates a plain object from a RemoveKeyspaceCellResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @static - * @param {vtctldata.RemoveKeyspaceCellResponse} message RemoveKeyspaceCellResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveKeyspaceCellResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RemoveKeyspaceCellResponse to JSON. - * @function toJSON - * @memberof vtctldata.RemoveKeyspaceCellResponse - * @instance - * @returns {Object.} JSON object - */ - RemoveKeyspaceCellResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RemoveKeyspaceCellResponse; - })(); - - vtctldata.RemoveShardCellRequest = (function() { - - /** - * Properties of a RemoveShardCellRequest. - * @memberof vtctldata - * @interface IRemoveShardCellRequest - * @property {string|null} [keyspace] RemoveShardCellRequest keyspace - * @property {string|null} [shard_name] RemoveShardCellRequest shard_name - * @property {string|null} [cell] RemoveShardCellRequest cell - * @property {boolean|null} [force] RemoveShardCellRequest force - * @property {boolean|null} [recursive] RemoveShardCellRequest recursive - */ - - /** - * Constructs a new RemoveShardCellRequest. - * @memberof vtctldata - * @classdesc Represents a RemoveShardCellRequest. - * @implements IRemoveShardCellRequest - * @constructor - * @param {vtctldata.IRemoveShardCellRequest=} [properties] Properties to set - */ - function RemoveShardCellRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemoveShardCellRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.keyspace = ""; - - /** - * RemoveShardCellRequest shard_name. - * @member {string} shard_name - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.shard_name = ""; - - /** - * RemoveShardCellRequest cell. - * @member {string} cell - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.cell = ""; - - /** - * RemoveShardCellRequest force. - * @member {boolean} force - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.force = false; - - /** - * RemoveShardCellRequest recursive. - * @member {boolean} recursive - * @memberof vtctldata.RemoveShardCellRequest - * @instance - */ - RemoveShardCellRequest.prototype.recursive = false; - - /** - * Creates a new RemoveShardCellRequest instance using the specified properties. - * @function create - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {vtctldata.IRemoveShardCellRequest=} [properties] Properties to set - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest instance - */ - RemoveShardCellRequest.create = function create(properties) { - return new RemoveShardCellRequest(properties); - }; - - /** - * Encodes the specified RemoveShardCellRequest message. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {vtctldata.IRemoveShardCellRequest} message RemoveShardCellRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveShardCellRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard_name != null && Object.hasOwnProperty.call(message, "shard_name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard_name); - if (message.cell != null && Object.hasOwnProperty.call(message, "cell")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cell); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.recursive); - return writer; - }; - - /** - * Encodes the specified RemoveShardCellRequest message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {vtctldata.IRemoveShardCellRequest} message RemoveShardCellRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveShardCellRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveShardCellRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveShardCellRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard_name = reader.string(); - break; - case 3: - message.cell = reader.string(); - break; - case 4: - message.force = reader.bool(); - break; - case 5: - message.recursive = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemoveShardCellRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveShardCellRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveShardCellRequest message. - * @function verify - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveShardCellRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - if (!$util.isString(message.shard_name)) - return "shard_name: string expected"; - if (message.cell != null && message.hasOwnProperty("cell")) - if (!$util.isString(message.cell)) - return "cell: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; - return null; - }; - - /** - * Creates a RemoveShardCellRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.RemoveShardCellRequest} RemoveShardCellRequest - */ - RemoveShardCellRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveShardCellRequest) - return object; - var message = new $root.vtctldata.RemoveShardCellRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard_name != null) - message.shard_name = String(object.shard_name); - if (object.cell != null) - message.cell = String(object.cell); - if (object.force != null) - message.force = Boolean(object.force); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); - return message; - }; - - /** - * Creates a plain object from a RemoveShardCellRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.RemoveShardCellRequest - * @static - * @param {vtctldata.RemoveShardCellRequest} message RemoveShardCellRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveShardCellRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard_name = ""; - object.cell = ""; - object.force = false; - object.recursive = false; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard_name != null && message.hasOwnProperty("shard_name")) - object.shard_name = message.shard_name; - if (message.cell != null && message.hasOwnProperty("cell")) - object.cell = message.cell; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; - return object; - }; - - /** - * Converts this RemoveShardCellRequest to JSON. - * @function toJSON - * @memberof vtctldata.RemoveShardCellRequest - * @instance - * @returns {Object.} JSON object - */ - RemoveShardCellRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RemoveShardCellRequest; - })(); - - vtctldata.RemoveShardCellResponse = (function() { - - /** - * Properties of a RemoveShardCellResponse. - * @memberof vtctldata - * @interface IRemoveShardCellResponse - */ - - /** - * Constructs a new RemoveShardCellResponse. - * @memberof vtctldata - * @classdesc Represents a RemoveShardCellResponse. - * @implements IRemoveShardCellResponse - * @constructor - * @param {vtctldata.IRemoveShardCellResponse=} [properties] Properties to set - */ - function RemoveShardCellResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RemoveShardCellResponse instance using the specified properties. - * @function create - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {vtctldata.IRemoveShardCellResponse=} [properties] Properties to set - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse instance - */ - RemoveShardCellResponse.create = function create(properties) { - return new RemoveShardCellResponse(properties); - }; - - /** - * Encodes the specified RemoveShardCellResponse message. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {vtctldata.IRemoveShardCellResponse} message RemoveShardCellResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveShardCellResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RemoveShardCellResponse message, length delimited. Does not implicitly {@link vtctldata.RemoveShardCellResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {vtctldata.IRemoveShardCellResponse} message RemoveShardCellResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveShardCellResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveShardCellResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.RemoveShardCellResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemoveShardCellResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveShardCellResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveShardCellResponse message. - * @function verify - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveShardCellResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RemoveShardCellResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.RemoveShardCellResponse} RemoveShardCellResponse - */ - RemoveShardCellResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.RemoveShardCellResponse) - return object; - return new $root.vtctldata.RemoveShardCellResponse(); - }; - - /** - * Creates a plain object from a RemoveShardCellResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.RemoveShardCellResponse - * @static - * @param {vtctldata.RemoveShardCellResponse} message RemoveShardCellResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveShardCellResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RemoveShardCellResponse to JSON. - * @function toJSON - * @memberof vtctldata.RemoveShardCellResponse - * @instance - * @returns {Object.} JSON object - */ - RemoveShardCellResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RemoveShardCellResponse; - })(); - - vtctldata.ReparentTabletRequest = (function() { - - /** - * Properties of a ReparentTabletRequest. - * @memberof vtctldata - * @interface IReparentTabletRequest - * @property {topodata.ITabletAlias|null} [tablet] ReparentTabletRequest tablet - */ - - /** - * Constructs a new ReparentTabletRequest. - * @memberof vtctldata - * @classdesc Represents a ReparentTabletRequest. - * @implements IReparentTabletRequest - * @constructor - * @param {vtctldata.IReparentTabletRequest=} [properties] Properties to set - */ - function ReparentTabletRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReparentTabletRequest tablet. - * @member {topodata.ITabletAlias|null|undefined} tablet - * @memberof vtctldata.ReparentTabletRequest - * @instance - */ - ReparentTabletRequest.prototype.tablet = null; - - /** - * Creates a new ReparentTabletRequest instance using the specified properties. - * @function create - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {vtctldata.IReparentTabletRequest=} [properties] Properties to set - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest instance - */ - ReparentTabletRequest.create = function create(properties) { - return new ReparentTabletRequest(properties); - }; - - /** - * Encodes the specified ReparentTabletRequest message. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {vtctldata.IReparentTabletRequest} message ReparentTabletRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReparentTabletRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReparentTabletRequest message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {vtctldata.IReparentTabletRequest} message ReparentTabletRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReparentTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReparentTabletRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReparentTabletRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReparentTabletRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReparentTabletRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReparentTabletRequest message. - * @function verify - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReparentTabletRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.TabletAlias.verify(message.tablet); - if (error) - return "tablet." + error; - } - return null; - }; - - /** - * Creates a ReparentTabletRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ReparentTabletRequest} ReparentTabletRequest - */ - ReparentTabletRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReparentTabletRequest) - return object; - var message = new $root.vtctldata.ReparentTabletRequest(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.ReparentTabletRequest.tablet: object expected"); - message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); - } - return message; - }; - - /** - * Creates a plain object from a ReparentTabletRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ReparentTabletRequest - * @static - * @param {vtctldata.ReparentTabletRequest} message ReparentTabletRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReparentTabletRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); - return object; - }; - - /** - * Converts this ReparentTabletRequest to JSON. - * @function toJSON - * @memberof vtctldata.ReparentTabletRequest - * @instance - * @returns {Object.} JSON object - */ - ReparentTabletRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReparentTabletRequest; - })(); - - vtctldata.ReparentTabletResponse = (function() { - - /** - * Properties of a ReparentTabletResponse. - * @memberof vtctldata - * @interface IReparentTabletResponse - * @property {string|null} [keyspace] ReparentTabletResponse keyspace - * @property {string|null} [shard] ReparentTabletResponse shard - * @property {topodata.ITabletAlias|null} [primary] ReparentTabletResponse primary - */ - - /** - * Constructs a new ReparentTabletResponse. - * @memberof vtctldata - * @classdesc Represents a ReparentTabletResponse. - * @implements IReparentTabletResponse - * @constructor - * @param {vtctldata.IReparentTabletResponse=} [properties] Properties to set - */ - function ReparentTabletResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReparentTabletResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.ReparentTabletResponse - * @instance - */ - ReparentTabletResponse.prototype.keyspace = ""; - - /** - * ReparentTabletResponse shard. - * @member {string} shard - * @memberof vtctldata.ReparentTabletResponse - * @instance - */ - ReparentTabletResponse.prototype.shard = ""; - - /** - * ReparentTabletResponse primary. - * @member {topodata.ITabletAlias|null|undefined} primary - * @memberof vtctldata.ReparentTabletResponse - * @instance - */ - ReparentTabletResponse.prototype.primary = null; - - /** - * Creates a new ReparentTabletResponse instance using the specified properties. - * @function create - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {vtctldata.IReparentTabletResponse=} [properties] Properties to set - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse instance - */ - ReparentTabletResponse.create = function create(properties) { - return new ReparentTabletResponse(properties); - }; - - /** - * Encodes the specified ReparentTabletResponse message. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {vtctldata.IReparentTabletResponse} message ReparentTabletResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReparentTabletResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) - $root.topodata.TabletAlias.encode(message.primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReparentTabletResponse message, length delimited. Does not implicitly {@link vtctldata.ReparentTabletResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {vtctldata.IReparentTabletResponse} message ReparentTabletResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReparentTabletResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReparentTabletResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ReparentTabletResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReparentTabletResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReparentTabletResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReparentTabletResponse message. - * @function verify - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReparentTabletResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.primary != null && message.hasOwnProperty("primary")) { - var error = $root.topodata.TabletAlias.verify(message.primary); - if (error) - return "primary." + error; - } - return null; - }; - - /** - * Creates a ReparentTabletResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ReparentTabletResponse} ReparentTabletResponse - */ - ReparentTabletResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ReparentTabletResponse) - return object; - var message = new $root.vtctldata.ReparentTabletResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.primary != null) { - if (typeof object.primary !== "object") - throw TypeError(".vtctldata.ReparentTabletResponse.primary: object expected"); - message.primary = $root.topodata.TabletAlias.fromObject(object.primary); - } - return message; - }; - - /** - * Creates a plain object from a ReparentTabletResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ReparentTabletResponse - * @static - * @param {vtctldata.ReparentTabletResponse} message ReparentTabletResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReparentTabletResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.primary != null && message.hasOwnProperty("primary")) - object.primary = $root.topodata.TabletAlias.toObject(message.primary, options); - return object; - }; - - /** - * Converts this ReparentTabletResponse to JSON. - * @function toJSON - * @memberof vtctldata.ReparentTabletResponse - * @instance - * @returns {Object.} JSON object - */ - ReparentTabletResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReparentTabletResponse; - })(); - - vtctldata.ShardReplicationPositionsRequest = (function() { - - /** - * Properties of a ShardReplicationPositionsRequest. - * @memberof vtctldata - * @interface IShardReplicationPositionsRequest - * @property {string|null} [keyspace] ShardReplicationPositionsRequest keyspace - * @property {string|null} [shard] ShardReplicationPositionsRequest shard - */ - - /** - * Constructs a new ShardReplicationPositionsRequest. - * @memberof vtctldata - * @classdesc Represents a ShardReplicationPositionsRequest. - * @implements IShardReplicationPositionsRequest - * @constructor - * @param {vtctldata.IShardReplicationPositionsRequest=} [properties] Properties to set - */ - function ShardReplicationPositionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardReplicationPositionsRequest keyspace. - * @member {string} keyspace - * @memberof vtctldata.ShardReplicationPositionsRequest - * @instance - */ - ShardReplicationPositionsRequest.prototype.keyspace = ""; - - /** - * ShardReplicationPositionsRequest shard. - * @member {string} shard - * @memberof vtctldata.ShardReplicationPositionsRequest - * @instance - */ - ShardReplicationPositionsRequest.prototype.shard = ""; - - /** - * Creates a new ShardReplicationPositionsRequest instance using the specified properties. - * @function create - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {vtctldata.IShardReplicationPositionsRequest=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest instance - */ - ShardReplicationPositionsRequest.create = function create(properties) { - return new ShardReplicationPositionsRequest(properties); - }; - - /** - * Encodes the specified ShardReplicationPositionsRequest message. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {vtctldata.IShardReplicationPositionsRequest} message ShardReplicationPositionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReplicationPositionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - return writer; - }; - - /** - * Encodes the specified ShardReplicationPositionsRequest message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {vtctldata.IShardReplicationPositionsRequest} message ShardReplicationPositionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReplicationPositionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReplicationPositionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationPositionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardReplicationPositionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReplicationPositionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardReplicationPositionsRequest message. - * @function verify - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardReplicationPositionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - return null; - }; - - /** - * Creates a ShardReplicationPositionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationPositionsRequest} ShardReplicationPositionsRequest - */ - ShardReplicationPositionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationPositionsRequest) - return object; - var message = new $root.vtctldata.ShardReplicationPositionsRequest(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - return message; - }; - - /** - * Creates a plain object from a ShardReplicationPositionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ShardReplicationPositionsRequest - * @static - * @param {vtctldata.ShardReplicationPositionsRequest} message ShardReplicationPositionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardReplicationPositionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - return object; - }; - - /** - * Converts this ShardReplicationPositionsRequest to JSON. - * @function toJSON - * @memberof vtctldata.ShardReplicationPositionsRequest - * @instance - * @returns {Object.} JSON object - */ - ShardReplicationPositionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ShardReplicationPositionsRequest; - })(); - - vtctldata.ShardReplicationPositionsResponse = (function() { - - /** - * Properties of a ShardReplicationPositionsResponse. - * @memberof vtctldata - * @interface IShardReplicationPositionsResponse - * @property {Object.|null} [replication_statuses] ShardReplicationPositionsResponse replication_statuses - * @property {Object.|null} [tablet_map] ShardReplicationPositionsResponse tablet_map - */ - - /** - * Constructs a new ShardReplicationPositionsResponse. - * @memberof vtctldata - * @classdesc Represents a ShardReplicationPositionsResponse. - * @implements IShardReplicationPositionsResponse - * @constructor - * @param {vtctldata.IShardReplicationPositionsResponse=} [properties] Properties to set - */ - function ShardReplicationPositionsResponse(properties) { - this.replication_statuses = {}; - this.tablet_map = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardReplicationPositionsResponse replication_statuses. - * @member {Object.} replication_statuses - * @memberof vtctldata.ShardReplicationPositionsResponse - * @instance - */ - ShardReplicationPositionsResponse.prototype.replication_statuses = $util.emptyObject; - - /** - * ShardReplicationPositionsResponse tablet_map. - * @member {Object.} tablet_map - * @memberof vtctldata.ShardReplicationPositionsResponse - * @instance - */ - ShardReplicationPositionsResponse.prototype.tablet_map = $util.emptyObject; - - /** - * Creates a new ShardReplicationPositionsResponse instance using the specified properties. - * @function create - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {vtctldata.IShardReplicationPositionsResponse=} [properties] Properties to set - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse instance - */ - ShardReplicationPositionsResponse.create = function create(properties) { - return new ShardReplicationPositionsResponse(properties); - }; - - /** - * Encodes the specified ShardReplicationPositionsResponse message. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {vtctldata.IShardReplicationPositionsResponse} message ShardReplicationPositionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReplicationPositionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.replication_statuses != null && Object.hasOwnProperty.call(message, "replication_statuses")) - for (var keys = Object.keys(message.replication_statuses), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.replicationdata.Status.encode(message.replication_statuses[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.tablet_map != null && Object.hasOwnProperty.call(message, "tablet_map")) - for (var keys = Object.keys(message.tablet_map), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.topodata.Tablet.encode(message.tablet_map[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ShardReplicationPositionsResponse message, length delimited. Does not implicitly {@link vtctldata.ShardReplicationPositionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {vtctldata.IShardReplicationPositionsResponse} message ShardReplicationPositionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardReplicationPositionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReplicationPositionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.ShardReplicationPositionsResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.replication_statuses === $util.emptyObject) - message.replication_statuses = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.replicationdata.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.replication_statuses[key] = value; - break; - case 2: - if (message.tablet_map === $util.emptyObject) - message.tablet_map = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.topodata.Tablet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tablet_map[key] = value; - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardReplicationPositionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardReplicationPositionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardReplicationPositionsResponse message. - * @function verify - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardReplicationPositionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.replication_statuses != null && message.hasOwnProperty("replication_statuses")) { - if (!$util.isObject(message.replication_statuses)) - return "replication_statuses: object expected"; - var key = Object.keys(message.replication_statuses); - for (var i = 0; i < key.length; ++i) { - var error = $root.replicationdata.Status.verify(message.replication_statuses[key[i]]); - if (error) - return "replication_statuses." + error; - } - } - if (message.tablet_map != null && message.hasOwnProperty("tablet_map")) { - if (!$util.isObject(message.tablet_map)) - return "tablet_map: object expected"; - var key = Object.keys(message.tablet_map); - for (var i = 0; i < key.length; ++i) { - var error = $root.topodata.Tablet.verify(message.tablet_map[key[i]]); - if (error) - return "tablet_map." + error; - } - } - return null; - }; - - /** - * Creates a ShardReplicationPositionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.ShardReplicationPositionsResponse} ShardReplicationPositionsResponse - */ - ShardReplicationPositionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.ShardReplicationPositionsResponse) - return object; - var message = new $root.vtctldata.ShardReplicationPositionsResponse(); - if (object.replication_statuses) { - if (typeof object.replication_statuses !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.replication_statuses: object expected"); - message.replication_statuses = {}; - for (var keys = Object.keys(object.replication_statuses), i = 0; i < keys.length; ++i) { - if (typeof object.replication_statuses[keys[i]] !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.replication_statuses: object expected"); - message.replication_statuses[keys[i]] = $root.replicationdata.Status.fromObject(object.replication_statuses[keys[i]]); - } - } - if (object.tablet_map) { - if (typeof object.tablet_map !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.tablet_map: object expected"); - message.tablet_map = {}; - for (var keys = Object.keys(object.tablet_map), i = 0; i < keys.length; ++i) { - if (typeof object.tablet_map[keys[i]] !== "object") - throw TypeError(".vtctldata.ShardReplicationPositionsResponse.tablet_map: object expected"); - message.tablet_map[keys[i]] = $root.topodata.Tablet.fromObject(object.tablet_map[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a ShardReplicationPositionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.ShardReplicationPositionsResponse - * @static - * @param {vtctldata.ShardReplicationPositionsResponse} message ShardReplicationPositionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardReplicationPositionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.replication_statuses = {}; - object.tablet_map = {}; - } - var keys2; - if (message.replication_statuses && (keys2 = Object.keys(message.replication_statuses)).length) { - object.replication_statuses = {}; - for (var j = 0; j < keys2.length; ++j) - object.replication_statuses[keys2[j]] = $root.replicationdata.Status.toObject(message.replication_statuses[keys2[j]], options); - } - if (message.tablet_map && (keys2 = Object.keys(message.tablet_map)).length) { - object.tablet_map = {}; - for (var j = 0; j < keys2.length; ++j) - object.tablet_map[keys2[j]] = $root.topodata.Tablet.toObject(message.tablet_map[keys2[j]], options); - } - return object; - }; - - /** - * Converts this ShardReplicationPositionsResponse to JSON. - * @function toJSON - * @memberof vtctldata.ShardReplicationPositionsResponse - * @instance - * @returns {Object.} JSON object - */ - ShardReplicationPositionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ShardReplicationPositionsResponse; - })(); - - vtctldata.TabletExternallyReparentedRequest = (function() { - - /** - * Properties of a TabletExternallyReparentedRequest. - * @memberof vtctldata - * @interface ITabletExternallyReparentedRequest - * @property {topodata.ITabletAlias|null} [tablet] TabletExternallyReparentedRequest tablet - */ - - /** - * Constructs a new TabletExternallyReparentedRequest. - * @memberof vtctldata - * @classdesc Represents a TabletExternallyReparentedRequest. - * @implements ITabletExternallyReparentedRequest - * @constructor - * @param {vtctldata.ITabletExternallyReparentedRequest=} [properties] Properties to set - */ - function TabletExternallyReparentedRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TabletExternallyReparentedRequest tablet. - * @member {topodata.ITabletAlias|null|undefined} tablet - * @memberof vtctldata.TabletExternallyReparentedRequest - * @instance - */ - TabletExternallyReparentedRequest.prototype.tablet = null; - - /** - * Creates a new TabletExternallyReparentedRequest instance using the specified properties. - * @function create - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {vtctldata.ITabletExternallyReparentedRequest=} [properties] Properties to set - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest instance - */ - TabletExternallyReparentedRequest.create = function create(properties) { - return new TabletExternallyReparentedRequest(properties); - }; - - /** - * Encodes the specified TabletExternallyReparentedRequest message. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. - * @function encode - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {vtctldata.ITabletExternallyReparentedRequest} message TabletExternallyReparentedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletExternallyReparentedRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tablet != null && Object.hasOwnProperty.call(message, "tablet")) - $root.topodata.TabletAlias.encode(message.tablet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TabletExternallyReparentedRequest message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {vtctldata.ITabletExternallyReparentedRequest} message TabletExternallyReparentedRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletExternallyReparentedRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletExternallyReparentedRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TabletExternallyReparentedRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.tablet = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TabletExternallyReparentedRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletExternallyReparentedRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TabletExternallyReparentedRequest message. - * @function verify - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TabletExternallyReparentedRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tablet != null && message.hasOwnProperty("tablet")) { - var error = $root.topodata.TabletAlias.verify(message.tablet); - if (error) - return "tablet." + error; - } - return null; - }; - - /** - * Creates a TabletExternallyReparentedRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.TabletExternallyReparentedRequest} TabletExternallyReparentedRequest - */ - TabletExternallyReparentedRequest.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TabletExternallyReparentedRequest) - return object; - var message = new $root.vtctldata.TabletExternallyReparentedRequest(); - if (object.tablet != null) { - if (typeof object.tablet !== "object") - throw TypeError(".vtctldata.TabletExternallyReparentedRequest.tablet: object expected"); - message.tablet = $root.topodata.TabletAlias.fromObject(object.tablet); - } - return message; - }; - - /** - * Creates a plain object from a TabletExternallyReparentedRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.TabletExternallyReparentedRequest - * @static - * @param {vtctldata.TabletExternallyReparentedRequest} message TabletExternallyReparentedRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TabletExternallyReparentedRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tablet = null; - if (message.tablet != null && message.hasOwnProperty("tablet")) - object.tablet = $root.topodata.TabletAlias.toObject(message.tablet, options); - return object; - }; - - /** - * Converts this TabletExternallyReparentedRequest to JSON. - * @function toJSON - * @memberof vtctldata.TabletExternallyReparentedRequest - * @instance - * @returns {Object.} JSON object - */ - TabletExternallyReparentedRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TabletExternallyReparentedRequest; - })(); - - vtctldata.TabletExternallyReparentedResponse = (function() { - - /** - * Properties of a TabletExternallyReparentedResponse. - * @memberof vtctldata - * @interface ITabletExternallyReparentedResponse - * @property {string|null} [keyspace] TabletExternallyReparentedResponse keyspace - * @property {string|null} [shard] TabletExternallyReparentedResponse shard - * @property {topodata.ITabletAlias|null} [new_primary] TabletExternallyReparentedResponse new_primary - * @property {topodata.ITabletAlias|null} [old_primary] TabletExternallyReparentedResponse old_primary - */ - - /** - * Constructs a new TabletExternallyReparentedResponse. - * @memberof vtctldata - * @classdesc Represents a TabletExternallyReparentedResponse. - * @implements ITabletExternallyReparentedResponse - * @constructor - * @param {vtctldata.ITabletExternallyReparentedResponse=} [properties] Properties to set - */ - function TabletExternallyReparentedResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TabletExternallyReparentedResponse keyspace. - * @member {string} keyspace - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.keyspace = ""; - - /** - * TabletExternallyReparentedResponse shard. - * @member {string} shard - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.shard = ""; - - /** - * TabletExternallyReparentedResponse new_primary. - * @member {topodata.ITabletAlias|null|undefined} new_primary - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.new_primary = null; - - /** - * TabletExternallyReparentedResponse old_primary. - * @member {topodata.ITabletAlias|null|undefined} old_primary - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - */ - TabletExternallyReparentedResponse.prototype.old_primary = null; - - /** - * Creates a new TabletExternallyReparentedResponse instance using the specified properties. - * @function create - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {vtctldata.ITabletExternallyReparentedResponse=} [properties] Properties to set - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse instance - */ - TabletExternallyReparentedResponse.create = function create(properties) { - return new TabletExternallyReparentedResponse(properties); - }; - - /** - * Encodes the specified TabletExternallyReparentedResponse message. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. - * @function encode - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {vtctldata.ITabletExternallyReparentedResponse} message TabletExternallyReparentedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletExternallyReparentedResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.new_primary != null && Object.hasOwnProperty.call(message, "new_primary")) - $root.topodata.TabletAlias.encode(message.new_primary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.old_primary != null && Object.hasOwnProperty.call(message, "old_primary")) - $root.topodata.TabletAlias.encode(message.old_primary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TabletExternallyReparentedResponse message, length delimited. Does not implicitly {@link vtctldata.TabletExternallyReparentedResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {vtctldata.ITabletExternallyReparentedResponse} message TabletExternallyReparentedResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TabletExternallyReparentedResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer. - * @function decode - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletExternallyReparentedResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vtctldata.TabletExternallyReparentedResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.new_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - case 4: - message.old_primary = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TabletExternallyReparentedResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TabletExternallyReparentedResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TabletExternallyReparentedResponse message. - * @function verify - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TabletExternallyReparentedResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) { - var error = $root.topodata.TabletAlias.verify(message.new_primary); - if (error) - return "new_primary." + error; - } - if (message.old_primary != null && message.hasOwnProperty("old_primary")) { - var error = $root.topodata.TabletAlias.verify(message.old_primary); - if (error) - return "old_primary." + error; - } - return null; - }; - - /** - * Creates a TabletExternallyReparentedResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {Object.} object Plain object - * @returns {vtctldata.TabletExternallyReparentedResponse} TabletExternallyReparentedResponse - */ - TabletExternallyReparentedResponse.fromObject = function fromObject(object) { - if (object instanceof $root.vtctldata.TabletExternallyReparentedResponse) - return object; - var message = new $root.vtctldata.TabletExternallyReparentedResponse(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.new_primary != null) { - if (typeof object.new_primary !== "object") - throw TypeError(".vtctldata.TabletExternallyReparentedResponse.new_primary: object expected"); - message.new_primary = $root.topodata.TabletAlias.fromObject(object.new_primary); - } - if (object.old_primary != null) { - if (typeof object.old_primary !== "object") - throw TypeError(".vtctldata.TabletExternallyReparentedResponse.old_primary: object expected"); - message.old_primary = $root.topodata.TabletAlias.fromObject(object.old_primary); - } - return message; - }; - - /** - * Creates a plain object from a TabletExternallyReparentedResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof vtctldata.TabletExternallyReparentedResponse - * @static - * @param {vtctldata.TabletExternallyReparentedResponse} message TabletExternallyReparentedResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TabletExternallyReparentedResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.new_primary = null; - object.old_primary = null; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.new_primary != null && message.hasOwnProperty("new_primary")) - object.new_primary = $root.topodata.TabletAlias.toObject(message.new_primary, options); - if (message.old_primary != null && message.hasOwnProperty("old_primary")) - object.old_primary = $root.topodata.TabletAlias.toObject(message.old_primary, options); - return object; - }; - - /** - * Converts this TabletExternallyReparentedResponse to JSON. - * @function toJSON - * @memberof vtctldata.TabletExternallyReparentedResponse - * @instance - * @returns {Object.} JSON object - */ - TabletExternallyReparentedResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TabletExternallyReparentedResponse; - })(); - - return vtctldata; -})(); - -$root.binlogdata = (function() { - - /** - * Namespace binlogdata. - * @exports binlogdata - * @namespace - */ - var binlogdata = {}; - - binlogdata.Charset = (function() { - - /** - * Properties of a Charset. - * @memberof binlogdata - * @interface ICharset - * @property {number|null} [client] Charset client - * @property {number|null} [conn] Charset conn - * @property {number|null} [server] Charset server - */ - - /** - * Constructs a new Charset. - * @memberof binlogdata - * @classdesc Represents a Charset. - * @implements ICharset - * @constructor - * @param {binlogdata.ICharset=} [properties] Properties to set - */ - function Charset(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Charset client. - * @member {number} client - * @memberof binlogdata.Charset - * @instance - */ - Charset.prototype.client = 0; - - /** - * Charset conn. - * @member {number} conn - * @memberof binlogdata.Charset - * @instance - */ - Charset.prototype.conn = 0; - - /** - * Charset server. - * @member {number} server - * @memberof binlogdata.Charset - * @instance - */ - Charset.prototype.server = 0; - - /** - * Creates a new Charset instance using the specified properties. - * @function create - * @memberof binlogdata.Charset - * @static - * @param {binlogdata.ICharset=} [properties] Properties to set - * @returns {binlogdata.Charset} Charset instance - */ - Charset.create = function create(properties) { - return new Charset(properties); - }; - - /** - * Encodes the specified Charset message. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. - * @function encode - * @memberof binlogdata.Charset - * @static - * @param {binlogdata.ICharset} message Charset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Charset.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client != null && Object.hasOwnProperty.call(message, "client")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.client); - if (message.conn != null && Object.hasOwnProperty.call(message, "conn")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.conn); - if (message.server != null && Object.hasOwnProperty.call(message, "server")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.server); - return writer; - }; - - /** - * Encodes the specified Charset message, length delimited. Does not implicitly {@link binlogdata.Charset.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.Charset - * @static - * @param {binlogdata.ICharset} message Charset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Charset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Charset message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.Charset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Charset} Charset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Charset.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Charset(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client = reader.int32(); - break; - case 2: - message.conn = reader.int32(); - break; - case 3: - message.server = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Charset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.Charset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Charset} Charset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Charset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Charset message. - * @function verify - * @memberof binlogdata.Charset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Charset.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client != null && message.hasOwnProperty("client")) - if (!$util.isInteger(message.client)) - return "client: integer expected"; - if (message.conn != null && message.hasOwnProperty("conn")) - if (!$util.isInteger(message.conn)) - return "conn: integer expected"; - if (message.server != null && message.hasOwnProperty("server")) - if (!$util.isInteger(message.server)) - return "server: integer expected"; - return null; - }; - - /** - * Creates a Charset message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.Charset - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.Charset} Charset - */ - Charset.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Charset) - return object; - var message = new $root.binlogdata.Charset(); - if (object.client != null) - message.client = object.client | 0; - if (object.conn != null) - message.conn = object.conn | 0; - if (object.server != null) - message.server = object.server | 0; - return message; - }; - - /** - * Creates a plain object from a Charset message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.Charset - * @static - * @param {binlogdata.Charset} message Charset - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Charset.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client = 0; - object.conn = 0; - object.server = 0; - } - if (message.client != null && message.hasOwnProperty("client")) - object.client = message.client; - if (message.conn != null && message.hasOwnProperty("conn")) - object.conn = message.conn; - if (message.server != null && message.hasOwnProperty("server")) - object.server = message.server; - return object; - }; - - /** - * Converts this Charset to JSON. - * @function toJSON - * @memberof binlogdata.Charset - * @instance - * @returns {Object.} JSON object - */ - Charset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Charset; - })(); - - binlogdata.BinlogTransaction = (function() { - - /** - * Properties of a BinlogTransaction. - * @memberof binlogdata - * @interface IBinlogTransaction - * @property {Array.|null} [statements] BinlogTransaction statements - * @property {query.IEventToken|null} [event_token] BinlogTransaction event_token - */ - - /** - * Constructs a new BinlogTransaction. - * @memberof binlogdata - * @classdesc Represents a BinlogTransaction. - * @implements IBinlogTransaction - * @constructor - * @param {binlogdata.IBinlogTransaction=} [properties] Properties to set - */ - function BinlogTransaction(properties) { - this.statements = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BinlogTransaction statements. - * @member {Array.} statements - * @memberof binlogdata.BinlogTransaction - * @instance - */ - BinlogTransaction.prototype.statements = $util.emptyArray; - - /** - * BinlogTransaction event_token. - * @member {query.IEventToken|null|undefined} event_token - * @memberof binlogdata.BinlogTransaction - * @instance - */ - BinlogTransaction.prototype.event_token = null; - - /** - * Creates a new BinlogTransaction instance using the specified properties. - * @function create - * @memberof binlogdata.BinlogTransaction - * @static - * @param {binlogdata.IBinlogTransaction=} [properties] Properties to set - * @returns {binlogdata.BinlogTransaction} BinlogTransaction instance - */ - BinlogTransaction.create = function create(properties) { - return new BinlogTransaction(properties); - }; - - /** - * Encodes the specified BinlogTransaction message. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. - * @function encode - * @memberof binlogdata.BinlogTransaction - * @static - * @param {binlogdata.IBinlogTransaction} message BinlogTransaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinlogTransaction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.statements != null && message.statements.length) - for (var i = 0; i < message.statements.length; ++i) - $root.binlogdata.BinlogTransaction.Statement.encode(message.statements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.event_token != null && Object.hasOwnProperty.call(message, "event_token")) - $root.query.EventToken.encode(message.event_token, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BinlogTransaction message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.BinlogTransaction - * @static - * @param {binlogdata.IBinlogTransaction} message BinlogTransaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinlogTransaction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BinlogTransaction message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.BinlogTransaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.BinlogTransaction} BinlogTransaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinlogTransaction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogTransaction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.statements && message.statements.length)) - message.statements = []; - message.statements.push($root.binlogdata.BinlogTransaction.Statement.decode(reader, reader.uint32())); - break; - case 4: - message.event_token = $root.query.EventToken.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BinlogTransaction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.BinlogTransaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.BinlogTransaction} BinlogTransaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinlogTransaction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BinlogTransaction message. - * @function verify - * @memberof binlogdata.BinlogTransaction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BinlogTransaction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.statements != null && message.hasOwnProperty("statements")) { - if (!Array.isArray(message.statements)) - return "statements: array expected"; - for (var i = 0; i < message.statements.length; ++i) { - var error = $root.binlogdata.BinlogTransaction.Statement.verify(message.statements[i]); - if (error) - return "statements." + error; - } - } - if (message.event_token != null && message.hasOwnProperty("event_token")) { - var error = $root.query.EventToken.verify(message.event_token); - if (error) - return "event_token." + error; - } - return null; - }; - - /** - * Creates a BinlogTransaction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.BinlogTransaction - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.BinlogTransaction} BinlogTransaction - */ - BinlogTransaction.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.BinlogTransaction) - return object; - var message = new $root.binlogdata.BinlogTransaction(); - if (object.statements) { - if (!Array.isArray(object.statements)) - throw TypeError(".binlogdata.BinlogTransaction.statements: array expected"); - message.statements = []; - for (var i = 0; i < object.statements.length; ++i) { - if (typeof object.statements[i] !== "object") - throw TypeError(".binlogdata.BinlogTransaction.statements: object expected"); - message.statements[i] = $root.binlogdata.BinlogTransaction.Statement.fromObject(object.statements[i]); - } - } - if (object.event_token != null) { - if (typeof object.event_token !== "object") - throw TypeError(".binlogdata.BinlogTransaction.event_token: object expected"); - message.event_token = $root.query.EventToken.fromObject(object.event_token); - } - return message; - }; - - /** - * Creates a plain object from a BinlogTransaction message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.BinlogTransaction - * @static - * @param {binlogdata.BinlogTransaction} message BinlogTransaction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BinlogTransaction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.statements = []; - if (options.defaults) - object.event_token = null; - if (message.statements && message.statements.length) { - object.statements = []; - for (var j = 0; j < message.statements.length; ++j) - object.statements[j] = $root.binlogdata.BinlogTransaction.Statement.toObject(message.statements[j], options); - } - if (message.event_token != null && message.hasOwnProperty("event_token")) - object.event_token = $root.query.EventToken.toObject(message.event_token, options); - return object; - }; - - /** - * Converts this BinlogTransaction to JSON. - * @function toJSON - * @memberof binlogdata.BinlogTransaction - * @instance - * @returns {Object.} JSON object - */ - BinlogTransaction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - BinlogTransaction.Statement = (function() { - - /** - * Properties of a Statement. - * @memberof binlogdata.BinlogTransaction - * @interface IStatement - * @property {binlogdata.BinlogTransaction.Statement.Category|null} [category] Statement category - * @property {binlogdata.ICharset|null} [charset] Statement charset - * @property {Uint8Array|null} [sql] Statement sql - */ - - /** - * Constructs a new Statement. - * @memberof binlogdata.BinlogTransaction - * @classdesc Represents a Statement. - * @implements IStatement - * @constructor - * @param {binlogdata.BinlogTransaction.IStatement=} [properties] Properties to set - */ - function Statement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Statement category. - * @member {binlogdata.BinlogTransaction.Statement.Category} category - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - */ - Statement.prototype.category = 0; - - /** - * Statement charset. - * @member {binlogdata.ICharset|null|undefined} charset - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - */ - Statement.prototype.charset = null; - - /** - * Statement sql. - * @member {Uint8Array} sql - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - */ - Statement.prototype.sql = $util.newBuffer([]); - - /** - * Creates a new Statement instance using the specified properties. - * @function create - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.IStatement=} [properties] Properties to set - * @returns {binlogdata.BinlogTransaction.Statement} Statement instance - */ - Statement.create = function create(properties) { - return new Statement(properties); - }; - - /** - * Encodes the specified Statement message. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @function encode - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sql != null && Object.hasOwnProperty.call(message, "sql")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.sql); - return writer; - }; - - /** - * Encodes the specified Statement message, length delimited. Does not implicitly {@link binlogdata.BinlogTransaction.Statement.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.IStatement} message Statement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Statement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Statement message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.BinlogTransaction.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogTransaction.Statement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.category = reader.int32(); - break; - case 2: - message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); - break; - case 3: - message.sql = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Statement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.BinlogTransaction.Statement} Statement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Statement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Statement message. - * @function verify - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Statement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.category != null && message.hasOwnProperty("category")) - switch (message.category) { - default: - return "category: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.charset != null && message.hasOwnProperty("charset")) { - var error = $root.binlogdata.Charset.verify(message.charset); - if (error) - return "charset." + error; - } - if (message.sql != null && message.hasOwnProperty("sql")) - if (!(message.sql && typeof message.sql.length === "number" || $util.isString(message.sql))) - return "sql: buffer expected"; - return null; - }; - - /** - * Creates a Statement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.BinlogTransaction.Statement} Statement - */ - Statement.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.BinlogTransaction.Statement) - return object; - var message = new $root.binlogdata.BinlogTransaction.Statement(); - switch (object.category) { - case "BL_UNRECOGNIZED": - case 0: - message.category = 0; - break; - case "BL_BEGIN": - case 1: - message.category = 1; - break; - case "BL_COMMIT": - case 2: - message.category = 2; - break; - case "BL_ROLLBACK": - case 3: - message.category = 3; - break; - case "BL_DML_DEPRECATED": - case 4: - message.category = 4; - break; - case "BL_DDL": - case 5: - message.category = 5; - break; - case "BL_SET": - case 6: - message.category = 6; - break; - case "BL_INSERT": - case 7: - message.category = 7; - break; - case "BL_UPDATE": - case 8: - message.category = 8; - break; - case "BL_DELETE": - case 9: - message.category = 9; - break; - } - if (object.charset != null) { - if (typeof object.charset !== "object") - throw TypeError(".binlogdata.BinlogTransaction.Statement.charset: object expected"); - message.charset = $root.binlogdata.Charset.fromObject(object.charset); - } - if (object.sql != null) - if (typeof object.sql === "string") - $util.base64.decode(object.sql, message.sql = $util.newBuffer($util.base64.length(object.sql)), 0); - else if (object.sql.length) - message.sql = object.sql; - return message; - }; - - /** - * Creates a plain object from a Statement message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.BinlogTransaction.Statement - * @static - * @param {binlogdata.BinlogTransaction.Statement} message Statement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Statement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.category = options.enums === String ? "BL_UNRECOGNIZED" : 0; - object.charset = null; - if (options.bytes === String) - object.sql = ""; - else { - object.sql = []; - if (options.bytes !== Array) - object.sql = $util.newBuffer(object.sql); - } - } - if (message.category != null && message.hasOwnProperty("category")) - object.category = options.enums === String ? $root.binlogdata.BinlogTransaction.Statement.Category[message.category] : message.category; - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = $root.binlogdata.Charset.toObject(message.charset, options); - if (message.sql != null && message.hasOwnProperty("sql")) - object.sql = options.bytes === String ? $util.base64.encode(message.sql, 0, message.sql.length) : options.bytes === Array ? Array.prototype.slice.call(message.sql) : message.sql; - return object; - }; - - /** - * Converts this Statement to JSON. - * @function toJSON - * @memberof binlogdata.BinlogTransaction.Statement - * @instance - * @returns {Object.} JSON object - */ - Statement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Category enum. - * @name binlogdata.BinlogTransaction.Statement.Category - * @enum {number} - * @property {number} BL_UNRECOGNIZED=0 BL_UNRECOGNIZED value - * @property {number} BL_BEGIN=1 BL_BEGIN value - * @property {number} BL_COMMIT=2 BL_COMMIT value - * @property {number} BL_ROLLBACK=3 BL_ROLLBACK value - * @property {number} BL_DML_DEPRECATED=4 BL_DML_DEPRECATED value - * @property {number} BL_DDL=5 BL_DDL value - * @property {number} BL_SET=6 BL_SET value - * @property {number} BL_INSERT=7 BL_INSERT value - * @property {number} BL_UPDATE=8 BL_UPDATE value - * @property {number} BL_DELETE=9 BL_DELETE value - */ - Statement.Category = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BL_UNRECOGNIZED"] = 0; - values[valuesById[1] = "BL_BEGIN"] = 1; - values[valuesById[2] = "BL_COMMIT"] = 2; - values[valuesById[3] = "BL_ROLLBACK"] = 3; - values[valuesById[4] = "BL_DML_DEPRECATED"] = 4; - values[valuesById[5] = "BL_DDL"] = 5; - values[valuesById[6] = "BL_SET"] = 6; - values[valuesById[7] = "BL_INSERT"] = 7; - values[valuesById[8] = "BL_UPDATE"] = 8; - values[valuesById[9] = "BL_DELETE"] = 9; - return values; - })(); - - return Statement; - })(); - - return BinlogTransaction; - })(); - - binlogdata.StreamKeyRangeRequest = (function() { - - /** - * Properties of a StreamKeyRangeRequest. - * @memberof binlogdata - * @interface IStreamKeyRangeRequest - * @property {string|null} [position] StreamKeyRangeRequest position - * @property {topodata.IKeyRange|null} [key_range] StreamKeyRangeRequest key_range - * @property {binlogdata.ICharset|null} [charset] StreamKeyRangeRequest charset - */ - - /** - * Constructs a new StreamKeyRangeRequest. - * @memberof binlogdata - * @classdesc Represents a StreamKeyRangeRequest. - * @implements IStreamKeyRangeRequest - * @constructor - * @param {binlogdata.IStreamKeyRangeRequest=} [properties] Properties to set - */ - function StreamKeyRangeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamKeyRangeRequest position. - * @member {string} position - * @memberof binlogdata.StreamKeyRangeRequest - * @instance - */ - StreamKeyRangeRequest.prototype.position = ""; - - /** - * StreamKeyRangeRequest key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof binlogdata.StreamKeyRangeRequest - * @instance - */ - StreamKeyRangeRequest.prototype.key_range = null; - - /** - * StreamKeyRangeRequest charset. - * @member {binlogdata.ICharset|null|undefined} charset - * @memberof binlogdata.StreamKeyRangeRequest - * @instance - */ - StreamKeyRangeRequest.prototype.charset = null; - - /** - * Creates a new StreamKeyRangeRequest instance using the specified properties. - * @function create - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {binlogdata.IStreamKeyRangeRequest=} [properties] Properties to set - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest instance - */ - StreamKeyRangeRequest.create = function create(properties) { - return new StreamKeyRangeRequest(properties); - }; - - /** - * Encodes the specified StreamKeyRangeRequest message. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. - * @function encode - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {binlogdata.IStreamKeyRangeRequest} message StreamKeyRangeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamKeyRangeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamKeyRangeRequest message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {binlogdata.IStreamKeyRangeRequest} message StreamKeyRangeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamKeyRangeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamKeyRangeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamKeyRangeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 3: - message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamKeyRangeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamKeyRangeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamKeyRangeRequest message. - * @function verify - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamKeyRangeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.charset != null && message.hasOwnProperty("charset")) { - var error = $root.binlogdata.Charset.verify(message.charset); - if (error) - return "charset." + error; - } - return null; - }; - - /** - * Creates a StreamKeyRangeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.StreamKeyRangeRequest} StreamKeyRangeRequest - */ - StreamKeyRangeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamKeyRangeRequest) - return object; - var message = new $root.binlogdata.StreamKeyRangeRequest(); - if (object.position != null) - message.position = String(object.position); - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".binlogdata.StreamKeyRangeRequest.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - if (object.charset != null) { - if (typeof object.charset !== "object") - throw TypeError(".binlogdata.StreamKeyRangeRequest.charset: object expected"); - message.charset = $root.binlogdata.Charset.fromObject(object.charset); - } - return message; - }; - - /** - * Creates a plain object from a StreamKeyRangeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.StreamKeyRangeRequest - * @static - * @param {binlogdata.StreamKeyRangeRequest} message StreamKeyRangeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamKeyRangeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.position = ""; - object.key_range = null; - object.charset = null; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = $root.binlogdata.Charset.toObject(message.charset, options); - return object; - }; - - /** - * Converts this StreamKeyRangeRequest to JSON. - * @function toJSON - * @memberof binlogdata.StreamKeyRangeRequest - * @instance - * @returns {Object.} JSON object - */ - StreamKeyRangeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamKeyRangeRequest; - })(); - - binlogdata.StreamKeyRangeResponse = (function() { - - /** - * Properties of a StreamKeyRangeResponse. - * @memberof binlogdata - * @interface IStreamKeyRangeResponse - * @property {binlogdata.IBinlogTransaction|null} [binlog_transaction] StreamKeyRangeResponse binlog_transaction - */ - - /** - * Constructs a new StreamKeyRangeResponse. - * @memberof binlogdata - * @classdesc Represents a StreamKeyRangeResponse. - * @implements IStreamKeyRangeResponse - * @constructor - * @param {binlogdata.IStreamKeyRangeResponse=} [properties] Properties to set - */ - function StreamKeyRangeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamKeyRangeResponse binlog_transaction. - * @member {binlogdata.IBinlogTransaction|null|undefined} binlog_transaction - * @memberof binlogdata.StreamKeyRangeResponse - * @instance - */ - StreamKeyRangeResponse.prototype.binlog_transaction = null; - - /** - * Creates a new StreamKeyRangeResponse instance using the specified properties. - * @function create - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {binlogdata.IStreamKeyRangeResponse=} [properties] Properties to set - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse instance - */ - StreamKeyRangeResponse.create = function create(properties) { - return new StreamKeyRangeResponse(properties); - }; - - /** - * Encodes the specified StreamKeyRangeResponse message. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. - * @function encode - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {binlogdata.IStreamKeyRangeResponse} message StreamKeyRangeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamKeyRangeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binlog_transaction != null && Object.hasOwnProperty.call(message, "binlog_transaction")) - $root.binlogdata.BinlogTransaction.encode(message.binlog_transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamKeyRangeResponse message, length delimited. Does not implicitly {@link binlogdata.StreamKeyRangeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {binlogdata.IStreamKeyRangeResponse} message StreamKeyRangeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamKeyRangeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamKeyRangeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamKeyRangeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.binlog_transaction = $root.binlogdata.BinlogTransaction.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamKeyRangeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamKeyRangeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamKeyRangeResponse message. - * @function verify - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamKeyRangeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) { - var error = $root.binlogdata.BinlogTransaction.verify(message.binlog_transaction); - if (error) - return "binlog_transaction." + error; - } - return null; - }; - - /** - * Creates a StreamKeyRangeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.StreamKeyRangeResponse} StreamKeyRangeResponse - */ - StreamKeyRangeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamKeyRangeResponse) - return object; - var message = new $root.binlogdata.StreamKeyRangeResponse(); - if (object.binlog_transaction != null) { - if (typeof object.binlog_transaction !== "object") - throw TypeError(".binlogdata.StreamKeyRangeResponse.binlog_transaction: object expected"); - message.binlog_transaction = $root.binlogdata.BinlogTransaction.fromObject(object.binlog_transaction); - } - return message; - }; - - /** - * Creates a plain object from a StreamKeyRangeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.StreamKeyRangeResponse - * @static - * @param {binlogdata.StreamKeyRangeResponse} message StreamKeyRangeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamKeyRangeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.binlog_transaction = null; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) - object.binlog_transaction = $root.binlogdata.BinlogTransaction.toObject(message.binlog_transaction, options); - return object; - }; - - /** - * Converts this StreamKeyRangeResponse to JSON. - * @function toJSON - * @memberof binlogdata.StreamKeyRangeResponse - * @instance - * @returns {Object.} JSON object - */ - StreamKeyRangeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamKeyRangeResponse; - })(); - - binlogdata.StreamTablesRequest = (function() { - - /** - * Properties of a StreamTablesRequest. - * @memberof binlogdata - * @interface IStreamTablesRequest - * @property {string|null} [position] StreamTablesRequest position - * @property {Array.|null} [tables] StreamTablesRequest tables - * @property {binlogdata.ICharset|null} [charset] StreamTablesRequest charset - */ - - /** - * Constructs a new StreamTablesRequest. - * @memberof binlogdata - * @classdesc Represents a StreamTablesRequest. - * @implements IStreamTablesRequest - * @constructor - * @param {binlogdata.IStreamTablesRequest=} [properties] Properties to set - */ - function StreamTablesRequest(properties) { - this.tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamTablesRequest position. - * @member {string} position - * @memberof binlogdata.StreamTablesRequest - * @instance - */ - StreamTablesRequest.prototype.position = ""; - - /** - * StreamTablesRequest tables. - * @member {Array.} tables - * @memberof binlogdata.StreamTablesRequest - * @instance - */ - StreamTablesRequest.prototype.tables = $util.emptyArray; - - /** - * StreamTablesRequest charset. - * @member {binlogdata.ICharset|null|undefined} charset - * @memberof binlogdata.StreamTablesRequest - * @instance - */ - StreamTablesRequest.prototype.charset = null; - - /** - * Creates a new StreamTablesRequest instance using the specified properties. - * @function create - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {binlogdata.IStreamTablesRequest=} [properties] Properties to set - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest instance - */ - StreamTablesRequest.create = function create(properties) { - return new StreamTablesRequest(properties); - }; - - /** - * Encodes the specified StreamTablesRequest message. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. - * @function encode - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {binlogdata.IStreamTablesRequest} message StreamTablesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamTablesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.position); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tables[i]); - if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) - $root.binlogdata.Charset.encode(message.charset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamTablesRequest message, length delimited. Does not implicitly {@link binlogdata.StreamTablesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {binlogdata.IStreamTablesRequest} message StreamTablesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamTablesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamTablesRequest message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamTablesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamTablesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.position = reader.string(); - break; - case 2: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 3: - message.charset = $root.binlogdata.Charset.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamTablesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamTablesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamTablesRequest message. - * @function verify - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamTablesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.charset != null && message.hasOwnProperty("charset")) { - var error = $root.binlogdata.Charset.verify(message.charset); - if (error) - return "charset." + error; - } - return null; - }; - - /** - * Creates a StreamTablesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.StreamTablesRequest} StreamTablesRequest - */ - StreamTablesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamTablesRequest) - return object; - var message = new $root.binlogdata.StreamTablesRequest(); - if (object.position != null) - message.position = String(object.position); - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.StreamTablesRequest.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.charset != null) { - if (typeof object.charset !== "object") - throw TypeError(".binlogdata.StreamTablesRequest.charset: object expected"); - message.charset = $root.binlogdata.Charset.fromObject(object.charset); - } - return message; - }; - - /** - * Creates a plain object from a StreamTablesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.StreamTablesRequest - * @static - * @param {binlogdata.StreamTablesRequest} message StreamTablesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamTablesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tables = []; - if (options.defaults) { - object.position = ""; - object.charset = null; - } - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.charset != null && message.hasOwnProperty("charset")) - object.charset = $root.binlogdata.Charset.toObject(message.charset, options); - return object; - }; - - /** - * Converts this StreamTablesRequest to JSON. - * @function toJSON - * @memberof binlogdata.StreamTablesRequest - * @instance - * @returns {Object.} JSON object - */ - StreamTablesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamTablesRequest; - })(); - - binlogdata.StreamTablesResponse = (function() { - - /** - * Properties of a StreamTablesResponse. - * @memberof binlogdata - * @interface IStreamTablesResponse - * @property {binlogdata.IBinlogTransaction|null} [binlog_transaction] StreamTablesResponse binlog_transaction - */ - - /** - * Constructs a new StreamTablesResponse. - * @memberof binlogdata - * @classdesc Represents a StreamTablesResponse. - * @implements IStreamTablesResponse - * @constructor - * @param {binlogdata.IStreamTablesResponse=} [properties] Properties to set - */ - function StreamTablesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamTablesResponse binlog_transaction. - * @member {binlogdata.IBinlogTransaction|null|undefined} binlog_transaction - * @memberof binlogdata.StreamTablesResponse - * @instance - */ - StreamTablesResponse.prototype.binlog_transaction = null; - - /** - * Creates a new StreamTablesResponse instance using the specified properties. - * @function create - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {binlogdata.IStreamTablesResponse=} [properties] Properties to set - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse instance - */ - StreamTablesResponse.create = function create(properties) { - return new StreamTablesResponse(properties); - }; - - /** - * Encodes the specified StreamTablesResponse message. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. - * @function encode - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {binlogdata.IStreamTablesResponse} message StreamTablesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamTablesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.binlog_transaction != null && Object.hasOwnProperty.call(message, "binlog_transaction")) - $root.binlogdata.BinlogTransaction.encode(message.binlog_transaction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamTablesResponse message, length delimited. Does not implicitly {@link binlogdata.StreamTablesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {binlogdata.IStreamTablesResponse} message StreamTablesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamTablesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StreamTablesResponse message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamTablesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.StreamTablesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.binlog_transaction = $root.binlogdata.BinlogTransaction.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamTablesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamTablesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamTablesResponse message. - * @function verify - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamTablesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) { - var error = $root.binlogdata.BinlogTransaction.verify(message.binlog_transaction); - if (error) - return "binlog_transaction." + error; - } - return null; - }; - - /** - * Creates a StreamTablesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.StreamTablesResponse} StreamTablesResponse - */ - StreamTablesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.StreamTablesResponse) - return object; - var message = new $root.binlogdata.StreamTablesResponse(); - if (object.binlog_transaction != null) { - if (typeof object.binlog_transaction !== "object") - throw TypeError(".binlogdata.StreamTablesResponse.binlog_transaction: object expected"); - message.binlog_transaction = $root.binlogdata.BinlogTransaction.fromObject(object.binlog_transaction); - } - return message; - }; - - /** - * Creates a plain object from a StreamTablesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.StreamTablesResponse - * @static - * @param {binlogdata.StreamTablesResponse} message StreamTablesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamTablesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.binlog_transaction = null; - if (message.binlog_transaction != null && message.hasOwnProperty("binlog_transaction")) - object.binlog_transaction = $root.binlogdata.BinlogTransaction.toObject(message.binlog_transaction, options); - return object; - }; - - /** - * Converts this StreamTablesResponse to JSON. - * @function toJSON - * @memberof binlogdata.StreamTablesResponse - * @instance - * @returns {Object.} JSON object - */ - StreamTablesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StreamTablesResponse; - })(); - - binlogdata.Rule = (function() { - - /** - * Properties of a Rule. - * @memberof binlogdata - * @interface IRule - * @property {string|null} [match] Rule match - * @property {string|null} [filter] Rule filter - */ - - /** - * Constructs a new Rule. - * @memberof binlogdata - * @classdesc Represents a Rule. - * @implements IRule - * @constructor - * @param {binlogdata.IRule=} [properties] Properties to set - */ - function Rule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Rule match. - * @member {string} match - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.match = ""; - - /** - * Rule filter. - * @member {string} filter - * @memberof binlogdata.Rule - * @instance - */ - Rule.prototype.filter = ""; - - /** - * Creates a new Rule instance using the specified properties. - * @function create - * @memberof binlogdata.Rule - * @static - * @param {binlogdata.IRule=} [properties] Properties to set - * @returns {binlogdata.Rule} Rule instance - */ - Rule.create = function create(properties) { - return new Rule(properties); - }; - - /** - * Encodes the specified Rule message. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. - * @function encode - * @memberof binlogdata.Rule - * @static - * @param {binlogdata.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.match != null && Object.hasOwnProperty.call(message, "match")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.match); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - return writer; - }; - - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link binlogdata.Rule.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.Rule - * @static - * @param {binlogdata.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Rule message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Rule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.match = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Rule message. - * @function verify - * @memberof binlogdata.Rule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Rule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.match != null && message.hasOwnProperty("match")) - if (!$util.isString(message.match)) - return "match: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.Rule - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.Rule} Rule - */ - Rule.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Rule) - return object; - var message = new $root.binlogdata.Rule(); - if (object.match != null) - message.match = String(object.match); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.Rule - * @static - * @param {binlogdata.Rule} message Rule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Rule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.match = ""; - object.filter = ""; - } - if (message.match != null && message.hasOwnProperty("match")) - object.match = message.match; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this Rule to JSON. - * @function toJSON - * @memberof binlogdata.Rule - * @instance - * @returns {Object.} JSON object - */ - Rule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Rule; - })(); - - binlogdata.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof binlogdata - * @interface IFilter - * @property {Array.|null} [rules] Filter rules - * @property {binlogdata.Filter.FieldEventMode|null} [fieldEventMode] Filter fieldEventMode - */ - - /** - * Constructs a new Filter. - * @memberof binlogdata - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {binlogdata.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Filter rules. - * @member {Array.} rules - * @memberof binlogdata.Filter - * @instance - */ - Filter.prototype.rules = $util.emptyArray; - - /** - * Filter fieldEventMode. - * @member {binlogdata.Filter.FieldEventMode} fieldEventMode - * @memberof binlogdata.Filter - * @instance - */ - Filter.prototype.fieldEventMode = 0; - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof binlogdata.Filter - * @static - * @param {binlogdata.IFilter=} [properties] Properties to set - * @returns {binlogdata.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. - * @function encode - * @memberof binlogdata.Filter - * @static - * @param {binlogdata.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.binlogdata.Rule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fieldEventMode != null && Object.hasOwnProperty.call(message, "fieldEventMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fieldEventMode); - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link binlogdata.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.Filter - * @static - * @param {binlogdata.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.binlogdata.Rule.decode(reader, reader.uint32())); - break; - case 2: - message.fieldEventMode = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof binlogdata.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.binlogdata.Rule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fieldEventMode != null && message.hasOwnProperty("fieldEventMode")) - switch (message.fieldEventMode) { - default: - return "fieldEventMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.Filter - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Filter) - return object; - var message = new $root.binlogdata.Filter(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".binlogdata.Filter.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".binlogdata.Filter.rules: object expected"); - message.rules[i] = $root.binlogdata.Rule.fromObject(object.rules[i]); - } - } - switch (object.fieldEventMode) { - case "ERR_ON_MISMATCH": - case 0: - message.fieldEventMode = 0; - break; - case "BEST_EFFORT": - case 1: - message.fieldEventMode = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.Filter - * @static - * @param {binlogdata.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fieldEventMode = options.enums === String ? "ERR_ON_MISMATCH" : 0; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.binlogdata.Rule.toObject(message.rules[j], options); - } - if (message.fieldEventMode != null && message.hasOwnProperty("fieldEventMode")) - object.fieldEventMode = options.enums === String ? $root.binlogdata.Filter.FieldEventMode[message.fieldEventMode] : message.fieldEventMode; - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof binlogdata.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * FieldEventMode enum. - * @name binlogdata.Filter.FieldEventMode - * @enum {number} - * @property {number} ERR_ON_MISMATCH=0 ERR_ON_MISMATCH value - * @property {number} BEST_EFFORT=1 BEST_EFFORT value - */ - Filter.FieldEventMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERR_ON_MISMATCH"] = 0; - values[valuesById[1] = "BEST_EFFORT"] = 1; - return values; - })(); - - return Filter; - })(); - - /** - * OnDDLAction enum. - * @name binlogdata.OnDDLAction - * @enum {number} - * @property {number} IGNORE=0 IGNORE value - * @property {number} STOP=1 STOP value - * @property {number} EXEC=2 EXEC value - * @property {number} EXEC_IGNORE=3 EXEC_IGNORE value - */ - binlogdata.OnDDLAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IGNORE"] = 0; - values[valuesById[1] = "STOP"] = 1; - values[valuesById[2] = "EXEC"] = 2; - values[valuesById[3] = "EXEC_IGNORE"] = 3; - return values; - })(); - - binlogdata.BinlogSource = (function() { - - /** - * Properties of a BinlogSource. - * @memberof binlogdata - * @interface IBinlogSource - * @property {string|null} [keyspace] BinlogSource keyspace - * @property {string|null} [shard] BinlogSource shard - * @property {topodata.TabletType|null} [tablet_type] BinlogSource tablet_type - * @property {topodata.IKeyRange|null} [key_range] BinlogSource key_range - * @property {Array.|null} [tables] BinlogSource tables - * @property {binlogdata.IFilter|null} [filter] BinlogSource filter - * @property {binlogdata.OnDDLAction|null} [on_ddl] BinlogSource on_ddl - * @property {string|null} [external_mysql] BinlogSource external_mysql - * @property {boolean|null} [stop_after_copy] BinlogSource stop_after_copy - * @property {string|null} [external_cluster] BinlogSource external_cluster - */ - - /** - * Constructs a new BinlogSource. - * @memberof binlogdata - * @classdesc Represents a BinlogSource. - * @implements IBinlogSource - * @constructor - * @param {binlogdata.IBinlogSource=} [properties] Properties to set - */ - function BinlogSource(properties) { - this.tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BinlogSource keyspace. - * @member {string} keyspace - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.keyspace = ""; - - /** - * BinlogSource shard. - * @member {string} shard - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.shard = ""; - - /** - * BinlogSource tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.tablet_type = 0; - - /** - * BinlogSource key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.key_range = null; - - /** - * BinlogSource tables. - * @member {Array.} tables - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.tables = $util.emptyArray; - - /** - * BinlogSource filter. - * @member {binlogdata.IFilter|null|undefined} filter - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.filter = null; - - /** - * BinlogSource on_ddl. - * @member {binlogdata.OnDDLAction} on_ddl - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.on_ddl = 0; - - /** - * BinlogSource external_mysql. - * @member {string} external_mysql - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.external_mysql = ""; - - /** - * BinlogSource stop_after_copy. - * @member {boolean} stop_after_copy - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.stop_after_copy = false; - - /** - * BinlogSource external_cluster. - * @member {string} external_cluster - * @memberof binlogdata.BinlogSource - * @instance - */ - BinlogSource.prototype.external_cluster = ""; - - /** - * Creates a new BinlogSource instance using the specified properties. - * @function create - * @memberof binlogdata.BinlogSource - * @static - * @param {binlogdata.IBinlogSource=} [properties] Properties to set - * @returns {binlogdata.BinlogSource} BinlogSource instance - */ - BinlogSource.create = function create(properties) { - return new BinlogSource(properties); - }; - - /** - * Encodes the specified BinlogSource message. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. - * @function encode - * @memberof binlogdata.BinlogSource - * @static - * @param {binlogdata.IBinlogSource} message BinlogSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinlogSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tablet_type); - if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) - $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.tables[i]); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.binlogdata.Filter.encode(message.filter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.on_ddl != null && Object.hasOwnProperty.call(message, "on_ddl")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.on_ddl); - if (message.external_mysql != null && Object.hasOwnProperty.call(message, "external_mysql")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.external_mysql); - if (message.stop_after_copy != null && Object.hasOwnProperty.call(message, "stop_after_copy")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.stop_after_copy); - if (message.external_cluster != null && Object.hasOwnProperty.call(message, "external_cluster")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.external_cluster); - return writer; - }; - - /** - * Encodes the specified BinlogSource message, length delimited. Does not implicitly {@link binlogdata.BinlogSource.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.BinlogSource - * @static - * @param {binlogdata.IBinlogSource} message BinlogSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BinlogSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BinlogSource message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.BinlogSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.BinlogSource} BinlogSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinlogSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.BinlogSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.tablet_type = reader.int32(); - break; - case 4: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 6: - message.filter = $root.binlogdata.Filter.decode(reader, reader.uint32()); - break; - case 7: - message.on_ddl = reader.int32(); - break; - case 8: - message.external_mysql = reader.string(); - break; - case 9: - message.stop_after_copy = reader.bool(); - break; - case 10: - message.external_cluster = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BinlogSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.BinlogSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.BinlogSource} BinlogSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BinlogSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BinlogSource message. - * @function verify - * @memberof binlogdata.BinlogSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BinlogSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - switch (message.tablet_type) { - default: - return "tablet_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.key_range != null && message.hasOwnProperty("key_range")) { - var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) - return "key_range." + error; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.binlogdata.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) - switch (message.on_ddl) { - default: - return "on_ddl: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.external_mysql != null && message.hasOwnProperty("external_mysql")) - if (!$util.isString(message.external_mysql)) - return "external_mysql: string expected"; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - if (typeof message.stop_after_copy !== "boolean") - return "stop_after_copy: boolean expected"; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - if (!$util.isString(message.external_cluster)) - return "external_cluster: string expected"; - return null; - }; - - /** - * Creates a BinlogSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.BinlogSource - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.BinlogSource} BinlogSource - */ - BinlogSource.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.BinlogSource) - return object; - var message = new $root.binlogdata.BinlogSource(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - switch (object.tablet_type) { - case "UNKNOWN": - case 0: - message.tablet_type = 0; - break; - case "MASTER": - case 1: - message.tablet_type = 1; - break; - case "REPLICA": - case 2: - message.tablet_type = 2; - break; - case "RDONLY": - case 3: - message.tablet_type = 3; - break; - case "BATCH": - case 3: - message.tablet_type = 3; - break; - case "SPARE": - case 4: - message.tablet_type = 4; - break; - case "EXPERIMENTAL": - case 5: - message.tablet_type = 5; - break; - case "BACKUP": - case 6: - message.tablet_type = 6; - break; - case "RESTORE": - case 7: - message.tablet_type = 7; - break; - case "DRAINED": - case 8: - message.tablet_type = 8; - break; - } - if (object.key_range != null) { - if (typeof object.key_range !== "object") - throw TypeError(".binlogdata.BinlogSource.key_range: object expected"); - message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.BinlogSource.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".binlogdata.BinlogSource.filter: object expected"); - message.filter = $root.binlogdata.Filter.fromObject(object.filter); - } - switch (object.on_ddl) { - case "IGNORE": - case 0: - message.on_ddl = 0; - break; - case "STOP": - case 1: - message.on_ddl = 1; - break; - case "EXEC": - case 2: - message.on_ddl = 2; - break; - case "EXEC_IGNORE": - case 3: - message.on_ddl = 3; - break; - } - if (object.external_mysql != null) - message.external_mysql = String(object.external_mysql); - if (object.stop_after_copy != null) - message.stop_after_copy = Boolean(object.stop_after_copy); - if (object.external_cluster != null) - message.external_cluster = String(object.external_cluster); - return message; - }; - - /** - * Creates a plain object from a BinlogSource message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.BinlogSource - * @static - * @param {binlogdata.BinlogSource} message BinlogSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BinlogSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tables = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.tablet_type = options.enums === String ? "UNKNOWN" : 0; - object.key_range = null; - object.filter = null; - object.on_ddl = options.enums === String ? "IGNORE" : 0; - object.external_mysql = ""; - object.stop_after_copy = false; - object.external_cluster = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) - object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.key_range != null && message.hasOwnProperty("key_range")) - object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.binlogdata.Filter.toObject(message.filter, options); - if (message.on_ddl != null && message.hasOwnProperty("on_ddl")) - object.on_ddl = options.enums === String ? $root.binlogdata.OnDDLAction[message.on_ddl] : message.on_ddl; - if (message.external_mysql != null && message.hasOwnProperty("external_mysql")) - object.external_mysql = message.external_mysql; - if (message.stop_after_copy != null && message.hasOwnProperty("stop_after_copy")) - object.stop_after_copy = message.stop_after_copy; - if (message.external_cluster != null && message.hasOwnProperty("external_cluster")) - object.external_cluster = message.external_cluster; - return object; - }; - - /** - * Converts this BinlogSource to JSON. - * @function toJSON - * @memberof binlogdata.BinlogSource - * @instance - * @returns {Object.} JSON object - */ - BinlogSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BinlogSource; - })(); - - /** - * VEventType enum. - * @name binlogdata.VEventType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} GTID=1 GTID value - * @property {number} BEGIN=2 BEGIN value - * @property {number} COMMIT=3 COMMIT value - * @property {number} ROLLBACK=4 ROLLBACK value - * @property {number} DDL=5 DDL value - * @property {number} INSERT=6 INSERT value - * @property {number} REPLACE=7 REPLACE value - * @property {number} UPDATE=8 UPDATE value - * @property {number} DELETE=9 DELETE value - * @property {number} SET=10 SET value - * @property {number} OTHER=11 OTHER value - * @property {number} ROW=12 ROW value - * @property {number} FIELD=13 FIELD value - * @property {number} HEARTBEAT=14 HEARTBEAT value - * @property {number} VGTID=15 VGTID value - * @property {number} JOURNAL=16 JOURNAL value - * @property {number} VERSION=17 VERSION value - * @property {number} LASTPK=18 LASTPK value - * @property {number} SAVEPOINT=19 SAVEPOINT value - */ - binlogdata.VEventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "GTID"] = 1; - values[valuesById[2] = "BEGIN"] = 2; - values[valuesById[3] = "COMMIT"] = 3; - values[valuesById[4] = "ROLLBACK"] = 4; - values[valuesById[5] = "DDL"] = 5; - values[valuesById[6] = "INSERT"] = 6; - values[valuesById[7] = "REPLACE"] = 7; - values[valuesById[8] = "UPDATE"] = 8; - values[valuesById[9] = "DELETE"] = 9; - values[valuesById[10] = "SET"] = 10; - values[valuesById[11] = "OTHER"] = 11; - values[valuesById[12] = "ROW"] = 12; - values[valuesById[13] = "FIELD"] = 13; - values[valuesById[14] = "HEARTBEAT"] = 14; - values[valuesById[15] = "VGTID"] = 15; - values[valuesById[16] = "JOURNAL"] = 16; - values[valuesById[17] = "VERSION"] = 17; - values[valuesById[18] = "LASTPK"] = 18; - values[valuesById[19] = "SAVEPOINT"] = 19; - return values; - })(); - - binlogdata.RowChange = (function() { - - /** - * Properties of a RowChange. - * @memberof binlogdata - * @interface IRowChange - * @property {query.IRow|null} [before] RowChange before - * @property {query.IRow|null} [after] RowChange after - */ - - /** - * Constructs a new RowChange. - * @memberof binlogdata - * @classdesc Represents a RowChange. - * @implements IRowChange - * @constructor - * @param {binlogdata.IRowChange=} [properties] Properties to set - */ - function RowChange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RowChange before. - * @member {query.IRow|null|undefined} before - * @memberof binlogdata.RowChange - * @instance - */ - RowChange.prototype.before = null; - - /** - * RowChange after. - * @member {query.IRow|null|undefined} after - * @memberof binlogdata.RowChange - * @instance - */ - RowChange.prototype.after = null; - - /** - * Creates a new RowChange instance using the specified properties. - * @function create - * @memberof binlogdata.RowChange - * @static - * @param {binlogdata.IRowChange=} [properties] Properties to set - * @returns {binlogdata.RowChange} RowChange instance - */ - RowChange.create = function create(properties) { - return new RowChange(properties); - }; - - /** - * Encodes the specified RowChange message. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. - * @function encode - * @memberof binlogdata.RowChange - * @static - * @param {binlogdata.IRowChange} message RowChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RowChange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.before != null && Object.hasOwnProperty.call(message, "before")) - $root.query.Row.encode(message.before, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.after != null && Object.hasOwnProperty.call(message, "after")) - $root.query.Row.encode(message.after, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RowChange message, length delimited. Does not implicitly {@link binlogdata.RowChange.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.RowChange - * @static - * @param {binlogdata.IRowChange} message RowChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RowChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RowChange message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.RowChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.RowChange} RowChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RowChange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.RowChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.before = $root.query.Row.decode(reader, reader.uint32()); - break; - case 2: - message.after = $root.query.Row.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RowChange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.RowChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.RowChange} RowChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RowChange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RowChange message. - * @function verify - * @memberof binlogdata.RowChange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RowChange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.before != null && message.hasOwnProperty("before")) { - var error = $root.query.Row.verify(message.before); - if (error) - return "before." + error; - } - if (message.after != null && message.hasOwnProperty("after")) { - var error = $root.query.Row.verify(message.after); - if (error) - return "after." + error; - } - return null; - }; - - /** - * Creates a RowChange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.RowChange - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.RowChange} RowChange - */ - RowChange.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.RowChange) - return object; - var message = new $root.binlogdata.RowChange(); - if (object.before != null) { - if (typeof object.before !== "object") - throw TypeError(".binlogdata.RowChange.before: object expected"); - message.before = $root.query.Row.fromObject(object.before); - } - if (object.after != null) { - if (typeof object.after !== "object") - throw TypeError(".binlogdata.RowChange.after: object expected"); - message.after = $root.query.Row.fromObject(object.after); - } - return message; - }; - - /** - * Creates a plain object from a RowChange message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.RowChange - * @static - * @param {binlogdata.RowChange} message RowChange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RowChange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.before = null; - object.after = null; - } - if (message.before != null && message.hasOwnProperty("before")) - object.before = $root.query.Row.toObject(message.before, options); - if (message.after != null && message.hasOwnProperty("after")) - object.after = $root.query.Row.toObject(message.after, options); - return object; - }; - - /** - * Converts this RowChange to JSON. - * @function toJSON - * @memberof binlogdata.RowChange - * @instance - * @returns {Object.} JSON object - */ - RowChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RowChange; - })(); - - binlogdata.RowEvent = (function() { - - /** - * Properties of a RowEvent. - * @memberof binlogdata - * @interface IRowEvent - * @property {string|null} [table_name] RowEvent table_name - * @property {Array.|null} [row_changes] RowEvent row_changes - */ - - /** - * Constructs a new RowEvent. - * @memberof binlogdata - * @classdesc Represents a RowEvent. - * @implements IRowEvent - * @constructor - * @param {binlogdata.IRowEvent=} [properties] Properties to set - */ - function RowEvent(properties) { - this.row_changes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RowEvent table_name. - * @member {string} table_name - * @memberof binlogdata.RowEvent - * @instance - */ - RowEvent.prototype.table_name = ""; - - /** - * RowEvent row_changes. - * @member {Array.} row_changes - * @memberof binlogdata.RowEvent - * @instance - */ - RowEvent.prototype.row_changes = $util.emptyArray; - - /** - * Creates a new RowEvent instance using the specified properties. - * @function create - * @memberof binlogdata.RowEvent - * @static - * @param {binlogdata.IRowEvent=} [properties] Properties to set - * @returns {binlogdata.RowEvent} RowEvent instance - */ - RowEvent.create = function create(properties) { - return new RowEvent(properties); - }; - - /** - * Encodes the specified RowEvent message. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. - * @function encode - * @memberof binlogdata.RowEvent - * @static - * @param {binlogdata.IRowEvent} message RowEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RowEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); - if (message.row_changes != null && message.row_changes.length) - for (var i = 0; i < message.row_changes.length; ++i) - $root.binlogdata.RowChange.encode(message.row_changes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RowEvent message, length delimited. Does not implicitly {@link binlogdata.RowEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.RowEvent - * @static - * @param {binlogdata.IRowEvent} message RowEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RowEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RowEvent message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.RowEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.RowEvent} RowEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RowEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.RowEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table_name = reader.string(); - break; - case 2: - if (!(message.row_changes && message.row_changes.length)) - message.row_changes = []; - message.row_changes.push($root.binlogdata.RowChange.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RowEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.RowEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.RowEvent} RowEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RowEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RowEvent message. - * @function verify - * @memberof binlogdata.RowEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RowEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.row_changes != null && message.hasOwnProperty("row_changes")) { - if (!Array.isArray(message.row_changes)) - return "row_changes: array expected"; - for (var i = 0; i < message.row_changes.length; ++i) { - var error = $root.binlogdata.RowChange.verify(message.row_changes[i]); - if (error) - return "row_changes." + error; - } - } - return null; - }; - - /** - * Creates a RowEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.RowEvent - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.RowEvent} RowEvent - */ - RowEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.RowEvent) - return object; - var message = new $root.binlogdata.RowEvent(); - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.row_changes) { - if (!Array.isArray(object.row_changes)) - throw TypeError(".binlogdata.RowEvent.row_changes: array expected"); - message.row_changes = []; - for (var i = 0; i < object.row_changes.length; ++i) { - if (typeof object.row_changes[i] !== "object") - throw TypeError(".binlogdata.RowEvent.row_changes: object expected"); - message.row_changes[i] = $root.binlogdata.RowChange.fromObject(object.row_changes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RowEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.RowEvent - * @static - * @param {binlogdata.RowEvent} message RowEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RowEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.row_changes = []; - if (options.defaults) - object.table_name = ""; - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.row_changes && message.row_changes.length) { - object.row_changes = []; - for (var j = 0; j < message.row_changes.length; ++j) - object.row_changes[j] = $root.binlogdata.RowChange.toObject(message.row_changes[j], options); - } - return object; - }; - - /** - * Converts this RowEvent to JSON. - * @function toJSON - * @memberof binlogdata.RowEvent - * @instance - * @returns {Object.} JSON object - */ - RowEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RowEvent; - })(); - - binlogdata.FieldEvent = (function() { - - /** - * Properties of a FieldEvent. - * @memberof binlogdata - * @interface IFieldEvent - * @property {string|null} [table_name] FieldEvent table_name - * @property {Array.|null} [fields] FieldEvent fields - */ - - /** - * Constructs a new FieldEvent. - * @memberof binlogdata - * @classdesc Represents a FieldEvent. - * @implements IFieldEvent - * @constructor - * @param {binlogdata.IFieldEvent=} [properties] Properties to set - */ - function FieldEvent(properties) { - this.fields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldEvent table_name. - * @member {string} table_name - * @memberof binlogdata.FieldEvent - * @instance - */ - FieldEvent.prototype.table_name = ""; - - /** - * FieldEvent fields. - * @member {Array.} fields - * @memberof binlogdata.FieldEvent - * @instance - */ - FieldEvent.prototype.fields = $util.emptyArray; - - /** - * Creates a new FieldEvent instance using the specified properties. - * @function create - * @memberof binlogdata.FieldEvent - * @static - * @param {binlogdata.IFieldEvent=} [properties] Properties to set - * @returns {binlogdata.FieldEvent} FieldEvent instance - */ - FieldEvent.create = function create(properties) { - return new FieldEvent(properties); - }; - - /** - * Encodes the specified FieldEvent message. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. - * @function encode - * @memberof binlogdata.FieldEvent - * @static - * @param {binlogdata.IFieldEvent} message FieldEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table_name != null && Object.hasOwnProperty.call(message, "table_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table_name); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldEvent message, length delimited. Does not implicitly {@link binlogdata.FieldEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.FieldEvent - * @static - * @param {binlogdata.IFieldEvent} message FieldEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldEvent message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.FieldEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.FieldEvent} FieldEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.FieldEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.table_name = reader.string(); - break; - case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.FieldEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.FieldEvent} FieldEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldEvent message. - * @function verify - * @memberof binlogdata.FieldEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table_name != null && message.hasOwnProperty("table_name")) - if (!$util.isString(message.table_name)) - return "table_name: string expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a FieldEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.FieldEvent - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.FieldEvent} FieldEvent - */ - FieldEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.FieldEvent) - return object; - var message = new $root.binlogdata.FieldEvent(); - if (object.table_name != null) - message.table_name = String(object.table_name); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.FieldEvent.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.FieldEvent.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FieldEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.FieldEvent - * @static - * @param {binlogdata.FieldEvent} message FieldEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (options.defaults) - object.table_name = ""; - if (message.table_name != null && message.hasOwnProperty("table_name")) - object.table_name = message.table_name; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - return object; - }; - - /** - * Converts this FieldEvent to JSON. - * @function toJSON - * @memberof binlogdata.FieldEvent - * @instance - * @returns {Object.} JSON object - */ - FieldEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FieldEvent; - })(); - - binlogdata.ShardGtid = (function() { - - /** - * Properties of a ShardGtid. - * @memberof binlogdata - * @interface IShardGtid - * @property {string|null} [keyspace] ShardGtid keyspace - * @property {string|null} [shard] ShardGtid shard - * @property {string|null} [gtid] ShardGtid gtid - * @property {Array.|null} [table_p_ks] ShardGtid table_p_ks - */ - - /** - * Constructs a new ShardGtid. - * @memberof binlogdata - * @classdesc Represents a ShardGtid. - * @implements IShardGtid - * @constructor - * @param {binlogdata.IShardGtid=} [properties] Properties to set - */ - function ShardGtid(properties) { - this.table_p_ks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ShardGtid keyspace. - * @member {string} keyspace - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.keyspace = ""; - - /** - * ShardGtid shard. - * @member {string} shard - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.shard = ""; - - /** - * ShardGtid gtid. - * @member {string} gtid - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.gtid = ""; - - /** - * ShardGtid table_p_ks. - * @member {Array.} table_p_ks - * @memberof binlogdata.ShardGtid - * @instance - */ - ShardGtid.prototype.table_p_ks = $util.emptyArray; - - /** - * Creates a new ShardGtid instance using the specified properties. - * @function create - * @memberof binlogdata.ShardGtid - * @static - * @param {binlogdata.IShardGtid=} [properties] Properties to set - * @returns {binlogdata.ShardGtid} ShardGtid instance - */ - ShardGtid.create = function create(properties) { - return new ShardGtid(properties); - }; - - /** - * Encodes the specified ShardGtid message. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. - * @function encode - * @memberof binlogdata.ShardGtid - * @static - * @param {binlogdata.IShardGtid} message ShardGtid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardGtid.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.table_p_ks != null && message.table_p_ks.length) - for (var i = 0; i < message.table_p_ks.length; ++i) - $root.binlogdata.TableLastPK.encode(message.table_p_ks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ShardGtid message, length delimited. Does not implicitly {@link binlogdata.ShardGtid.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.ShardGtid - * @static - * @param {binlogdata.IShardGtid} message ShardGtid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardGtid.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardGtid message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.ShardGtid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.ShardGtid} ShardGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardGtid.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.ShardGtid(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - case 3: - message.gtid = reader.string(); - break; - case 4: - if (!(message.table_p_ks && message.table_p_ks.length)) - message.table_p_ks = []; - message.table_p_ks.push($root.binlogdata.TableLastPK.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardGtid message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.ShardGtid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.ShardGtid} ShardGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardGtid.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardGtid message. - * @function verify - * @memberof binlogdata.ShardGtid - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardGtid.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.table_p_ks != null && message.hasOwnProperty("table_p_ks")) { - if (!Array.isArray(message.table_p_ks)) - return "table_p_ks: array expected"; - for (var i = 0; i < message.table_p_ks.length; ++i) { - var error = $root.binlogdata.TableLastPK.verify(message.table_p_ks[i]); - if (error) - return "table_p_ks." + error; - } - } - return null; - }; - - /** - * Creates a ShardGtid message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.ShardGtid - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.ShardGtid} ShardGtid - */ - ShardGtid.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.ShardGtid) - return object; - var message = new $root.binlogdata.ShardGtid(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.table_p_ks) { - if (!Array.isArray(object.table_p_ks)) - throw TypeError(".binlogdata.ShardGtid.table_p_ks: array expected"); - message.table_p_ks = []; - for (var i = 0; i < object.table_p_ks.length; ++i) { - if (typeof object.table_p_ks[i] !== "object") - throw TypeError(".binlogdata.ShardGtid.table_p_ks: object expected"); - message.table_p_ks[i] = $root.binlogdata.TableLastPK.fromObject(object.table_p_ks[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ShardGtid message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.ShardGtid - * @static - * @param {binlogdata.ShardGtid} message ShardGtid - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardGtid.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.table_p_ks = []; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - object.gtid = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.table_p_ks && message.table_p_ks.length) { - object.table_p_ks = []; - for (var j = 0; j < message.table_p_ks.length; ++j) - object.table_p_ks[j] = $root.binlogdata.TableLastPK.toObject(message.table_p_ks[j], options); - } - return object; - }; - - /** - * Converts this ShardGtid to JSON. - * @function toJSON - * @memberof binlogdata.ShardGtid - * @instance - * @returns {Object.} JSON object - */ - ShardGtid.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ShardGtid; - })(); - - binlogdata.VGtid = (function() { - - /** - * Properties of a VGtid. - * @memberof binlogdata - * @interface IVGtid - * @property {Array.|null} [shard_gtids] VGtid shard_gtids - */ - - /** - * Constructs a new VGtid. - * @memberof binlogdata - * @classdesc Represents a VGtid. - * @implements IVGtid - * @constructor - * @param {binlogdata.IVGtid=} [properties] Properties to set - */ - function VGtid(properties) { - this.shard_gtids = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VGtid shard_gtids. - * @member {Array.} shard_gtids - * @memberof binlogdata.VGtid - * @instance - */ - VGtid.prototype.shard_gtids = $util.emptyArray; - - /** - * Creates a new VGtid instance using the specified properties. - * @function create - * @memberof binlogdata.VGtid - * @static - * @param {binlogdata.IVGtid=} [properties] Properties to set - * @returns {binlogdata.VGtid} VGtid instance - */ - VGtid.create = function create(properties) { - return new VGtid(properties); - }; - - /** - * Encodes the specified VGtid message. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. - * @function encode - * @memberof binlogdata.VGtid - * @static - * @param {binlogdata.IVGtid} message VGtid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VGtid.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shard_gtids != null && message.shard_gtids.length) - for (var i = 0; i < message.shard_gtids.length; ++i) - $root.binlogdata.ShardGtid.encode(message.shard_gtids[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VGtid message, length delimited. Does not implicitly {@link binlogdata.VGtid.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.VGtid - * @static - * @param {binlogdata.IVGtid} message VGtid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VGtid.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VGtid message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.VGtid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VGtid} VGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VGtid.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VGtid(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.shard_gtids && message.shard_gtids.length)) - message.shard_gtids = []; - message.shard_gtids.push($root.binlogdata.ShardGtid.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VGtid message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.VGtid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VGtid} VGtid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VGtid.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VGtid message. - * @function verify - * @memberof binlogdata.VGtid - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VGtid.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shard_gtids != null && message.hasOwnProperty("shard_gtids")) { - if (!Array.isArray(message.shard_gtids)) - return "shard_gtids: array expected"; - for (var i = 0; i < message.shard_gtids.length; ++i) { - var error = $root.binlogdata.ShardGtid.verify(message.shard_gtids[i]); - if (error) - return "shard_gtids." + error; - } - } - return null; - }; - - /** - * Creates a VGtid message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.VGtid - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.VGtid} VGtid - */ - VGtid.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VGtid) - return object; - var message = new $root.binlogdata.VGtid(); - if (object.shard_gtids) { - if (!Array.isArray(object.shard_gtids)) - throw TypeError(".binlogdata.VGtid.shard_gtids: array expected"); - message.shard_gtids = []; - for (var i = 0; i < object.shard_gtids.length; ++i) { - if (typeof object.shard_gtids[i] !== "object") - throw TypeError(".binlogdata.VGtid.shard_gtids: object expected"); - message.shard_gtids[i] = $root.binlogdata.ShardGtid.fromObject(object.shard_gtids[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a VGtid message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.VGtid - * @static - * @param {binlogdata.VGtid} message VGtid - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VGtid.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shard_gtids = []; - if (message.shard_gtids && message.shard_gtids.length) { - object.shard_gtids = []; - for (var j = 0; j < message.shard_gtids.length; ++j) - object.shard_gtids[j] = $root.binlogdata.ShardGtid.toObject(message.shard_gtids[j], options); - } - return object; - }; - - /** - * Converts this VGtid to JSON. - * @function toJSON - * @memberof binlogdata.VGtid - * @instance - * @returns {Object.} JSON object - */ - VGtid.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VGtid; - })(); - - binlogdata.KeyspaceShard = (function() { - - /** - * Properties of a KeyspaceShard. - * @memberof binlogdata - * @interface IKeyspaceShard - * @property {string|null} [keyspace] KeyspaceShard keyspace - * @property {string|null} [shard] KeyspaceShard shard - */ - - /** - * Constructs a new KeyspaceShard. - * @memberof binlogdata - * @classdesc Represents a KeyspaceShard. - * @implements IKeyspaceShard - * @constructor - * @param {binlogdata.IKeyspaceShard=} [properties] Properties to set - */ - function KeyspaceShard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KeyspaceShard keyspace. - * @member {string} keyspace - * @memberof binlogdata.KeyspaceShard - * @instance - */ - KeyspaceShard.prototype.keyspace = ""; - - /** - * KeyspaceShard shard. - * @member {string} shard - * @memberof binlogdata.KeyspaceShard - * @instance - */ - KeyspaceShard.prototype.shard = ""; - - /** - * Creates a new KeyspaceShard instance using the specified properties. - * @function create - * @memberof binlogdata.KeyspaceShard - * @static - * @param {binlogdata.IKeyspaceShard=} [properties] Properties to set - * @returns {binlogdata.KeyspaceShard} KeyspaceShard instance - */ - KeyspaceShard.create = function create(properties) { - return new KeyspaceShard(properties); - }; - - /** - * Encodes the specified KeyspaceShard message. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. - * @function encode - * @memberof binlogdata.KeyspaceShard - * @static - * @param {binlogdata.IKeyspaceShard} message KeyspaceShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyspaceShard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyspace); - if (message.shard != null && Object.hasOwnProperty.call(message, "shard")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shard); - return writer; - }; - - /** - * Encodes the specified KeyspaceShard message, length delimited. Does not implicitly {@link binlogdata.KeyspaceShard.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.KeyspaceShard - * @static - * @param {binlogdata.IKeyspaceShard} message KeyspaceShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyspaceShard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KeyspaceShard message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.KeyspaceShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.KeyspaceShard} KeyspaceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyspaceShard.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.KeyspaceShard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyspace = reader.string(); - break; - case 2: - message.shard = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KeyspaceShard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.KeyspaceShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.KeyspaceShard} KeyspaceShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyspaceShard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KeyspaceShard message. - * @function verify - * @memberof binlogdata.KeyspaceShard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyspaceShard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - if (!$util.isString(message.keyspace)) - return "keyspace: string expected"; - if (message.shard != null && message.hasOwnProperty("shard")) - if (!$util.isString(message.shard)) - return "shard: string expected"; - return null; - }; - - /** - * Creates a KeyspaceShard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.KeyspaceShard - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.KeyspaceShard} KeyspaceShard - */ - KeyspaceShard.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.KeyspaceShard) - return object; - var message = new $root.binlogdata.KeyspaceShard(); - if (object.keyspace != null) - message.keyspace = String(object.keyspace); - if (object.shard != null) - message.shard = String(object.shard); - return message; - }; - - /** - * Creates a plain object from a KeyspaceShard message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.KeyspaceShard - * @static - * @param {binlogdata.KeyspaceShard} message KeyspaceShard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyspaceShard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyspace = ""; - object.shard = ""; - } - if (message.keyspace != null && message.hasOwnProperty("keyspace")) - object.keyspace = message.keyspace; - if (message.shard != null && message.hasOwnProperty("shard")) - object.shard = message.shard; - return object; - }; - - /** - * Converts this KeyspaceShard to JSON. - * @function toJSON - * @memberof binlogdata.KeyspaceShard - * @instance - * @returns {Object.} JSON object - */ - KeyspaceShard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KeyspaceShard; - })(); - - /** - * MigrationType enum. - * @name binlogdata.MigrationType - * @enum {number} - * @property {number} TABLES=0 TABLES value - * @property {number} SHARDS=1 SHARDS value - */ - binlogdata.MigrationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLES"] = 0; - values[valuesById[1] = "SHARDS"] = 1; - return values; - })(); - - binlogdata.Journal = (function() { - - /** - * Properties of a Journal. - * @memberof binlogdata - * @interface IJournal - * @property {number|Long|null} [id] Journal id - * @property {binlogdata.MigrationType|null} [migration_type] Journal migration_type - * @property {Array.|null} [tables] Journal tables - * @property {string|null} [local_position] Journal local_position - * @property {Array.|null} [shard_gtids] Journal shard_gtids - * @property {Array.|null} [participants] Journal participants - * @property {Array.|null} [source_workflows] Journal source_workflows - */ - - /** - * Constructs a new Journal. - * @memberof binlogdata - * @classdesc Represents a Journal. - * @implements IJournal - * @constructor - * @param {binlogdata.IJournal=} [properties] Properties to set - */ - function Journal(properties) { - this.tables = []; - this.shard_gtids = []; - this.participants = []; - this.source_workflows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Journal id. - * @member {number|Long} id - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Journal migration_type. - * @member {binlogdata.MigrationType} migration_type - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.migration_type = 0; - - /** - * Journal tables. - * @member {Array.} tables - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.tables = $util.emptyArray; - - /** - * Journal local_position. - * @member {string} local_position - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.local_position = ""; - - /** - * Journal shard_gtids. - * @member {Array.} shard_gtids - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.shard_gtids = $util.emptyArray; - - /** - * Journal participants. - * @member {Array.} participants - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.participants = $util.emptyArray; - - /** - * Journal source_workflows. - * @member {Array.} source_workflows - * @memberof binlogdata.Journal - * @instance - */ - Journal.prototype.source_workflows = $util.emptyArray; - - /** - * Creates a new Journal instance using the specified properties. - * @function create - * @memberof binlogdata.Journal - * @static - * @param {binlogdata.IJournal=} [properties] Properties to set - * @returns {binlogdata.Journal} Journal instance - */ - Journal.create = function create(properties) { - return new Journal(properties); - }; - - /** - * Encodes the specified Journal message. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. - * @function encode - * @memberof binlogdata.Journal - * @static - * @param {binlogdata.IJournal} message Journal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Journal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id); - if (message.migration_type != null && Object.hasOwnProperty.call(message, "migration_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.migration_type); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tables[i]); - if (message.local_position != null && Object.hasOwnProperty.call(message, "local_position")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.local_position); - if (message.shard_gtids != null && message.shard_gtids.length) - for (var i = 0; i < message.shard_gtids.length; ++i) - $root.binlogdata.ShardGtid.encode(message.shard_gtids[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.participants != null && message.participants.length) - for (var i = 0; i < message.participants.length; ++i) - $root.binlogdata.KeyspaceShard.encode(message.participants[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.source_workflows != null && message.source_workflows.length) - for (var i = 0; i < message.source_workflows.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.source_workflows[i]); - return writer; - }; - - /** - * Encodes the specified Journal message, length delimited. Does not implicitly {@link binlogdata.Journal.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.Journal - * @static - * @param {binlogdata.IJournal} message Journal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Journal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Journal message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.Journal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.Journal} Journal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Journal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.Journal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.int64(); - break; - case 2: - message.migration_type = reader.int32(); - break; - case 3: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push(reader.string()); - break; - case 4: - message.local_position = reader.string(); - break; - case 5: - if (!(message.shard_gtids && message.shard_gtids.length)) - message.shard_gtids = []; - message.shard_gtids.push($root.binlogdata.ShardGtid.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.binlogdata.KeyspaceShard.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.source_workflows && message.source_workflows.length)) - message.source_workflows = []; - message.source_workflows.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Journal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.Journal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.Journal} Journal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Journal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Journal message. - * @function verify - * @memberof binlogdata.Journal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Journal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.migration_type != null && message.hasOwnProperty("migration_type")) - switch (message.migration_type) { - default: - return "migration_type: enum value expected"; - case 0: - case 1: - break; - } - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) - if (!$util.isString(message.tables[i])) - return "tables: string[] expected"; - } - if (message.local_position != null && message.hasOwnProperty("local_position")) - if (!$util.isString(message.local_position)) - return "local_position: string expected"; - if (message.shard_gtids != null && message.hasOwnProperty("shard_gtids")) { - if (!Array.isArray(message.shard_gtids)) - return "shard_gtids: array expected"; - for (var i = 0; i < message.shard_gtids.length; ++i) { - var error = $root.binlogdata.ShardGtid.verify(message.shard_gtids[i]); - if (error) - return "shard_gtids." + error; - } - } - if (message.participants != null && message.hasOwnProperty("participants")) { - if (!Array.isArray(message.participants)) - return "participants: array expected"; - for (var i = 0; i < message.participants.length; ++i) { - var error = $root.binlogdata.KeyspaceShard.verify(message.participants[i]); - if (error) - return "participants." + error; - } - } - if (message.source_workflows != null && message.hasOwnProperty("source_workflows")) { - if (!Array.isArray(message.source_workflows)) - return "source_workflows: array expected"; - for (var i = 0; i < message.source_workflows.length; ++i) - if (!$util.isString(message.source_workflows[i])) - return "source_workflows: string[] expected"; - } - return null; - }; - - /** - * Creates a Journal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.Journal - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.Journal} Journal - */ - Journal.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.Journal) - return object; - var message = new $root.binlogdata.Journal(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = false; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); - switch (object.migration_type) { - case "TABLES": - case 0: - message.migration_type = 0; - break; - case "SHARDS": - case 1: - message.migration_type = 1; - break; - } - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.Journal.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) - message.tables[i] = String(object.tables[i]); - } - if (object.local_position != null) - message.local_position = String(object.local_position); - if (object.shard_gtids) { - if (!Array.isArray(object.shard_gtids)) - throw TypeError(".binlogdata.Journal.shard_gtids: array expected"); - message.shard_gtids = []; - for (var i = 0; i < object.shard_gtids.length; ++i) { - if (typeof object.shard_gtids[i] !== "object") - throw TypeError(".binlogdata.Journal.shard_gtids: object expected"); - message.shard_gtids[i] = $root.binlogdata.ShardGtid.fromObject(object.shard_gtids[i]); - } - } - if (object.participants) { - if (!Array.isArray(object.participants)) - throw TypeError(".binlogdata.Journal.participants: array expected"); - message.participants = []; - for (var i = 0; i < object.participants.length; ++i) { - if (typeof object.participants[i] !== "object") - throw TypeError(".binlogdata.Journal.participants: object expected"); - message.participants[i] = $root.binlogdata.KeyspaceShard.fromObject(object.participants[i]); - } - } - if (object.source_workflows) { - if (!Array.isArray(object.source_workflows)) - throw TypeError(".binlogdata.Journal.source_workflows: array expected"); - message.source_workflows = []; - for (var i = 0; i < object.source_workflows.length; ++i) - message.source_workflows[i] = String(object.source_workflows[i]); - } - return message; - }; - - /** - * Creates a plain object from a Journal message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.Journal - * @static - * @param {binlogdata.Journal} message Journal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Journal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tables = []; - object.shard_gtids = []; - object.participants = []; - object.source_workflows = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.migration_type = options.enums === String ? "TABLES" : 0; - object.local_position = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; - if (message.migration_type != null && message.hasOwnProperty("migration_type")) - object.migration_type = options.enums === String ? $root.binlogdata.MigrationType[message.migration_type] : message.migration_type; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = message.tables[j]; - } - if (message.local_position != null && message.hasOwnProperty("local_position")) - object.local_position = message.local_position; - if (message.shard_gtids && message.shard_gtids.length) { - object.shard_gtids = []; - for (var j = 0; j < message.shard_gtids.length; ++j) - object.shard_gtids[j] = $root.binlogdata.ShardGtid.toObject(message.shard_gtids[j], options); - } - if (message.participants && message.participants.length) { - object.participants = []; - for (var j = 0; j < message.participants.length; ++j) - object.participants[j] = $root.binlogdata.KeyspaceShard.toObject(message.participants[j], options); - } - if (message.source_workflows && message.source_workflows.length) { - object.source_workflows = []; - for (var j = 0; j < message.source_workflows.length; ++j) - object.source_workflows[j] = message.source_workflows[j]; - } - return object; - }; - - /** - * Converts this Journal to JSON. - * @function toJSON - * @memberof binlogdata.Journal - * @instance - * @returns {Object.} JSON object - */ - Journal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Journal; - })(); - - binlogdata.VEvent = (function() { - - /** - * Properties of a VEvent. - * @memberof binlogdata - * @interface IVEvent - * @property {binlogdata.VEventType|null} [type] VEvent type - * @property {number|Long|null} [timestamp] VEvent timestamp - * @property {string|null} [gtid] VEvent gtid - * @property {string|null} [statement] VEvent statement - * @property {binlogdata.IRowEvent|null} [row_event] VEvent row_event - * @property {binlogdata.IFieldEvent|null} [field_event] VEvent field_event - * @property {binlogdata.IVGtid|null} [vgtid] VEvent vgtid - * @property {binlogdata.IJournal|null} [journal] VEvent journal - * @property {string|null} [dml] VEvent dml - * @property {number|Long|null} [current_time] VEvent current_time - * @property {binlogdata.ILastPKEvent|null} [last_p_k_event] VEvent last_p_k_event - */ - - /** - * Constructs a new VEvent. - * @memberof binlogdata - * @classdesc Represents a VEvent. - * @implements IVEvent - * @constructor - * @param {binlogdata.IVEvent=} [properties] Properties to set - */ - function VEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VEvent type. - * @member {binlogdata.VEventType} type - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.type = 0; - - /** - * VEvent timestamp. - * @member {number|Long} timestamp - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * VEvent gtid. - * @member {string} gtid - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.gtid = ""; - - /** - * VEvent statement. - * @member {string} statement - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.statement = ""; - - /** - * VEvent row_event. - * @member {binlogdata.IRowEvent|null|undefined} row_event - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.row_event = null; - - /** - * VEvent field_event. - * @member {binlogdata.IFieldEvent|null|undefined} field_event - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.field_event = null; - - /** - * VEvent vgtid. - * @member {binlogdata.IVGtid|null|undefined} vgtid - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.vgtid = null; - - /** - * VEvent journal. - * @member {binlogdata.IJournal|null|undefined} journal - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.journal = null; - - /** - * VEvent dml. - * @member {string} dml - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.dml = ""; - - /** - * VEvent current_time. - * @member {number|Long} current_time - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.current_time = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * VEvent last_p_k_event. - * @member {binlogdata.ILastPKEvent|null|undefined} last_p_k_event - * @memberof binlogdata.VEvent - * @instance - */ - VEvent.prototype.last_p_k_event = null; - - /** - * Creates a new VEvent instance using the specified properties. - * @function create - * @memberof binlogdata.VEvent - * @static - * @param {binlogdata.IVEvent=} [properties] Properties to set - * @returns {binlogdata.VEvent} VEvent instance - */ - VEvent.create = function create(properties) { - return new VEvent(properties); - }; - - /** - * Encodes the specified VEvent message. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. - * @function encode - * @memberof binlogdata.VEvent - * @static - * @param {binlogdata.IVEvent} message VEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.statement != null && Object.hasOwnProperty.call(message, "statement")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.statement); - if (message.row_event != null && Object.hasOwnProperty.call(message, "row_event")) - $root.binlogdata.RowEvent.encode(message.row_event, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.field_event != null && Object.hasOwnProperty.call(message, "field_event")) - $root.binlogdata.FieldEvent.encode(message.field_event, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.vgtid != null && Object.hasOwnProperty.call(message, "vgtid")) - $root.binlogdata.VGtid.encode(message.vgtid, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.journal != null && Object.hasOwnProperty.call(message, "journal")) - $root.binlogdata.Journal.encode(message.journal, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.dml != null && Object.hasOwnProperty.call(message, "dml")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dml); - if (message.current_time != null && Object.hasOwnProperty.call(message, "current_time")) - writer.uint32(/* id 20, wireType 0 =*/160).int64(message.current_time); - if (message.last_p_k_event != null && Object.hasOwnProperty.call(message, "last_p_k_event")) - $root.binlogdata.LastPKEvent.encode(message.last_p_k_event, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VEvent message, length delimited. Does not implicitly {@link binlogdata.VEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.VEvent - * @static - * @param {binlogdata.IVEvent} message VEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VEvent message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.VEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VEvent} VEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.timestamp = reader.int64(); - break; - case 3: - message.gtid = reader.string(); - break; - case 4: - message.statement = reader.string(); - break; - case 5: - message.row_event = $root.binlogdata.RowEvent.decode(reader, reader.uint32()); - break; - case 6: - message.field_event = $root.binlogdata.FieldEvent.decode(reader, reader.uint32()); - break; - case 7: - message.vgtid = $root.binlogdata.VGtid.decode(reader, reader.uint32()); - break; - case 8: - message.journal = $root.binlogdata.Journal.decode(reader, reader.uint32()); - break; - case 9: - message.dml = reader.string(); - break; - case 20: - message.current_time = reader.int64(); - break; - case 21: - message.last_p_k_event = $root.binlogdata.LastPKEvent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.VEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VEvent} VEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VEvent message. - * @function verify - * @memberof binlogdata.VEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - break; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.statement != null && message.hasOwnProperty("statement")) - if (!$util.isString(message.statement)) - return "statement: string expected"; - if (message.row_event != null && message.hasOwnProperty("row_event")) { - var error = $root.binlogdata.RowEvent.verify(message.row_event); - if (error) - return "row_event." + error; - } - if (message.field_event != null && message.hasOwnProperty("field_event")) { - var error = $root.binlogdata.FieldEvent.verify(message.field_event); - if (error) - return "field_event." + error; - } - if (message.vgtid != null && message.hasOwnProperty("vgtid")) { - var error = $root.binlogdata.VGtid.verify(message.vgtid); - if (error) - return "vgtid." + error; - } - if (message.journal != null && message.hasOwnProperty("journal")) { - var error = $root.binlogdata.Journal.verify(message.journal); - if (error) - return "journal." + error; - } - if (message.dml != null && message.hasOwnProperty("dml")) - if (!$util.isString(message.dml)) - return "dml: string expected"; - if (message.current_time != null && message.hasOwnProperty("current_time")) - if (!$util.isInteger(message.current_time) && !(message.current_time && $util.isInteger(message.current_time.low) && $util.isInteger(message.current_time.high))) - return "current_time: integer|Long expected"; - if (message.last_p_k_event != null && message.hasOwnProperty("last_p_k_event")) { - var error = $root.binlogdata.LastPKEvent.verify(message.last_p_k_event); - if (error) - return "last_p_k_event." + error; - } - return null; - }; - - /** - * Creates a VEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.VEvent - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.VEvent} VEvent - */ - VEvent.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VEvent) - return object; - var message = new $root.binlogdata.VEvent(); - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "GTID": - case 1: - message.type = 1; - break; - case "BEGIN": - case 2: - message.type = 2; - break; - case "COMMIT": - case 3: - message.type = 3; - break; - case "ROLLBACK": - case 4: - message.type = 4; - break; - case "DDL": - case 5: - message.type = 5; - break; - case "INSERT": - case 6: - message.type = 6; - break; - case "REPLACE": - case 7: - message.type = 7; - break; - case "UPDATE": - case 8: - message.type = 8; - break; - case "DELETE": - case 9: - message.type = 9; - break; - case "SET": - case 10: - message.type = 10; - break; - case "OTHER": - case 11: - message.type = 11; - break; - case "ROW": - case 12: - message.type = 12; - break; - case "FIELD": - case 13: - message.type = 13; - break; - case "HEARTBEAT": - case 14: - message.type = 14; - break; - case "VGTID": - case 15: - message.type = 15; - break; - case "JOURNAL": - case 16: - message.type = 16; - break; - case "VERSION": - case 17: - message.type = 17; - break; - case "LASTPK": - case 18: - message.type = 18; - break; - case "SAVEPOINT": - case 19: - message.type = 19; - break; - } - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.statement != null) - message.statement = String(object.statement); - if (object.row_event != null) { - if (typeof object.row_event !== "object") - throw TypeError(".binlogdata.VEvent.row_event: object expected"); - message.row_event = $root.binlogdata.RowEvent.fromObject(object.row_event); - } - if (object.field_event != null) { - if (typeof object.field_event !== "object") - throw TypeError(".binlogdata.VEvent.field_event: object expected"); - message.field_event = $root.binlogdata.FieldEvent.fromObject(object.field_event); - } - if (object.vgtid != null) { - if (typeof object.vgtid !== "object") - throw TypeError(".binlogdata.VEvent.vgtid: object expected"); - message.vgtid = $root.binlogdata.VGtid.fromObject(object.vgtid); - } - if (object.journal != null) { - if (typeof object.journal !== "object") - throw TypeError(".binlogdata.VEvent.journal: object expected"); - message.journal = $root.binlogdata.Journal.fromObject(object.journal); - } - if (object.dml != null) - message.dml = String(object.dml); - if (object.current_time != null) - if ($util.Long) - (message.current_time = $util.Long.fromValue(object.current_time)).unsigned = false; - else if (typeof object.current_time === "string") - message.current_time = parseInt(object.current_time, 10); - else if (typeof object.current_time === "number") - message.current_time = object.current_time; - else if (typeof object.current_time === "object") - message.current_time = new $util.LongBits(object.current_time.low >>> 0, object.current_time.high >>> 0).toNumber(); - if (object.last_p_k_event != null) { - if (typeof object.last_p_k_event !== "object") - throw TypeError(".binlogdata.VEvent.last_p_k_event: object expected"); - message.last_p_k_event = $root.binlogdata.LastPKEvent.fromObject(object.last_p_k_event); - } - return message; - }; - - /** - * Creates a plain object from a VEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.VEvent - * @static - * @param {binlogdata.VEvent} message VEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.gtid = ""; - object.statement = ""; - object.row_event = null; - object.field_event = null; - object.vgtid = null; - object.journal = null; - object.dml = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.current_time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.current_time = options.longs === String ? "0" : 0; - object.last_p_k_event = null; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.binlogdata.VEventType[message.type] : message.type; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.statement != null && message.hasOwnProperty("statement")) - object.statement = message.statement; - if (message.row_event != null && message.hasOwnProperty("row_event")) - object.row_event = $root.binlogdata.RowEvent.toObject(message.row_event, options); - if (message.field_event != null && message.hasOwnProperty("field_event")) - object.field_event = $root.binlogdata.FieldEvent.toObject(message.field_event, options); - if (message.vgtid != null && message.hasOwnProperty("vgtid")) - object.vgtid = $root.binlogdata.VGtid.toObject(message.vgtid, options); - if (message.journal != null && message.hasOwnProperty("journal")) - object.journal = $root.binlogdata.Journal.toObject(message.journal, options); - if (message.dml != null && message.hasOwnProperty("dml")) - object.dml = message.dml; - if (message.current_time != null && message.hasOwnProperty("current_time")) - if (typeof message.current_time === "number") - object.current_time = options.longs === String ? String(message.current_time) : message.current_time; - else - object.current_time = options.longs === String ? $util.Long.prototype.toString.call(message.current_time) : options.longs === Number ? new $util.LongBits(message.current_time.low >>> 0, message.current_time.high >>> 0).toNumber() : message.current_time; - if (message.last_p_k_event != null && message.hasOwnProperty("last_p_k_event")) - object.last_p_k_event = $root.binlogdata.LastPKEvent.toObject(message.last_p_k_event, options); - return object; - }; - - /** - * Converts this VEvent to JSON. - * @function toJSON - * @memberof binlogdata.VEvent - * @instance - * @returns {Object.} JSON object - */ - VEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VEvent; - })(); - - binlogdata.MinimalTable = (function() { - - /** - * Properties of a MinimalTable. - * @memberof binlogdata - * @interface IMinimalTable - * @property {string|null} [name] MinimalTable name - * @property {Array.|null} [fields] MinimalTable fields - * @property {Array.|null} [p_k_columns] MinimalTable p_k_columns - */ - - /** - * Constructs a new MinimalTable. - * @memberof binlogdata - * @classdesc Represents a MinimalTable. - * @implements IMinimalTable - * @constructor - * @param {binlogdata.IMinimalTable=} [properties] Properties to set - */ - function MinimalTable(properties) { - this.fields = []; - this.p_k_columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MinimalTable name. - * @member {string} name - * @memberof binlogdata.MinimalTable - * @instance - */ - MinimalTable.prototype.name = ""; - - /** - * MinimalTable fields. - * @member {Array.} fields - * @memberof binlogdata.MinimalTable - * @instance - */ - MinimalTable.prototype.fields = $util.emptyArray; - - /** - * MinimalTable p_k_columns. - * @member {Array.} p_k_columns - * @memberof binlogdata.MinimalTable - * @instance - */ - MinimalTable.prototype.p_k_columns = $util.emptyArray; - - /** - * Creates a new MinimalTable instance using the specified properties. - * @function create - * @memberof binlogdata.MinimalTable - * @static - * @param {binlogdata.IMinimalTable=} [properties] Properties to set - * @returns {binlogdata.MinimalTable} MinimalTable instance - */ - MinimalTable.create = function create(properties) { - return new MinimalTable(properties); - }; - - /** - * Encodes the specified MinimalTable message. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. - * @function encode - * @memberof binlogdata.MinimalTable - * @static - * @param {binlogdata.IMinimalTable} message MinimalTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MinimalTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.p_k_columns != null && message.p_k_columns.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.p_k_columns.length; ++i) - writer.int64(message.p_k_columns[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified MinimalTable message, length delimited. Does not implicitly {@link binlogdata.MinimalTable.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.MinimalTable - * @static - * @param {binlogdata.IMinimalTable} message MinimalTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MinimalTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MinimalTable message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.MinimalTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.MinimalTable} MinimalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MinimalTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.MinimalTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.p_k_columns && message.p_k_columns.length)) - message.p_k_columns = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.p_k_columns.push(reader.int64()); - } else - message.p_k_columns.push(reader.int64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MinimalTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.MinimalTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.MinimalTable} MinimalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MinimalTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MinimalTable message. - * @function verify - * @memberof binlogdata.MinimalTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MinimalTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.p_k_columns != null && message.hasOwnProperty("p_k_columns")) { - if (!Array.isArray(message.p_k_columns)) - return "p_k_columns: array expected"; - for (var i = 0; i < message.p_k_columns.length; ++i) - if (!$util.isInteger(message.p_k_columns[i]) && !(message.p_k_columns[i] && $util.isInteger(message.p_k_columns[i].low) && $util.isInteger(message.p_k_columns[i].high))) - return "p_k_columns: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a MinimalTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.MinimalTable - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.MinimalTable} MinimalTable - */ - MinimalTable.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.MinimalTable) - return object; - var message = new $root.binlogdata.MinimalTable(); - if (object.name != null) - message.name = String(object.name); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.MinimalTable.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.MinimalTable.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - if (object.p_k_columns) { - if (!Array.isArray(object.p_k_columns)) - throw TypeError(".binlogdata.MinimalTable.p_k_columns: array expected"); - message.p_k_columns = []; - for (var i = 0; i < object.p_k_columns.length; ++i) - if ($util.Long) - (message.p_k_columns[i] = $util.Long.fromValue(object.p_k_columns[i])).unsigned = false; - else if (typeof object.p_k_columns[i] === "string") - message.p_k_columns[i] = parseInt(object.p_k_columns[i], 10); - else if (typeof object.p_k_columns[i] === "number") - message.p_k_columns[i] = object.p_k_columns[i]; - else if (typeof object.p_k_columns[i] === "object") - message.p_k_columns[i] = new $util.LongBits(object.p_k_columns[i].low >>> 0, object.p_k_columns[i].high >>> 0).toNumber(); - } - return message; - }; - - /** - * Creates a plain object from a MinimalTable message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.MinimalTable - * @static - * @param {binlogdata.MinimalTable} message MinimalTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MinimalTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.p_k_columns = []; - } - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - if (message.p_k_columns && message.p_k_columns.length) { - object.p_k_columns = []; - for (var j = 0; j < message.p_k_columns.length; ++j) - if (typeof message.p_k_columns[j] === "number") - object.p_k_columns[j] = options.longs === String ? String(message.p_k_columns[j]) : message.p_k_columns[j]; - else - object.p_k_columns[j] = options.longs === String ? $util.Long.prototype.toString.call(message.p_k_columns[j]) : options.longs === Number ? new $util.LongBits(message.p_k_columns[j].low >>> 0, message.p_k_columns[j].high >>> 0).toNumber() : message.p_k_columns[j]; - } - return object; - }; - - /** - * Converts this MinimalTable to JSON. - * @function toJSON - * @memberof binlogdata.MinimalTable - * @instance - * @returns {Object.} JSON object - */ - MinimalTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MinimalTable; - })(); - - binlogdata.MinimalSchema = (function() { - - /** - * Properties of a MinimalSchema. - * @memberof binlogdata - * @interface IMinimalSchema - * @property {Array.|null} [tables] MinimalSchema tables - */ - - /** - * Constructs a new MinimalSchema. - * @memberof binlogdata - * @classdesc Represents a MinimalSchema. - * @implements IMinimalSchema - * @constructor - * @param {binlogdata.IMinimalSchema=} [properties] Properties to set - */ - function MinimalSchema(properties) { - this.tables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MinimalSchema tables. - * @member {Array.} tables - * @memberof binlogdata.MinimalSchema - * @instance - */ - MinimalSchema.prototype.tables = $util.emptyArray; - - /** - * Creates a new MinimalSchema instance using the specified properties. - * @function create - * @memberof binlogdata.MinimalSchema - * @static - * @param {binlogdata.IMinimalSchema=} [properties] Properties to set - * @returns {binlogdata.MinimalSchema} MinimalSchema instance - */ - MinimalSchema.create = function create(properties) { - return new MinimalSchema(properties); - }; - - /** - * Encodes the specified MinimalSchema message. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. - * @function encode - * @memberof binlogdata.MinimalSchema - * @static - * @param {binlogdata.IMinimalSchema} message MinimalSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MinimalSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tables != null && message.tables.length) - for (var i = 0; i < message.tables.length; ++i) - $root.binlogdata.MinimalTable.encode(message.tables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MinimalSchema message, length delimited. Does not implicitly {@link binlogdata.MinimalSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.MinimalSchema - * @static - * @param {binlogdata.IMinimalSchema} message MinimalSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MinimalSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MinimalSchema message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.MinimalSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.MinimalSchema} MinimalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MinimalSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.MinimalSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.tables && message.tables.length)) - message.tables = []; - message.tables.push($root.binlogdata.MinimalTable.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MinimalSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.MinimalSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.MinimalSchema} MinimalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MinimalSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MinimalSchema message. - * @function verify - * @memberof binlogdata.MinimalSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MinimalSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tables != null && message.hasOwnProperty("tables")) { - if (!Array.isArray(message.tables)) - return "tables: array expected"; - for (var i = 0; i < message.tables.length; ++i) { - var error = $root.binlogdata.MinimalTable.verify(message.tables[i]); - if (error) - return "tables." + error; - } - } - return null; - }; - - /** - * Creates a MinimalSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.MinimalSchema - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.MinimalSchema} MinimalSchema - */ - MinimalSchema.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.MinimalSchema) - return object; - var message = new $root.binlogdata.MinimalSchema(); - if (object.tables) { - if (!Array.isArray(object.tables)) - throw TypeError(".binlogdata.MinimalSchema.tables: array expected"); - message.tables = []; - for (var i = 0; i < object.tables.length; ++i) { - if (typeof object.tables[i] !== "object") - throw TypeError(".binlogdata.MinimalSchema.tables: object expected"); - message.tables[i] = $root.binlogdata.MinimalTable.fromObject(object.tables[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MinimalSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.MinimalSchema - * @static - * @param {binlogdata.MinimalSchema} message MinimalSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MinimalSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tables = []; - if (message.tables && message.tables.length) { - object.tables = []; - for (var j = 0; j < message.tables.length; ++j) - object.tables[j] = $root.binlogdata.MinimalTable.toObject(message.tables[j], options); - } - return object; - }; - - /** - * Converts this MinimalSchema to JSON. - * @function toJSON - * @memberof binlogdata.MinimalSchema - * @instance - * @returns {Object.} JSON object - */ - MinimalSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MinimalSchema; - })(); - - binlogdata.VStreamRequest = (function() { - - /** - * Properties of a VStreamRequest. - * @memberof binlogdata - * @interface IVStreamRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamRequest immediate_caller_id - * @property {query.ITarget|null} [target] VStreamRequest target - * @property {string|null} [position] VStreamRequest position - * @property {binlogdata.IFilter|null} [filter] VStreamRequest filter - * @property {Array.|null} [table_last_p_ks] VStreamRequest table_last_p_ks - */ - - /** - * Constructs a new VStreamRequest. - * @memberof binlogdata - * @classdesc Represents a VStreamRequest. - * @implements IVStreamRequest - * @constructor - * @param {binlogdata.IVStreamRequest=} [properties] Properties to set - */ - function VStreamRequest(properties) { - this.table_last_p_ks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VStreamRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.effective_caller_id = null; - - /** - * VStreamRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.immediate_caller_id = null; - - /** - * VStreamRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.target = null; - - /** - * VStreamRequest position. - * @member {string} position - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.position = ""; - - /** - * VStreamRequest filter. - * @member {binlogdata.IFilter|null|undefined} filter - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.filter = null; - - /** - * VStreamRequest table_last_p_ks. - * @member {Array.} table_last_p_ks - * @memberof binlogdata.VStreamRequest - * @instance - */ - VStreamRequest.prototype.table_last_p_ks = $util.emptyArray; - - /** - * Creates a new VStreamRequest instance using the specified properties. - * @function create - * @memberof binlogdata.VStreamRequest - * @static - * @param {binlogdata.IVStreamRequest=} [properties] Properties to set - * @returns {binlogdata.VStreamRequest} VStreamRequest instance - */ - VStreamRequest.create = function create(properties) { - return new VStreamRequest(properties); - }; - - /** - * Encodes the specified VStreamRequest message. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. - * @function encode - * @memberof binlogdata.VStreamRequest - * @static - * @param {binlogdata.IVStreamRequest} message VStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.position != null && Object.hasOwnProperty.call(message, "position")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.position); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.binlogdata.Filter.encode(message.filter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.table_last_p_ks != null && message.table_last_p_ks.length) - for (var i = 0; i < message.table_last_p_ks.length; ++i) - $root.binlogdata.TableLastPK.encode(message.table_last_p_ks[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VStreamRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.VStreamRequest - * @static - * @param {binlogdata.IVStreamRequest} message VStreamRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VStreamRequest message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.VStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamRequest} VStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.position = reader.string(); - break; - case 5: - message.filter = $root.binlogdata.Filter.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.table_last_p_ks && message.table_last_p_ks.length)) - message.table_last_p_ks = []; - message.table_last_p_ks.push($root.binlogdata.TableLastPK.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VStreamRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.VStreamRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamRequest} VStreamRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VStreamRequest message. - * @function verify - * @memberof binlogdata.VStreamRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VStreamRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.position != null && message.hasOwnProperty("position")) - if (!$util.isString(message.position)) - return "position: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.binlogdata.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.table_last_p_ks != null && message.hasOwnProperty("table_last_p_ks")) { - if (!Array.isArray(message.table_last_p_ks)) - return "table_last_p_ks: array expected"; - for (var i = 0; i < message.table_last_p_ks.length; ++i) { - var error = $root.binlogdata.TableLastPK.verify(message.table_last_p_ks[i]); - if (error) - return "table_last_p_ks." + error; - } - } - return null; - }; - - /** - * Creates a VStreamRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.VStreamRequest - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.VStreamRequest} VStreamRequest - */ - VStreamRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamRequest) - return object; - var message = new $root.binlogdata.VStreamRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".binlogdata.VStreamRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.position != null) - message.position = String(object.position); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".binlogdata.VStreamRequest.filter: object expected"); - message.filter = $root.binlogdata.Filter.fromObject(object.filter); - } - if (object.table_last_p_ks) { - if (!Array.isArray(object.table_last_p_ks)) - throw TypeError(".binlogdata.VStreamRequest.table_last_p_ks: array expected"); - message.table_last_p_ks = []; - for (var i = 0; i < object.table_last_p_ks.length; ++i) { - if (typeof object.table_last_p_ks[i] !== "object") - throw TypeError(".binlogdata.VStreamRequest.table_last_p_ks: object expected"); - message.table_last_p_ks[i] = $root.binlogdata.TableLastPK.fromObject(object.table_last_p_ks[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a VStreamRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.VStreamRequest - * @static - * @param {binlogdata.VStreamRequest} message VStreamRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VStreamRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.table_last_p_ks = []; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.position = ""; - object.filter = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.position != null && message.hasOwnProperty("position")) - object.position = message.position; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.binlogdata.Filter.toObject(message.filter, options); - if (message.table_last_p_ks && message.table_last_p_ks.length) { - object.table_last_p_ks = []; - for (var j = 0; j < message.table_last_p_ks.length; ++j) - object.table_last_p_ks[j] = $root.binlogdata.TableLastPK.toObject(message.table_last_p_ks[j], options); - } - return object; - }; - - /** - * Converts this VStreamRequest to JSON. - * @function toJSON - * @memberof binlogdata.VStreamRequest - * @instance - * @returns {Object.} JSON object - */ - VStreamRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VStreamRequest; - })(); - - binlogdata.VStreamResponse = (function() { - - /** - * Properties of a VStreamResponse. - * @memberof binlogdata - * @interface IVStreamResponse - * @property {Array.|null} [events] VStreamResponse events - */ - - /** - * Constructs a new VStreamResponse. - * @memberof binlogdata - * @classdesc Represents a VStreamResponse. - * @implements IVStreamResponse - * @constructor - * @param {binlogdata.IVStreamResponse=} [properties] Properties to set - */ - function VStreamResponse(properties) { - this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VStreamResponse events. - * @member {Array.} events - * @memberof binlogdata.VStreamResponse - * @instance - */ - VStreamResponse.prototype.events = $util.emptyArray; - - /** - * Creates a new VStreamResponse instance using the specified properties. - * @function create - * @memberof binlogdata.VStreamResponse - * @static - * @param {binlogdata.IVStreamResponse=} [properties] Properties to set - * @returns {binlogdata.VStreamResponse} VStreamResponse instance - */ - VStreamResponse.create = function create(properties) { - return new VStreamResponse(properties); - }; - - /** - * Encodes the specified VStreamResponse message. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. - * @function encode - * @memberof binlogdata.VStreamResponse - * @static - * @param {binlogdata.IVStreamResponse} message VStreamResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.binlogdata.VEvent.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VStreamResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.VStreamResponse - * @static - * @param {binlogdata.IVStreamResponse} message VStreamResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VStreamResponse message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.VStreamResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamResponse} VStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.binlogdata.VEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VStreamResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.VStreamResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamResponse} VStreamResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VStreamResponse message. - * @function verify - * @memberof binlogdata.VStreamResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VStreamResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.binlogdata.VEvent.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a VStreamResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.VStreamResponse - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.VStreamResponse} VStreamResponse - */ - VStreamResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamResponse) - return object; - var message = new $root.binlogdata.VStreamResponse(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".binlogdata.VStreamResponse.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".binlogdata.VStreamResponse.events: object expected"); - message.events[i] = $root.binlogdata.VEvent.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a VStreamResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.VStreamResponse - * @static - * @param {binlogdata.VStreamResponse} message VStreamResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VStreamResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.binlogdata.VEvent.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this VStreamResponse to JSON. - * @function toJSON - * @memberof binlogdata.VStreamResponse - * @instance - * @returns {Object.} JSON object - */ - VStreamResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VStreamResponse; - })(); - - binlogdata.VStreamRowsRequest = (function() { - - /** - * Properties of a VStreamRowsRequest. - * @memberof binlogdata - * @interface IVStreamRowsRequest - * @property {vtrpc.ICallerID|null} [effective_caller_id] VStreamRowsRequest effective_caller_id - * @property {query.IVTGateCallerID|null} [immediate_caller_id] VStreamRowsRequest immediate_caller_id - * @property {query.ITarget|null} [target] VStreamRowsRequest target - * @property {string|null} [query] VStreamRowsRequest query - * @property {query.IQueryResult|null} [lastpk] VStreamRowsRequest lastpk - */ - - /** - * Constructs a new VStreamRowsRequest. - * @memberof binlogdata - * @classdesc Represents a VStreamRowsRequest. - * @implements IVStreamRowsRequest - * @constructor - * @param {binlogdata.IVStreamRowsRequest=} [properties] Properties to set - */ - function VStreamRowsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VStreamRowsRequest effective_caller_id. - * @member {vtrpc.ICallerID|null|undefined} effective_caller_id - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.effective_caller_id = null; - - /** - * VStreamRowsRequest immediate_caller_id. - * @member {query.IVTGateCallerID|null|undefined} immediate_caller_id - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.immediate_caller_id = null; - - /** - * VStreamRowsRequest target. - * @member {query.ITarget|null|undefined} target - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.target = null; - - /** - * VStreamRowsRequest query. - * @member {string} query - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.query = ""; - - /** - * VStreamRowsRequest lastpk. - * @member {query.IQueryResult|null|undefined} lastpk - * @memberof binlogdata.VStreamRowsRequest - * @instance - */ - VStreamRowsRequest.prototype.lastpk = null; - - /** - * Creates a new VStreamRowsRequest instance using the specified properties. - * @function create - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {binlogdata.IVStreamRowsRequest=} [properties] Properties to set - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest instance - */ - VStreamRowsRequest.create = function create(properties) { - return new VStreamRowsRequest(properties); - }; - - /** - * Encodes the specified VStreamRowsRequest message. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. - * @function encode - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {binlogdata.IVStreamRowsRequest} message VStreamRowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamRowsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effective_caller_id != null && Object.hasOwnProperty.call(message, "effective_caller_id")) - $root.vtrpc.CallerID.encode(message.effective_caller_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.immediate_caller_id != null && Object.hasOwnProperty.call(message, "immediate_caller_id")) - $root.query.VTGateCallerID.encode(message.immediate_caller_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.query.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.query); - if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) - $root.query.QueryResult.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VStreamRowsRequest message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {binlogdata.IVStreamRowsRequest} message VStreamRowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamRowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamRowsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.effective_caller_id = $root.vtrpc.CallerID.decode(reader, reader.uint32()); - break; - case 2: - message.immediate_caller_id = $root.query.VTGateCallerID.decode(reader, reader.uint32()); - break; - case 3: - message.target = $root.query.Target.decode(reader, reader.uint32()); - break; - case 4: - message.query = reader.string(); - break; - case 5: - message.lastpk = $root.query.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VStreamRowsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamRowsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VStreamRowsRequest message. - * @function verify - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VStreamRowsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) { - var error = $root.vtrpc.CallerID.verify(message.effective_caller_id); - if (error) - return "effective_caller_id." + error; - } - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) { - var error = $root.query.VTGateCallerID.verify(message.immediate_caller_id); - if (error) - return "immediate_caller_id." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.query.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.lastpk != null && message.hasOwnProperty("lastpk")) { - var error = $root.query.QueryResult.verify(message.lastpk); - if (error) - return "lastpk." + error; - } - return null; - }; - - /** - * Creates a VStreamRowsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.VStreamRowsRequest} VStreamRowsRequest - */ - VStreamRowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamRowsRequest) - return object; - var message = new $root.binlogdata.VStreamRowsRequest(); - if (object.effective_caller_id != null) { - if (typeof object.effective_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.effective_caller_id: object expected"); - message.effective_caller_id = $root.vtrpc.CallerID.fromObject(object.effective_caller_id); - } - if (object.immediate_caller_id != null) { - if (typeof object.immediate_caller_id !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.immediate_caller_id: object expected"); - message.immediate_caller_id = $root.query.VTGateCallerID.fromObject(object.immediate_caller_id); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.target: object expected"); - message.target = $root.query.Target.fromObject(object.target); - } - if (object.query != null) - message.query = String(object.query); - if (object.lastpk != null) { - if (typeof object.lastpk !== "object") - throw TypeError(".binlogdata.VStreamRowsRequest.lastpk: object expected"); - message.lastpk = $root.query.QueryResult.fromObject(object.lastpk); - } - return message; - }; - - /** - * Creates a plain object from a VStreamRowsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.VStreamRowsRequest - * @static - * @param {binlogdata.VStreamRowsRequest} message VStreamRowsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VStreamRowsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.effective_caller_id = null; - object.immediate_caller_id = null; - object.target = null; - object.query = ""; - object.lastpk = null; - } - if (message.effective_caller_id != null && message.hasOwnProperty("effective_caller_id")) - object.effective_caller_id = $root.vtrpc.CallerID.toObject(message.effective_caller_id, options); - if (message.immediate_caller_id != null && message.hasOwnProperty("immediate_caller_id")) - object.immediate_caller_id = $root.query.VTGateCallerID.toObject(message.immediate_caller_id, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.query.Target.toObject(message.target, options); - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.lastpk != null && message.hasOwnProperty("lastpk")) - object.lastpk = $root.query.QueryResult.toObject(message.lastpk, options); - return object; - }; - - /** - * Converts this VStreamRowsRequest to JSON. - * @function toJSON - * @memberof binlogdata.VStreamRowsRequest - * @instance - * @returns {Object.} JSON object - */ - VStreamRowsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VStreamRowsRequest; - })(); - - binlogdata.VStreamRowsResponse = (function() { - - /** - * Properties of a VStreamRowsResponse. - * @memberof binlogdata - * @interface IVStreamRowsResponse - * @property {Array.|null} [fields] VStreamRowsResponse fields - * @property {Array.|null} [pkfields] VStreamRowsResponse pkfields - * @property {string|null} [gtid] VStreamRowsResponse gtid - * @property {Array.|null} [rows] VStreamRowsResponse rows - * @property {query.IRow|null} [lastpk] VStreamRowsResponse lastpk - */ - - /** - * Constructs a new VStreamRowsResponse. - * @memberof binlogdata - * @classdesc Represents a VStreamRowsResponse. - * @implements IVStreamRowsResponse - * @constructor - * @param {binlogdata.IVStreamRowsResponse=} [properties] Properties to set - */ - function VStreamRowsResponse(properties) { - this.fields = []; - this.pkfields = []; - this.rows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VStreamRowsResponse fields. - * @member {Array.} fields - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.fields = $util.emptyArray; - - /** - * VStreamRowsResponse pkfields. - * @member {Array.} pkfields - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.pkfields = $util.emptyArray; - - /** - * VStreamRowsResponse gtid. - * @member {string} gtid - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.gtid = ""; - - /** - * VStreamRowsResponse rows. - * @member {Array.} rows - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.rows = $util.emptyArray; - - /** - * VStreamRowsResponse lastpk. - * @member {query.IRow|null|undefined} lastpk - * @memberof binlogdata.VStreamRowsResponse - * @instance - */ - VStreamRowsResponse.prototype.lastpk = null; - - /** - * Creates a new VStreamRowsResponse instance using the specified properties. - * @function create - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {binlogdata.IVStreamRowsResponse=} [properties] Properties to set - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse instance - */ - VStreamRowsResponse.create = function create(properties) { - return new VStreamRowsResponse(properties); - }; - - /** - * Encodes the specified VStreamRowsResponse message. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. - * @function encode - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {binlogdata.IVStreamRowsResponse} message VStreamRowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamRowsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.query.Field.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pkfields != null && message.pkfields.length) - for (var i = 0; i < message.pkfields.length; ++i) - $root.query.Field.encode(message.pkfields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.gtid); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.query.Row.encode(message.rows[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastpk != null && Object.hasOwnProperty.call(message, "lastpk")) - $root.query.Row.encode(message.lastpk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VStreamRowsResponse message, length delimited. Does not implicitly {@link binlogdata.VStreamRowsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {binlogdata.IVStreamRowsResponse} message VStreamRowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VStreamRowsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer. - * @function decode - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamRowsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.binlogdata.VStreamRowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.pkfields && message.pkfields.length)) - message.pkfields = []; - message.pkfields.push($root.query.Field.decode(reader, reader.uint32())); - break; - case 3: - message.gtid = reader.string(); - break; - case 4: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.query.Row.decode(reader, reader.uint32())); - break; - case 5: - message.lastpk = $root.query.Row.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VStreamRowsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VStreamRowsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VStreamRowsResponse message. - * @function verify - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VStreamRowsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.query.Field.verify(message.fields[i]); - if (error) - return "fields." + error; - } - } - if (message.pkfields != null && message.hasOwnProperty("pkfields")) { - if (!Array.isArray(message.pkfields)) - return "pkfields: array expected"; - for (var i = 0; i < message.pkfields.length; ++i) { - var error = $root.query.Field.verify(message.pkfields[i]); - if (error) - return "pkfields." + error; - } - } - if (message.gtid != null && message.hasOwnProperty("gtid")) - if (!$util.isString(message.gtid)) - return "gtid: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.query.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.lastpk != null && message.hasOwnProperty("lastpk")) { - var error = $root.query.Row.verify(message.lastpk); - if (error) - return "lastpk." + error; - } - return null; - }; - - /** - * Creates a VStreamRowsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {Object.} object Plain object - * @returns {binlogdata.VStreamRowsResponse} VStreamRowsResponse - */ - VStreamRowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.binlogdata.VStreamRowsResponse) - return object; - var message = new $root.binlogdata.VStreamRowsResponse(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".binlogdata.VStreamRowsResponse.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.fields: object expected"); - message.fields[i] = $root.query.Field.fromObject(object.fields[i]); - } - } - if (object.pkfields) { - if (!Array.isArray(object.pkfields)) - throw TypeError(".binlogdata.VStreamRowsResponse.pkfields: array expected"); - message.pkfields = []; - for (var i = 0; i < object.pkfields.length; ++i) { - if (typeof object.pkfields[i] !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.pkfields: object expected"); - message.pkfields[i] = $root.query.Field.fromObject(object.pkfields[i]); - } - } - if (object.gtid != null) - message.gtid = String(object.gtid); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".binlogdata.VStreamRowsResponse.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.rows: object expected"); - message.rows[i] = $root.query.Row.fromObject(object.rows[i]); - } - } - if (object.lastpk != null) { - if (typeof object.lastpk !== "object") - throw TypeError(".binlogdata.VStreamRowsResponse.lastpk: object expected"); - message.lastpk = $root.query.Row.fromObject(object.lastpk); - } - return message; - }; - - /** - * Creates a plain object from a VStreamRowsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof binlogdata.VStreamRowsResponse - * @static - * @param {binlogdata.VStreamRowsResponse} message VStreamRowsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VStreamRowsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.pkfields = []; - object.rows = []; - } - if (options.defaults) { - object.gtid = ""; - object.lastpk = null; - } - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.query.Field.toObject(message.fields[j], options); - } - if (message.pkfields && message.pkfields.length) { - object.pkfields = []; - for (var j = 0; j < message.pkfields.length; ++j) - object.pkfields[j] = $root.query.Field.toObject(message.pkfields[j], options); - } - if (message.gtid != null && message.hasOwnProperty("gtid")) - object.gtid = message.gtid; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.query.Row.toObject(message.rows[j], options); - } - if (message.lastpk != null && message.hasOwnProperty("lastpk")) - object.lastpk = $root.query.Row.toObject(message.lastpk, options); - return object; - }; - - /** - * Converts this VStreamRowsResponse to JSON. - * @function toJSON - * @memberof binlogdata.VStreamRowsResponse - * @instance - * @returns {Object.} JSON object - */ - VStreamRowsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VStreamRowsResponse; - })(); - - binlogdata.LastPKEvent = (function() { - - /** - * Properties of a LastPKEvent. - * @memberof binlogdata - * @interface ILastPKEvent - * @property {binlogdata.ITableLastPK|null} [table_last_p_k] LastPKEvent table_last_p_k - * @property {boolean|null} [completed] LastPKEvent completed - */ - - /** - * TabletControl cells. - * @member {Array.} cells - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.cells = $util.emptyArray; - - /** - * TabletControl blacklisted_tables. - * @member {Array.} blacklisted_tables - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.blacklisted_tables = $util.emptyArray; - - /** - * TabletControl frozen. - * @member {boolean} frozen - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.frozen = false; + /** + * TabletControl frozen. + * @member {boolean} frozen + * @memberof topodata.Shard.TabletControl + * @instance + */ + TabletControl.prototype.frozen = false; /** * Creates a new TabletControl instance using the specified properties. @@ -75052,17 +4120,18 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ TabletControl.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, 'tablet_type')) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.tablet_type); + if (!writer) + writer = $Writer.create(); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); if (message.cells != null && message.cells.length) for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.cells[i]); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); if (message.blacklisted_tables != null && message.blacklisted_tables.length) for (var i = 0; i < message.blacklisted_tables.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.blacklisted_tables[i]); - if (message.frozen != null && Object.hasOwnProperty.call(message, 'frozen')) - writer.uint32(/* id 5, wireType 0 =*/ 40).bool(message.frozen); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.blacklisted_tables[i]); + if (message.frozen != null && Object.hasOwnProperty.call(message, "frozen")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.frozen); return writer; }; @@ -75091,30 +4160,31 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TabletControl.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Shard.TabletControl(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Shard.TabletControl(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - if (!(message.cells && message.cells.length)) message.cells = []; - message.cells.push(reader.string()); - break; - case 4: - if (!(message.blacklisted_tables && message.blacklisted_tables.length)) - message.blacklisted_tables = []; - message.blacklisted_tables.push(reader.string()); - break; - case 5: - message.frozen = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tablet_type = reader.int32(); + break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 4: + if (!(message.blacklisted_tables && message.blacklisted_tables.length)) + message.blacklisted_tables = []; + message.blacklisted_tables.push(reader.string()); + break; + case 5: + message.frozen = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -75131,7 +4201,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TabletControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -75144,36 +4215,41 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TabletControl.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) switch (message.tablet_type) { - default: - return 'tablet_type: enum value expected'; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - if (message.cells != null && message.hasOwnProperty('cells')) { - if (!Array.isArray(message.cells)) return 'cells: array expected'; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) return 'cells: string[] expected'; + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } - if (message.blacklisted_tables != null && message.hasOwnProperty('blacklisted_tables')) { - if (!Array.isArray(message.blacklisted_tables)) return 'blacklisted_tables: array expected'; + if (message.blacklisted_tables != null && message.hasOwnProperty("blacklisted_tables")) { + if (!Array.isArray(message.blacklisted_tables)) + return "blacklisted_tables: array expected"; for (var i = 0; i < message.blacklisted_tables.length; ++i) if (!$util.isString(message.blacklisted_tables[i])) - return 'blacklisted_tables: string[] expected'; + return "blacklisted_tables: string[] expected"; } - if (message.frozen != null && message.hasOwnProperty('frozen')) - if (typeof message.frozen !== 'boolean') return 'frozen: boolean expected'; + if (message.frozen != null && message.hasOwnProperty("frozen")) + if (typeof message.frozen !== "boolean") + return "frozen: boolean expected"; return null; }; @@ -75186,64 +4262,67 @@ $root.binlogdata = (function() { * @returns {topodata.Shard.TabletControl} TabletControl */ TabletControl.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Shard.TabletControl) return object; + if (object instanceof $root.topodata.Shard.TabletControl) + return object; var message = new $root.topodata.Shard.TabletControl(); switch (object.tablet_type) { - case 'UNKNOWN': - case 0: - message.tablet_type = 0; - break; - case 'MASTER': - case 1: - message.tablet_type = 1; - break; - case 'REPLICA': - case 2: - message.tablet_type = 2; - break; - case 'RDONLY': - case 3: - message.tablet_type = 3; - break; - case 'BATCH': - case 3: - message.tablet_type = 3; - break; - case 'SPARE': - case 4: - message.tablet_type = 4; - break; - case 'EXPERIMENTAL': - case 5: - message.tablet_type = 5; - break; - case 'BACKUP': - case 6: - message.tablet_type = 6; - break; - case 'RESTORE': - case 7: - message.tablet_type = 7; - break; - case 'DRAINED': - case 8: - message.tablet_type = 8; - break; + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; } if (object.cells) { if (!Array.isArray(object.cells)) - throw TypeError('.topodata.Shard.TabletControl.cells: array expected'); + throw TypeError(".topodata.Shard.TabletControl.cells: array expected"); message.cells = []; - for (var i = 0; i < object.cells.length; ++i) message.cells[i] = String(object.cells[i]); + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } if (object.blacklisted_tables) { if (!Array.isArray(object.blacklisted_tables)) - throw TypeError('.topodata.Shard.TabletControl.blacklisted_tables: array expected'); + throw TypeError(".topodata.Shard.TabletControl.blacklisted_tables: array expected"); message.blacklisted_tables = []; for (var i = 0; i < object.blacklisted_tables.length; ++i) message.blacklisted_tables[i] = String(object.blacklisted_tables[i]); } - if (object.frozen != null) message.frozen = Boolean(object.frozen); + if (object.frozen != null) + message.frozen = Boolean(object.frozen); return message; }; @@ -75257,29 +4336,31 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ TabletControl.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.arrays || options.defaults) { object.cells = []; object.blacklisted_tables = []; } if (options.defaults) { - object.tablet_type = options.enums === String ? 'UNKNOWN' : 0; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; object.frozen = false; } - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) - object.tablet_type = - options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; if (message.cells && message.cells.length) { object.cells = []; - for (var j = 0; j < message.cells.length; ++j) object.cells[j] = message.cells[j]; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } if (message.blacklisted_tables && message.blacklisted_tables.length) { object.blacklisted_tables = []; for (var j = 0; j < message.blacklisted_tables.length; ++j) object.blacklisted_tables[j] = message.blacklisted_tables[j]; } - if (message.frozen != null && message.hasOwnProperty('frozen')) object.frozen = message.frozen; + if (message.frozen != null && message.hasOwnProperty("frozen")) + object.frozen = message.frozen; return object; }; @@ -75300,7 +4381,8 @@ $root.binlogdata = (function() { return Shard; })(); - topodata.Keyspace = (function () { + topodata.Keyspace = (function() { + /** * Properties of a Keyspace. * @memberof topodata @@ -75325,7 +4407,8 @@ $root.binlogdata = (function() { this.served_froms = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -75334,7 +4417,7 @@ $root.binlogdata = (function() { * @memberof topodata.Keyspace * @instance */ - Keyspace.prototype.sharding_column_name = ''; + Keyspace.prototype.sharding_column_name = ""; /** * Keyspace sharding_column_type. @@ -75366,7 +4449,7 @@ $root.binlogdata = (function() { * @memberof topodata.Keyspace * @instance */ - Keyspace.prototype.base_keyspace = ''; + Keyspace.prototype.base_keyspace = ""; /** * Keyspace snapshot_time. @@ -75398,26 +4481,21 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ Keyspace.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, 'sharding_column_name')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.sharding_column_name); - if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, 'sharding_column_type')) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.sharding_column_type); + if (!writer) + writer = $Writer.create(); + if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, "sharding_column_name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sharding_column_name); + if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, "sharding_column_type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sharding_column_type); if (message.served_froms != null && message.served_froms.length) for (var i = 0; i < message.served_froms.length; ++i) - $root.topodata.Keyspace.ServedFrom.encode( - message.served_froms[i], - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim(); - if (message.keyspace_type != null && Object.hasOwnProperty.call(message, 'keyspace_type')) - writer.uint32(/* id 5, wireType 0 =*/ 40).int32(message.keyspace_type); - if (message.base_keyspace != null && Object.hasOwnProperty.call(message, 'base_keyspace')) - writer.uint32(/* id 6, wireType 2 =*/ 50).string(message.base_keyspace); - if (message.snapshot_time != null && Object.hasOwnProperty.call(message, 'snapshot_time')) - $root.vttime.Time.encode( - message.snapshot_time, - writer.uint32(/* id 7, wireType 2 =*/ 58).fork() - ).ldelim(); + $root.topodata.Keyspace.ServedFrom.encode(message.served_froms[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.keyspace_type != null && Object.hasOwnProperty.call(message, "keyspace_type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.keyspace_type); + if (message.base_keyspace != null && Object.hasOwnProperty.call(message, "base_keyspace")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.base_keyspace); + if (message.snapshot_time != null && Object.hasOwnProperty.call(message, "snapshot_time")) + $root.vttime.Time.encode(message.snapshot_time, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -75446,34 +4524,35 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Keyspace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Keyspace(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Keyspace(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sharding_column_name = reader.string(); - break; - case 2: - message.sharding_column_type = reader.int32(); - break; - case 4: - if (!(message.served_froms && message.served_froms.length)) message.served_froms = []; - message.served_froms.push($root.topodata.Keyspace.ServedFrom.decode(reader, reader.uint32())); - break; - case 5: - message.keyspace_type = reader.int32(); - break; - case 6: - message.base_keyspace = reader.string(); - break; - case 7: - message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.sharding_column_name = reader.string(); + break; + case 2: + message.sharding_column_type = reader.int32(); + break; + case 4: + if (!(message.served_froms && message.served_froms.length)) + message.served_froms = []; + message.served_froms.push($root.topodata.Keyspace.ServedFrom.decode(reader, reader.uint32())); + break; + case 5: + message.keyspace_type = reader.int32(); + break; + case 6: + message.base_keyspace = reader.string(); + break; + case 7: + message.snapshot_time = $root.vttime.Time.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -75490,7 +4569,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Keyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -75503,38 +4583,44 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Keyspace.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.sharding_column_name != null && message.hasOwnProperty('sharding_column_name')) - if (!$util.isString(message.sharding_column_name)) return 'sharding_column_name: string expected'; - if (message.sharding_column_type != null && message.hasOwnProperty('sharding_column_type')) + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) + if (!$util.isString(message.sharding_column_name)) + return "sharding_column_name: string expected"; + if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) switch (message.sharding_column_type) { - default: - return 'sharding_column_type: enum value expected'; - case 0: - case 1: - case 2: - break; + default: + return "sharding_column_type: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.served_froms != null && message.hasOwnProperty('served_froms')) { - if (!Array.isArray(message.served_froms)) return 'served_froms: array expected'; + if (message.served_froms != null && message.hasOwnProperty("served_froms")) { + if (!Array.isArray(message.served_froms)) + return "served_froms: array expected"; for (var i = 0; i < message.served_froms.length; ++i) { var error = $root.topodata.Keyspace.ServedFrom.verify(message.served_froms[i]); - if (error) return 'served_froms.' + error; + if (error) + return "served_froms." + error; } } - if (message.keyspace_type != null && message.hasOwnProperty('keyspace_type')) + if (message.keyspace_type != null && message.hasOwnProperty("keyspace_type")) switch (message.keyspace_type) { - default: - return 'keyspace_type: enum value expected'; - case 0: - case 1: - break; + default: + return "keyspace_type: enum value expected"; + case 0: + case 1: + break; } - if (message.base_keyspace != null && message.hasOwnProperty('base_keyspace')) - if (!$util.isString(message.base_keyspace)) return 'base_keyspace: string expected'; - if (message.snapshot_time != null && message.hasOwnProperty('snapshot_time')) { + if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) + if (!$util.isString(message.base_keyspace)) + return "base_keyspace: string expected"; + if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) { var error = $root.vttime.Time.verify(message.snapshot_time); - if (error) return 'snapshot_time.' + error; + if (error) + return "snapshot_time." + error; } return null; }; @@ -75548,47 +4634,50 @@ $root.binlogdata = (function() { * @returns {topodata.Keyspace} Keyspace */ Keyspace.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Keyspace) return object; + if (object instanceof $root.topodata.Keyspace) + return object; var message = new $root.topodata.Keyspace(); - if (object.sharding_column_name != null) message.sharding_column_name = String(object.sharding_column_name); + if (object.sharding_column_name != null) + message.sharding_column_name = String(object.sharding_column_name); switch (object.sharding_column_type) { - case 'UNSET': - case 0: - message.sharding_column_type = 0; - break; - case 'UINT64': - case 1: - message.sharding_column_type = 1; - break; - case 'BYTES': - case 2: - message.sharding_column_type = 2; - break; + case "UNSET": + case 0: + message.sharding_column_type = 0; + break; + case "UINT64": + case 1: + message.sharding_column_type = 1; + break; + case "BYTES": + case 2: + message.sharding_column_type = 2; + break; } if (object.served_froms) { if (!Array.isArray(object.served_froms)) - throw TypeError('.topodata.Keyspace.served_froms: array expected'); + throw TypeError(".topodata.Keyspace.served_froms: array expected"); message.served_froms = []; for (var i = 0; i < object.served_froms.length; ++i) { - if (typeof object.served_froms[i] !== 'object') - throw TypeError('.topodata.Keyspace.served_froms: object expected'); + if (typeof object.served_froms[i] !== "object") + throw TypeError(".topodata.Keyspace.served_froms: object expected"); message.served_froms[i] = $root.topodata.Keyspace.ServedFrom.fromObject(object.served_froms[i]); } } switch (object.keyspace_type) { - case 'NORMAL': - case 0: - message.keyspace_type = 0; - break; - case 'SNAPSHOT': - case 1: - message.keyspace_type = 1; - break; + case "NORMAL": + case 0: + message.keyspace_type = 0; + break; + case "SNAPSHOT": + case 1: + message.keyspace_type = 1; + break; } - if (object.base_keyspace != null) message.base_keyspace = String(object.base_keyspace); + if (object.base_keyspace != null) + message.base_keyspace = String(object.base_keyspace); if (object.snapshot_time != null) { - if (typeof object.snapshot_time !== 'object') - throw TypeError('.topodata.Keyspace.snapshot_time: object expected'); + if (typeof object.snapshot_time !== "object") + throw TypeError(".topodata.Keyspace.snapshot_time: object expected"); message.snapshot_time = $root.vttime.Time.fromObject(object.snapshot_time); } return message; @@ -75604,39 +4693,32 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ Keyspace.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.served_froms = []; + if (options.arrays || options.defaults) + object.served_froms = []; if (options.defaults) { - object.sharding_column_name = ''; - object.sharding_column_type = options.enums === String ? 'UNSET' : 0; - object.keyspace_type = options.enums === String ? 'NORMAL' : 0; - object.base_keyspace = ''; + object.sharding_column_name = ""; + object.sharding_column_type = options.enums === String ? "UNSET" : 0; + object.keyspace_type = options.enums === String ? "NORMAL" : 0; + object.base_keyspace = ""; object.snapshot_time = null; } - if (message.sharding_column_name != null && message.hasOwnProperty('sharding_column_name')) + if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) object.sharding_column_name = message.sharding_column_name; - if (message.sharding_column_type != null && message.hasOwnProperty('sharding_column_type')) - object.sharding_column_type = - options.enums === String - ? $root.topodata.KeyspaceIdType[message.sharding_column_type] - : message.sharding_column_type; + if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) + object.sharding_column_type = options.enums === String ? $root.topodata.KeyspaceIdType[message.sharding_column_type] : message.sharding_column_type; if (message.served_froms && message.served_froms.length) { object.served_froms = []; for (var j = 0; j < message.served_froms.length; ++j) - object.served_froms[j] = $root.topodata.Keyspace.ServedFrom.toObject( - message.served_froms[j], - options - ); + object.served_froms[j] = $root.topodata.Keyspace.ServedFrom.toObject(message.served_froms[j], options); } - if (message.keyspace_type != null && message.hasOwnProperty('keyspace_type')) - object.keyspace_type = - options.enums === String - ? $root.topodata.KeyspaceType[message.keyspace_type] - : message.keyspace_type; - if (message.base_keyspace != null && message.hasOwnProperty('base_keyspace')) + if (message.keyspace_type != null && message.hasOwnProperty("keyspace_type")) + object.keyspace_type = options.enums === String ? $root.topodata.KeyspaceType[message.keyspace_type] : message.keyspace_type; + if (message.base_keyspace != null && message.hasOwnProperty("base_keyspace")) object.base_keyspace = message.base_keyspace; - if (message.snapshot_time != null && message.hasOwnProperty('snapshot_time')) + if (message.snapshot_time != null && message.hasOwnProperty("snapshot_time")) object.snapshot_time = $root.vttime.Time.toObject(message.snapshot_time, options); return object; }; @@ -75652,7 +4734,8 @@ $root.binlogdata = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Keyspace.ServedFrom = (function () { + Keyspace.ServedFrom = (function() { + /** * Properties of a ServedFrom. * @memberof topodata.Keyspace @@ -75674,7 +4757,8 @@ $root.binlogdata = (function() { this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -75699,7 +4783,7 @@ $root.binlogdata = (function() { * @memberof topodata.Keyspace.ServedFrom * @instance */ - ServedFrom.prototype.keyspace = ''; + ServedFrom.prototype.keyspace = ""; /** * Creates a new ServedFrom instance using the specified properties. @@ -75723,14 +4807,15 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ ServedFrom.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, 'tablet_type')) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.tablet_type); + if (!writer) + writer = $Writer.create(); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); if (message.cells != null && message.cells.length) for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.cells[i]); - if (message.keyspace != null && Object.hasOwnProperty.call(message, 'keyspace')) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.keyspace); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyspace); return writer; }; @@ -75759,25 +4844,26 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServedFrom.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.Keyspace.ServedFrom(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.Keyspace.ServedFrom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - if (!(message.cells && message.cells.length)) message.cells = []; - message.cells.push(reader.string()); - break; - case 3: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tablet_type = reader.int32(); + break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + case 3: + message.keyspace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -75794,7 +4880,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServedFrom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -75807,30 +4894,34 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ServedFrom.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) switch (message.tablet_type) { - default: - return 'tablet_type: enum value expected'; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - if (message.cells != null && message.hasOwnProperty('cells')) { - if (!Array.isArray(message.cells)) return 'cells: array expected'; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) return 'cells: string[] expected'; + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; } - if (message.keyspace != null && message.hasOwnProperty('keyspace')) - if (!$util.isString(message.keyspace)) return 'keyspace: string expected'; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; return null; }; @@ -75843,57 +4934,60 @@ $root.binlogdata = (function() { * @returns {topodata.Keyspace.ServedFrom} ServedFrom */ ServedFrom.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.Keyspace.ServedFrom) return object; + if (object instanceof $root.topodata.Keyspace.ServedFrom) + return object; var message = new $root.topodata.Keyspace.ServedFrom(); switch (object.tablet_type) { - case 'UNKNOWN': - case 0: - message.tablet_type = 0; - break; - case 'MASTER': - case 1: - message.tablet_type = 1; - break; - case 'REPLICA': - case 2: - message.tablet_type = 2; - break; - case 'RDONLY': - case 3: - message.tablet_type = 3; - break; - case 'BATCH': - case 3: - message.tablet_type = 3; - break; - case 'SPARE': - case 4: - message.tablet_type = 4; - break; - case 'EXPERIMENTAL': - case 5: - message.tablet_type = 5; - break; - case 'BACKUP': - case 6: - message.tablet_type = 6; - break; - case 'RESTORE': - case 7: - message.tablet_type = 7; - break; - case 'DRAINED': - case 8: - message.tablet_type = 8; - break; + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; } if (object.cells) { if (!Array.isArray(object.cells)) - throw TypeError('.topodata.Keyspace.ServedFrom.cells: array expected'); + throw TypeError(".topodata.Keyspace.ServedFrom.cells: array expected"); message.cells = []; - for (var i = 0; i < object.cells.length; ++i) message.cells[i] = String(object.cells[i]); + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); } - if (object.keyspace != null) message.keyspace = String(object.keyspace); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); return message; }; @@ -75907,21 +5001,24 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ ServedFrom.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.cells = []; + if (options.arrays || options.defaults) + object.cells = []; if (options.defaults) { - object.tablet_type = options.enums === String ? 'UNKNOWN' : 0; - object.keyspace = ''; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + object.keyspace = ""; } - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) - object.tablet_type = - options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; if (message.cells && message.cells.length) { object.cells = []; - for (var j = 0; j < message.cells.length; ++j) object.cells[j] = message.cells[j]; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } - if (message.keyspace != null && message.hasOwnProperty('keyspace')) object.keyspace = message.keyspace; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; return object; }; @@ -75942,7 +5039,8 @@ $root.binlogdata = (function() { return Keyspace; })(); - topodata.ShardReplication = (function () { + topodata.ShardReplication = (function() { + /** * Properties of a ShardReplication. * @memberof topodata @@ -75962,7 +5060,8 @@ $root.binlogdata = (function() { this.nodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -75995,13 +5094,11 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ ShardReplication.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); + if (!writer) + writer = $Writer.create(); if (message.nodes != null && message.nodes.length) for (var i = 0; i < message.nodes.length; ++i) - $root.topodata.ShardReplication.Node.encode( - message.nodes[i], - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); + $root.topodata.ShardReplication.Node.encode(message.nodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -76030,19 +5127,20 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShardReplication.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.ShardReplication(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardReplication(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.nodes && message.nodes.length)) message.nodes = []; - message.nodes.push($root.topodata.ShardReplication.Node.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.topodata.ShardReplication.Node.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -76059,7 +5157,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShardReplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -76072,12 +5171,15 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ShardReplication.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.nodes != null && message.hasOwnProperty('nodes')) { - if (!Array.isArray(message.nodes)) return 'nodes: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodes != null && message.hasOwnProperty("nodes")) { + if (!Array.isArray(message.nodes)) + return "nodes: array expected"; for (var i = 0; i < message.nodes.length; ++i) { var error = $root.topodata.ShardReplication.Node.verify(message.nodes[i]); - if (error) return 'nodes.' + error; + if (error) + return "nodes." + error; } } return null; @@ -76092,14 +5194,16 @@ $root.binlogdata = (function() { * @returns {topodata.ShardReplication} ShardReplication */ ShardReplication.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardReplication) return object; + if (object instanceof $root.topodata.ShardReplication) + return object; var message = new $root.topodata.ShardReplication(); if (object.nodes) { - if (!Array.isArray(object.nodes)) throw TypeError('.topodata.ShardReplication.nodes: array expected'); + if (!Array.isArray(object.nodes)) + throw TypeError(".topodata.ShardReplication.nodes: array expected"); message.nodes = []; for (var i = 0; i < object.nodes.length; ++i) { - if (typeof object.nodes[i] !== 'object') - throw TypeError('.topodata.ShardReplication.nodes: object expected'); + if (typeof object.nodes[i] !== "object") + throw TypeError(".topodata.ShardReplication.nodes: object expected"); message.nodes[i] = $root.topodata.ShardReplication.Node.fromObject(object.nodes[i]); } } @@ -76116,9 +5220,11 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ ShardReplication.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.nodes = []; + if (options.arrays || options.defaults) + object.nodes = []; if (message.nodes && message.nodes.length) { object.nodes = []; for (var j = 0; j < message.nodes.length; ++j) @@ -76138,7 +5244,8 @@ $root.binlogdata = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ShardReplication.Node = (function () { + ShardReplication.Node = (function() { + /** * Properties of a Node. * @memberof topodata.ShardReplication @@ -76157,7 +5264,8 @@ $root.binlogdata = (function() { function Node(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -76190,12 +5298,10 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ Node.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.tablet_alias != null && Object.hasOwnProperty.call(message, 'tablet_alias')) - $root.topodata.TabletAlias.encode( - message.tablet_alias, - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); + if (!writer) + writer = $Writer.create(); + if (message.tablet_alias != null && Object.hasOwnProperty.call(message, "tablet_alias")) + $root.topodata.TabletAlias.encode(message.tablet_alias, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -76224,18 +5330,18 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Node.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.ShardReplication.Node(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardReplication.Node(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tablet_alias = $root.topodata.TabletAlias.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -76252,7 +5358,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Node.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -76265,10 +5372,12 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Node.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.tablet_alias != null && message.hasOwnProperty('tablet_alias')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) { var error = $root.topodata.TabletAlias.verify(message.tablet_alias); - if (error) return 'tablet_alias.' + error; + if (error) + return "tablet_alias." + error; } return null; }; @@ -76282,11 +5391,12 @@ $root.binlogdata = (function() { * @returns {topodata.ShardReplication.Node} Node */ Node.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardReplication.Node) return object; + if (object instanceof $root.topodata.ShardReplication.Node) + return object; var message = new $root.topodata.ShardReplication.Node(); if (object.tablet_alias != null) { - if (typeof object.tablet_alias !== 'object') - throw TypeError('.topodata.ShardReplication.Node.tablet_alias: object expected'); + if (typeof object.tablet_alias !== "object") + throw TypeError(".topodata.ShardReplication.Node.tablet_alias: object expected"); message.tablet_alias = $root.topodata.TabletAlias.fromObject(object.tablet_alias); } return message; @@ -76302,10 +5412,12 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ Node.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; - if (options.defaults) object.tablet_alias = null; - if (message.tablet_alias != null && message.hasOwnProperty('tablet_alias')) + if (options.defaults) + object.tablet_alias = null; + if (message.tablet_alias != null && message.hasOwnProperty("tablet_alias")) object.tablet_alias = $root.topodata.TabletAlias.toObject(message.tablet_alias, options); return object; }; @@ -76327,7 +5439,8 @@ $root.binlogdata = (function() { return ShardReplication; })(); - topodata.ShardReference = (function () { + topodata.ShardReference = (function() { + /** * Properties of a ShardReference. * @memberof topodata @@ -76347,7 +5460,8 @@ $root.binlogdata = (function() { function ShardReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -76356,7 +5470,7 @@ $root.binlogdata = (function() { * @memberof topodata.ShardReference * @instance */ - ShardReference.prototype.name = ''; + ShardReference.prototype.name = ""; /** * ShardReference key_range. @@ -76388,14 +5502,12 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ ShardReference.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, 'name')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); - if (message.key_range != null && Object.hasOwnProperty.call(message, 'key_range')) - $root.topodata.KeyRange.encode( - message.key_range, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim(); + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -76424,21 +5536,21 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShardReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.ShardReference(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -76455,7 +5567,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShardReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -76468,12 +5581,15 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ShardReference.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.name != null && message.hasOwnProperty('name')) - if (!$util.isString(message.name)) return 'name: string expected'; - if (message.key_range != null && message.hasOwnProperty('key_range')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.key_range != null && message.hasOwnProperty("key_range")) { var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) return 'key_range.' + error; + if (error) + return "key_range." + error; } return null; }; @@ -76487,12 +5603,14 @@ $root.binlogdata = (function() { * @returns {topodata.ShardReference} ShardReference */ ShardReference.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardReference) return object; + if (object instanceof $root.topodata.ShardReference) + return object; var message = new $root.topodata.ShardReference(); - if (object.name != null) message.name = String(object.name); + if (object.name != null) + message.name = String(object.name); if (object.key_range != null) { - if (typeof object.key_range !== 'object') - throw TypeError('.topodata.ShardReference.key_range: object expected'); + if (typeof object.key_range !== "object") + throw TypeError(".topodata.ShardReference.key_range: object expected"); message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } return message; @@ -76508,14 +5626,16 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ ShardReference.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.name = ''; + object.name = ""; object.key_range = null; } - if (message.name != null && message.hasOwnProperty('name')) object.name = message.name; - if (message.key_range != null && message.hasOwnProperty('key_range')) + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.key_range != null && message.hasOwnProperty("key_range")) object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); return object; }; @@ -76534,7 +5654,8 @@ $root.binlogdata = (function() { return ShardReference; })(); - topodata.ShardTabletControl = (function () { + topodata.ShardTabletControl = (function() { + /** * Properties of a ShardTabletControl. * @memberof topodata @@ -76555,7 +5676,8 @@ $root.binlogdata = (function() { function ShardTabletControl(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -76564,7 +5686,7 @@ $root.binlogdata = (function() { * @memberof topodata.ShardTabletControl * @instance */ - ShardTabletControl.prototype.name = ''; + ShardTabletControl.prototype.name = ""; /** * ShardTabletControl key_range. @@ -76604,16 +5726,14 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ ShardTabletControl.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, 'name')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); - if (message.key_range != null && Object.hasOwnProperty.call(message, 'key_range')) - $root.topodata.KeyRange.encode( - message.key_range, - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim(); - if (message.query_service_disabled != null && Object.hasOwnProperty.call(message, 'query_service_disabled')) - writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.query_service_disabled); + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.key_range != null && Object.hasOwnProperty.call(message, "key_range")) + $root.topodata.KeyRange.encode(message.key_range, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.query_service_disabled != null && Object.hasOwnProperty.call(message, "query_service_disabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.query_service_disabled); return writer; }; @@ -76642,24 +5762,24 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShardTabletControl.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.ShardTabletControl(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.ShardTabletControl(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); - break; - case 3: - message.query_service_disabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.key_range = $root.topodata.KeyRange.decode(reader, reader.uint32()); + break; + case 3: + message.query_service_disabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -76676,7 +5796,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ShardTabletControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -76689,16 +5810,19 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ShardTabletControl.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.name != null && message.hasOwnProperty('name')) - if (!$util.isString(message.name)) return 'name: string expected'; - if (message.key_range != null && message.hasOwnProperty('key_range')) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.key_range != null && message.hasOwnProperty("key_range")) { var error = $root.topodata.KeyRange.verify(message.key_range); - if (error) return 'key_range.' + error; + if (error) + return "key_range." + error; } - if (message.query_service_disabled != null && message.hasOwnProperty('query_service_disabled')) - if (typeof message.query_service_disabled !== 'boolean') - return 'query_service_disabled: boolean expected'; + if (message.query_service_disabled != null && message.hasOwnProperty("query_service_disabled")) + if (typeof message.query_service_disabled !== "boolean") + return "query_service_disabled: boolean expected"; return null; }; @@ -76711,12 +5835,14 @@ $root.binlogdata = (function() { * @returns {topodata.ShardTabletControl} ShardTabletControl */ ShardTabletControl.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.ShardTabletControl) return object; + if (object instanceof $root.topodata.ShardTabletControl) + return object; var message = new $root.topodata.ShardTabletControl(); - if (object.name != null) message.name = String(object.name); + if (object.name != null) + message.name = String(object.name); if (object.key_range != null) { - if (typeof object.key_range !== 'object') - throw TypeError('.topodata.ShardTabletControl.key_range: object expected'); + if (typeof object.key_range !== "object") + throw TypeError(".topodata.ShardTabletControl.key_range: object expected"); message.key_range = $root.topodata.KeyRange.fromObject(object.key_range); } if (object.query_service_disabled != null) @@ -76734,17 +5860,19 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ ShardTabletControl.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.name = ''; + object.name = ""; object.key_range = null; object.query_service_disabled = false; } - if (message.name != null && message.hasOwnProperty('name')) object.name = message.name; - if (message.key_range != null && message.hasOwnProperty('key_range')) + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.key_range != null && message.hasOwnProperty("key_range")) object.key_range = $root.topodata.KeyRange.toObject(message.key_range, options); - if (message.query_service_disabled != null && message.hasOwnProperty('query_service_disabled')) + if (message.query_service_disabled != null && message.hasOwnProperty("query_service_disabled")) object.query_service_disabled = message.query_service_disabled; return object; }; @@ -76763,7 +5891,8 @@ $root.binlogdata = (function() { return ShardTabletControl; })(); - topodata.SrvKeyspace = (function () { + topodata.SrvKeyspace = (function() { + /** * Properties of a SrvKeyspace. * @memberof topodata @@ -76787,7 +5916,8 @@ $root.binlogdata = (function() { this.served_from = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -76804,7 +5934,7 @@ $root.binlogdata = (function() { * @memberof topodata.SrvKeyspace * @instance */ - SrvKeyspace.prototype.sharding_column_name = ''; + SrvKeyspace.prototype.sharding_column_name = ""; /** * SrvKeyspace sharding_column_type. @@ -76844,23 +5974,18 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ SrvKeyspace.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); + if (!writer) + writer = $Writer.create(); if (message.partitions != null && message.partitions.length) for (var i = 0; i < message.partitions.length; ++i) - $root.topodata.SrvKeyspace.KeyspacePartition.encode( - message.partitions[i], - writer.uint32(/* id 1, wireType 2 =*/ 10).fork() - ).ldelim(); - if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, 'sharding_column_name')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.sharding_column_name); - if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, 'sharding_column_type')) - writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.sharding_column_type); + $root.topodata.SrvKeyspace.KeyspacePartition.encode(message.partitions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sharding_column_name != null && Object.hasOwnProperty.call(message, "sharding_column_name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sharding_column_name); + if (message.sharding_column_type != null && Object.hasOwnProperty.call(message, "sharding_column_type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sharding_column_type); if (message.served_from != null && message.served_from.length) for (var i = 0; i < message.served_from.length; ++i) - $root.topodata.SrvKeyspace.ServedFrom.encode( - message.served_from[i], - writer.uint32(/* id 4, wireType 2 =*/ 34).fork() - ).ldelim(); + $root.topodata.SrvKeyspace.ServedFrom.encode(message.served_from[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -76889,31 +6014,31 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SrvKeyspace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.SrvKeyspace(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.SrvKeyspace(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.partitions && message.partitions.length)) message.partitions = []; - message.partitions.push( - $root.topodata.SrvKeyspace.KeyspacePartition.decode(reader, reader.uint32()) - ); - break; - case 2: - message.sharding_column_name = reader.string(); - break; - case 3: - message.sharding_column_type = reader.int32(); - break; - case 4: - if (!(message.served_from && message.served_from.length)) message.served_from = []; - message.served_from.push($root.topodata.SrvKeyspace.ServedFrom.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.topodata.SrvKeyspace.KeyspacePartition.decode(reader, reader.uint32())); + break; + case 2: + message.sharding_column_name = reader.string(); + break; + case 3: + message.sharding_column_type = reader.int32(); + break; + case 4: + if (!(message.served_from && message.served_from.length)) + message.served_from = []; + message.served_from.push($root.topodata.SrvKeyspace.ServedFrom.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -76930,7 +6055,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SrvKeyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -76943,30 +6069,36 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SrvKeyspace.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.partitions != null && message.hasOwnProperty('partitions')) { - if (!Array.isArray(message.partitions)) return 'partitions: array expected'; + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partitions != null && message.hasOwnProperty("partitions")) { + if (!Array.isArray(message.partitions)) + return "partitions: array expected"; for (var i = 0; i < message.partitions.length; ++i) { var error = $root.topodata.SrvKeyspace.KeyspacePartition.verify(message.partitions[i]); - if (error) return 'partitions.' + error; + if (error) + return "partitions." + error; } } - if (message.sharding_column_name != null && message.hasOwnProperty('sharding_column_name')) - if (!$util.isString(message.sharding_column_name)) return 'sharding_column_name: string expected'; - if (message.sharding_column_type != null && message.hasOwnProperty('sharding_column_type')) + if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) + if (!$util.isString(message.sharding_column_name)) + return "sharding_column_name: string expected"; + if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) switch (message.sharding_column_type) { - default: - return 'sharding_column_type: enum value expected'; - case 0: - case 1: - case 2: - break; + default: + return "sharding_column_type: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.served_from != null && message.hasOwnProperty('served_from')) { - if (!Array.isArray(message.served_from)) return 'served_from: array expected'; + if (message.served_from != null && message.hasOwnProperty("served_from")) { + if (!Array.isArray(message.served_from)) + return "served_from: array expected"; for (var i = 0; i < message.served_from.length; ++i) { var error = $root.topodata.SrvKeyspace.ServedFrom.verify(message.served_from[i]); - if (error) return 'served_from.' + error; + if (error) + return "served_from." + error; } } return null; @@ -76981,42 +6113,42 @@ $root.binlogdata = (function() { * @returns {topodata.SrvKeyspace} SrvKeyspace */ SrvKeyspace.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.SrvKeyspace) return object; + if (object instanceof $root.topodata.SrvKeyspace) + return object; var message = new $root.topodata.SrvKeyspace(); if (object.partitions) { if (!Array.isArray(object.partitions)) - throw TypeError('.topodata.SrvKeyspace.partitions: array expected'); + throw TypeError(".topodata.SrvKeyspace.partitions: array expected"); message.partitions = []; for (var i = 0; i < object.partitions.length; ++i) { - if (typeof object.partitions[i] !== 'object') - throw TypeError('.topodata.SrvKeyspace.partitions: object expected'); - message.partitions[i] = $root.topodata.SrvKeyspace.KeyspacePartition.fromObject( - object.partitions[i] - ); + if (typeof object.partitions[i] !== "object") + throw TypeError(".topodata.SrvKeyspace.partitions: object expected"); + message.partitions[i] = $root.topodata.SrvKeyspace.KeyspacePartition.fromObject(object.partitions[i]); } } - if (object.sharding_column_name != null) message.sharding_column_name = String(object.sharding_column_name); + if (object.sharding_column_name != null) + message.sharding_column_name = String(object.sharding_column_name); switch (object.sharding_column_type) { - case 'UNSET': - case 0: - message.sharding_column_type = 0; - break; - case 'UINT64': - case 1: - message.sharding_column_type = 1; - break; - case 'BYTES': - case 2: - message.sharding_column_type = 2; - break; + case "UNSET": + case 0: + message.sharding_column_type = 0; + break; + case "UINT64": + case 1: + message.sharding_column_type = 1; + break; + case "BYTES": + case 2: + message.sharding_column_type = 2; + break; } if (object.served_from) { if (!Array.isArray(object.served_from)) - throw TypeError('.topodata.SrvKeyspace.served_from: array expected'); + throw TypeError(".topodata.SrvKeyspace.served_from: array expected"); message.served_from = []; for (var i = 0; i < object.served_from.length; ++i) { - if (typeof object.served_from[i] !== 'object') - throw TypeError('.topodata.SrvKeyspace.served_from: object expected'); + if (typeof object.served_from[i] !== "object") + throw TypeError(".topodata.SrvKeyspace.served_from: object expected"); message.served_from[i] = $root.topodata.SrvKeyspace.ServedFrom.fromObject(object.served_from[i]); } } @@ -77033,38 +6165,30 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ SrvKeyspace.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.arrays || options.defaults) { object.partitions = []; object.served_from = []; } if (options.defaults) { - object.sharding_column_name = ''; - object.sharding_column_type = options.enums === String ? 'UNSET' : 0; + object.sharding_column_name = ""; + object.sharding_column_type = options.enums === String ? "UNSET" : 0; } if (message.partitions && message.partitions.length) { object.partitions = []; for (var j = 0; j < message.partitions.length; ++j) - object.partitions[j] = $root.topodata.SrvKeyspace.KeyspacePartition.toObject( - message.partitions[j], - options - ); + object.partitions[j] = $root.topodata.SrvKeyspace.KeyspacePartition.toObject(message.partitions[j], options); } - if (message.sharding_column_name != null && message.hasOwnProperty('sharding_column_name')) + if (message.sharding_column_name != null && message.hasOwnProperty("sharding_column_name")) object.sharding_column_name = message.sharding_column_name; - if (message.sharding_column_type != null && message.hasOwnProperty('sharding_column_type')) - object.sharding_column_type = - options.enums === String - ? $root.topodata.KeyspaceIdType[message.sharding_column_type] - : message.sharding_column_type; + if (message.sharding_column_type != null && message.hasOwnProperty("sharding_column_type")) + object.sharding_column_type = options.enums === String ? $root.topodata.KeyspaceIdType[message.sharding_column_type] : message.sharding_column_type; if (message.served_from && message.served_from.length) { object.served_from = []; for (var j = 0; j < message.served_from.length; ++j) - object.served_from[j] = $root.topodata.SrvKeyspace.ServedFrom.toObject( - message.served_from[j], - options - ); + object.served_from[j] = $root.topodata.SrvKeyspace.ServedFrom.toObject(message.served_from[j], options); } return object; }; @@ -77080,7 +6204,8 @@ $root.binlogdata = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SrvKeyspace.KeyspacePartition = (function () { + SrvKeyspace.KeyspacePartition = (function() { + /** * Properties of a KeyspacePartition. * @memberof topodata.SrvKeyspace @@ -77103,7 +6228,8 @@ $root.binlogdata = (function() { this.shard_tablet_controls = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -77152,21 +6278,16 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ KeyspacePartition.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.served_type != null && Object.hasOwnProperty.call(message, 'served_type')) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.served_type); + if (!writer) + writer = $Writer.create(); + if (message.served_type != null && Object.hasOwnProperty.call(message, "served_type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.served_type); if (message.shard_references != null && message.shard_references.length) for (var i = 0; i < message.shard_references.length; ++i) - $root.topodata.ShardReference.encode( - message.shard_references[i], - writer.uint32(/* id 2, wireType 2 =*/ 18).fork() - ).ldelim(); + $root.topodata.ShardReference.encode(message.shard_references[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.shard_tablet_controls != null && message.shard_tablet_controls.length) for (var i = 0; i < message.shard_tablet_controls.length; ++i) - $root.topodata.ShardTabletControl.encode( - message.shard_tablet_controls[i], - writer.uint32(/* id 3, wireType 2 =*/ 26).fork() - ).ldelim(); + $root.topodata.ShardTabletControl.encode(message.shard_tablet_controls[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -77195,32 +6316,28 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ KeyspacePartition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.SrvKeyspace.KeyspacePartition(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.SrvKeyspace.KeyspacePartition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.served_type = reader.int32(); - break; - case 2: - if (!(message.shard_references && message.shard_references.length)) - message.shard_references = []; - message.shard_references.push( - $root.topodata.ShardReference.decode(reader, reader.uint32()) - ); - break; - case 3: - if (!(message.shard_tablet_controls && message.shard_tablet_controls.length)) - message.shard_tablet_controls = []; - message.shard_tablet_controls.push( - $root.topodata.ShardTabletControl.decode(reader, reader.uint32()) - ); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.served_type = reader.int32(); + break; + case 2: + if (!(message.shard_references && message.shard_references.length)) + message.shard_references = []; + message.shard_references.push($root.topodata.ShardReference.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.shard_tablet_controls && message.shard_tablet_controls.length)) + message.shard_tablet_controls = []; + message.shard_tablet_controls.push($root.topodata.ShardTabletControl.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -77237,7 +6354,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ KeyspacePartition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -77250,35 +6368,40 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ KeyspacePartition.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.served_type != null && message.hasOwnProperty('served_type')) + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.served_type != null && message.hasOwnProperty("served_type")) switch (message.served_type) { - default: - return 'served_type: enum value expected'; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + default: + return "served_type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - if (message.shard_references != null && message.hasOwnProperty('shard_references')) { - if (!Array.isArray(message.shard_references)) return 'shard_references: array expected'; + if (message.shard_references != null && message.hasOwnProperty("shard_references")) { + if (!Array.isArray(message.shard_references)) + return "shard_references: array expected"; for (var i = 0; i < message.shard_references.length; ++i) { var error = $root.topodata.ShardReference.verify(message.shard_references[i]); - if (error) return 'shard_references.' + error; + if (error) + return "shard_references." + error; } } - if (message.shard_tablet_controls != null && message.hasOwnProperty('shard_tablet_controls')) { - if (!Array.isArray(message.shard_tablet_controls)) return 'shard_tablet_controls: array expected'; + if (message.shard_tablet_controls != null && message.hasOwnProperty("shard_tablet_controls")) { + if (!Array.isArray(message.shard_tablet_controls)) + return "shard_tablet_controls: array expected"; for (var i = 0; i < message.shard_tablet_controls.length; ++i) { var error = $root.topodata.ShardTabletControl.verify(message.shard_tablet_controls[i]); - if (error) return 'shard_tablet_controls.' + error; + if (error) + return "shard_tablet_controls." + error; } } return null; @@ -77293,78 +6416,69 @@ $root.binlogdata = (function() { * @returns {topodata.SrvKeyspace.KeyspacePartition} KeyspacePartition */ KeyspacePartition.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.SrvKeyspace.KeyspacePartition) return object; + if (object instanceof $root.topodata.SrvKeyspace.KeyspacePartition) + return object; var message = new $root.topodata.SrvKeyspace.KeyspacePartition(); switch (object.served_type) { - case 'UNKNOWN': - case 0: - message.served_type = 0; - break; - case 'MASTER': - case 1: - message.served_type = 1; - break; - case 'REPLICA': - case 2: - message.served_type = 2; - break; - case 'RDONLY': - case 3: - message.served_type = 3; - break; - case 'BATCH': - case 3: - message.served_type = 3; - break; - case 'SPARE': - case 4: - message.served_type = 4; - break; - case 'EXPERIMENTAL': - case 5: - message.served_type = 5; - break; - case 'BACKUP': - case 6: - message.served_type = 6; - break; - case 'RESTORE': - case 7: - message.served_type = 7; - break; - case 'DRAINED': - case 8: - message.served_type = 8; - break; + case "UNKNOWN": + case 0: + message.served_type = 0; + break; + case "MASTER": + case 1: + message.served_type = 1; + break; + case "REPLICA": + case 2: + message.served_type = 2; + break; + case "RDONLY": + case 3: + message.served_type = 3; + break; + case "BATCH": + case 3: + message.served_type = 3; + break; + case "SPARE": + case 4: + message.served_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.served_type = 5; + break; + case "BACKUP": + case 6: + message.served_type = 6; + break; + case "RESTORE": + case 7: + message.served_type = 7; + break; + case "DRAINED": + case 8: + message.served_type = 8; + break; } if (object.shard_references) { if (!Array.isArray(object.shard_references)) - throw TypeError('.topodata.SrvKeyspace.KeyspacePartition.shard_references: array expected'); + throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_references: array expected"); message.shard_references = []; for (var i = 0; i < object.shard_references.length; ++i) { - if (typeof object.shard_references[i] !== 'object') - throw TypeError( - '.topodata.SrvKeyspace.KeyspacePartition.shard_references: object expected' - ); - message.shard_references[i] = $root.topodata.ShardReference.fromObject( - object.shard_references[i] - ); + if (typeof object.shard_references[i] !== "object") + throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_references: object expected"); + message.shard_references[i] = $root.topodata.ShardReference.fromObject(object.shard_references[i]); } } if (object.shard_tablet_controls) { if (!Array.isArray(object.shard_tablet_controls)) - throw TypeError( - '.topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls: array expected' - ); + throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls: array expected"); message.shard_tablet_controls = []; for (var i = 0; i < object.shard_tablet_controls.length; ++i) { - if (typeof object.shard_tablet_controls[i] !== 'object') - throw TypeError( - '.topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls: object expected' - ); - message.shard_tablet_controls[i] = $root.topodata.ShardTabletControl.fromObject( - object.shard_tablet_controls[i] - ); + if (typeof object.shard_tablet_controls[i] !== "object") + throw TypeError(".topodata.SrvKeyspace.KeyspacePartition.shard_tablet_controls: object expected"); + message.shard_tablet_controls[i] = $root.topodata.ShardTabletControl.fromObject(object.shard_tablet_controls[i]); } } return message; @@ -77380,31 +6494,26 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ KeyspacePartition.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.arrays || options.defaults) { object.shard_references = []; object.shard_tablet_controls = []; } - if (options.defaults) object.served_type = options.enums === String ? 'UNKNOWN' : 0; - if (message.served_type != null && message.hasOwnProperty('served_type')) - object.served_type = - options.enums === String ? $root.topodata.TabletType[message.served_type] : message.served_type; + if (options.defaults) + object.served_type = options.enums === String ? "UNKNOWN" : 0; + if (message.served_type != null && message.hasOwnProperty("served_type")) + object.served_type = options.enums === String ? $root.topodata.TabletType[message.served_type] : message.served_type; if (message.shard_references && message.shard_references.length) { object.shard_references = []; for (var j = 0; j < message.shard_references.length; ++j) - object.shard_references[j] = $root.topodata.ShardReference.toObject( - message.shard_references[j], - options - ); + object.shard_references[j] = $root.topodata.ShardReference.toObject(message.shard_references[j], options); } if (message.shard_tablet_controls && message.shard_tablet_controls.length) { object.shard_tablet_controls = []; for (var j = 0; j < message.shard_tablet_controls.length; ++j) - object.shard_tablet_controls[j] = $root.topodata.ShardTabletControl.toObject( - message.shard_tablet_controls[j], - options - ); + object.shard_tablet_controls[j] = $root.topodata.ShardTabletControl.toObject(message.shard_tablet_controls[j], options); } return object; }; @@ -77423,7 +6532,8 @@ $root.binlogdata = (function() { return KeyspacePartition; })(); - SrvKeyspace.ServedFrom = (function () { + SrvKeyspace.ServedFrom = (function() { + /** * Properties of a ServedFrom. * @memberof topodata.SrvKeyspace @@ -77443,7 +6553,8 @@ $root.binlogdata = (function() { function ServedFrom(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -77460,7 +6571,7 @@ $root.binlogdata = (function() { * @memberof topodata.SrvKeyspace.ServedFrom * @instance */ - ServedFrom.prototype.keyspace = ''; + ServedFrom.prototype.keyspace = ""; /** * Creates a new ServedFrom instance using the specified properties. @@ -77484,11 +6595,12 @@ $root.binlogdata = (function() { * @returns {$protobuf.Writer} Writer */ ServedFrom.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.tablet_type != null && Object.hasOwnProperty.call(message, 'tablet_type')) - writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.tablet_type); - if (message.keyspace != null && Object.hasOwnProperty.call(message, 'keyspace')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.keyspace); + if (!writer) + writer = $Writer.create(); + if (message.tablet_type != null && Object.hasOwnProperty.call(message, "tablet_type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tablet_type); + if (message.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); return writer; }; @@ -77517,21 +6629,21 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServedFrom.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.SrvKeyspace.ServedFrom(); + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.SrvKeyspace.ServedFrom(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.tablet_type = reader.int32(); - break; - case 2: - message.keyspace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.tablet_type = reader.int32(); + break; + case 2: + message.keyspace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; @@ -77548,7 +6660,8 @@ $root.binlogdata = (function() { * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServedFrom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; @@ -77561,25 +6674,27 @@ $root.binlogdata = (function() { * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ServedFrom.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) switch (message.tablet_type) { - default: - return 'tablet_type: enum value expected'; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + default: + return "tablet_type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; } - if (message.keyspace != null && message.hasOwnProperty('keyspace')) - if (!$util.isString(message.keyspace)) return 'keyspace: string expected'; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: string expected"; return null; }; @@ -77592,51 +6707,53 @@ $root.binlogdata = (function() { * @returns {topodata.SrvKeyspace.ServedFrom} ServedFrom */ ServedFrom.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.SrvKeyspace.ServedFrom) return object; + if (object instanceof $root.topodata.SrvKeyspace.ServedFrom) + return object; var message = new $root.topodata.SrvKeyspace.ServedFrom(); switch (object.tablet_type) { - case 'UNKNOWN': - case 0: - message.tablet_type = 0; - break; - case 'MASTER': - case 1: - message.tablet_type = 1; - break; - case 'REPLICA': - case 2: - message.tablet_type = 2; - break; - case 'RDONLY': - case 3: - message.tablet_type = 3; - break; - case 'BATCH': - case 3: - message.tablet_type = 3; - break; - case 'SPARE': - case 4: - message.tablet_type = 4; - break; - case 'EXPERIMENTAL': - case 5: - message.tablet_type = 5; - break; - case 'BACKUP': - case 6: - message.tablet_type = 6; - break; - case 'RESTORE': - case 7: - message.tablet_type = 7; - break; - case 'DRAINED': - case 8: - message.tablet_type = 8; - break; + case "UNKNOWN": + case 0: + message.tablet_type = 0; + break; + case "MASTER": + case 1: + message.tablet_type = 1; + break; + case "REPLICA": + case 2: + message.tablet_type = 2; + break; + case "RDONLY": + case 3: + message.tablet_type = 3; + break; + case "BATCH": + case 3: + message.tablet_type = 3; + break; + case "SPARE": + case 4: + message.tablet_type = 4; + break; + case "EXPERIMENTAL": + case 5: + message.tablet_type = 5; + break; + case "BACKUP": + case 6: + message.tablet_type = 6; + break; + case "RESTORE": + case 7: + message.tablet_type = 7; + break; + case "DRAINED": + case 8: + message.tablet_type = 8; + break; } - if (object.keyspace != null) message.keyspace = String(object.keyspace); + if (object.keyspace != null) + message.keyspace = String(object.keyspace); return message; }; @@ -77650,16 +6767,17 @@ $root.binlogdata = (function() { * @returns {Object.} Plain object */ ServedFrom.toObject = function toObject(message, options) { - if (!options) options = {}; + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.tablet_type = options.enums === String ? 'UNKNOWN' : 0; - object.keyspace = ''; + object.tablet_type = options.enums === String ? "UNKNOWN" : 0; + object.keyspace = ""; } - if (message.tablet_type != null && message.hasOwnProperty('tablet_type')) - object.tablet_type = - options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; - if (message.keyspace != null && message.hasOwnProperty('keyspace')) object.keyspace = message.keyspace; + if (message.tablet_type != null && message.hasOwnProperty("tablet_type")) + object.tablet_type = options.enums === String ? $root.topodata.TabletType[message.tablet_type] : message.tablet_type; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; return object; }; @@ -77680,7 +6798,8 @@ $root.binlogdata = (function() { return SrvKeyspace; })(); - topodata.CellInfo = (function () { + topodata.CellInfo = (function() { + /** * Properties of a CellInfo. * @memberof topodata @@ -77700,7 +6819,8 @@ $root.binlogdata = (function() { function CellInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** @@ -77709,7 +6829,7 @@ $root.binlogdata = (function() { * @memberof topodata.CellInfo * @instance */ - CellInfo.prototype.server_address = ''; + CellInfo.prototype.server_address = ""; /** * CellInfo root. @@ -77717,588 +6837,838 @@ $root.binlogdata = (function() { * @memberof topodata.CellInfo * @instance */ - CellInfo.prototype.root = ''; + CellInfo.prototype.root = ""; + + /** + * Creates a new CellInfo instance using the specified properties. + * @function create + * @memberof topodata.CellInfo + * @static + * @param {topodata.ICellInfo=} [properties] Properties to set + * @returns {topodata.CellInfo} CellInfo instance + */ + CellInfo.create = function create(properties) { + return new CellInfo(properties); + }; + + /** + * Encodes the specified CellInfo message. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. + * @function encode + * @memberof topodata.CellInfo + * @static + * @param {topodata.ICellInfo} message CellInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CellInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.server_address != null && Object.hasOwnProperty.call(message, "server_address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.server_address); + if (message.root != null && Object.hasOwnProperty.call(message, "root")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.root); + return writer; + }; + + /** + * Encodes the specified CellInfo message, length delimited. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof topodata.CellInfo + * @static + * @param {topodata.ICellInfo} message CellInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CellInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CellInfo message from the specified reader or buffer. + * @function decode + * @memberof topodata.CellInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {topodata.CellInfo} CellInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CellInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.CellInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.server_address = reader.string(); + break; + case 2: + message.root = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CellInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof topodata.CellInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {topodata.CellInfo} CellInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CellInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CellInfo message. + * @function verify + * @memberof topodata.CellInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CellInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.server_address != null && message.hasOwnProperty("server_address")) + if (!$util.isString(message.server_address)) + return "server_address: string expected"; + if (message.root != null && message.hasOwnProperty("root")) + if (!$util.isString(message.root)) + return "root: string expected"; + return null; + }; + + /** + * Creates a CellInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof topodata.CellInfo + * @static + * @param {Object.} object Plain object + * @returns {topodata.CellInfo} CellInfo + */ + CellInfo.fromObject = function fromObject(object) { + if (object instanceof $root.topodata.CellInfo) + return object; + var message = new $root.topodata.CellInfo(); + if (object.server_address != null) + message.server_address = String(object.server_address); + if (object.root != null) + message.root = String(object.root); + return message; + }; + + /** + * Creates a plain object from a CellInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof topodata.CellInfo + * @static + * @param {topodata.CellInfo} message CellInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CellInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.server_address = ""; + object.root = ""; + } + if (message.server_address != null && message.hasOwnProperty("server_address")) + object.server_address = message.server_address; + if (message.root != null && message.hasOwnProperty("root")) + object.root = message.root; + return object; + }; + + /** + * Converts this CellInfo to JSON. + * @function toJSON + * @memberof topodata.CellInfo + * @instance + * @returns {Object.} JSON object + */ + CellInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CellInfo; + })(); + + topodata.CellsAlias = (function() { + + /** + * Properties of a CellsAlias. + * @memberof topodata + * @interface ICellsAlias + * @property {Array.|null} [cells] CellsAlias cells + */ + + /** + * Constructs a new CellsAlias. + * @memberof topodata + * @classdesc Represents a CellsAlias. + * @implements ICellsAlias + * @constructor + * @param {topodata.ICellsAlias=} [properties] Properties to set + */ + function CellsAlias(properties) { + this.cells = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CellsAlias cells. + * @member {Array.} cells + * @memberof topodata.CellsAlias + * @instance + */ + CellsAlias.prototype.cells = $util.emptyArray; /** - * Creates a new CellInfo instance using the specified properties. + * Creates a new CellsAlias instance using the specified properties. * @function create - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static - * @param {topodata.ICellInfo=} [properties] Properties to set - * @returns {topodata.CellInfo} CellInfo instance + * @param {topodata.ICellsAlias=} [properties] Properties to set + * @returns {topodata.CellsAlias} CellsAlias instance */ - CellInfo.create = function create(properties) { - return new CellInfo(properties); + CellsAlias.create = function create(properties) { + return new CellsAlias(properties); }; /** - * Encodes the specified CellInfo message. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. + * Encodes the specified CellsAlias message. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. * @function encode - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static - * @param {topodata.ICellInfo} message CellInfo message or plain object to encode + * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellInfo.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.server_address != null && Object.hasOwnProperty.call(message, 'server_address')) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.server_address); - if (message.root != null && Object.hasOwnProperty.call(message, 'root')) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.root); + CellsAlias.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cells[i]); return writer; }; /** - * Encodes the specified CellInfo message, length delimited. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. + * Encodes the specified CellsAlias message, length delimited. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static - * @param {topodata.ICellInfo} message CellInfo message or plain object to encode + * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellInfo.encodeDelimited = function encodeDelimited(message, writer) { + CellsAlias.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CellInfo message from the specified reader or buffer. + * Decodes a CellsAlias message from the specified reader or buffer. * @function decode - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.CellInfo} CellInfo + * @returns {topodata.CellsAlias} CellsAlias * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CellInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.CellInfo(); + CellsAlias.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.topodata.CellsAlias(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.server_address = reader.string(); - break; - case 2: - message.root = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 2: + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a CellInfo message from the specified reader or buffer, length delimited. + * Decodes a CellsAlias message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.CellInfo} CellInfo + * @returns {topodata.CellsAlias} CellsAlias * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CellInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + CellsAlias.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CellInfo message. + * Verifies a CellsAlias message. * @function verify - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CellInfo.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.server_address != null && message.hasOwnProperty('server_address')) - if (!$util.isString(message.server_address)) return 'server_address: string expected'; - if (message.root != null && message.hasOwnProperty('root')) - if (!$util.isString(message.root)) return 'root: string expected'; + CellsAlias.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) + if (!$util.isString(message.cells[i])) + return "cells: string[] expected"; + } return null; }; /** - * Creates a CellInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CellsAlias message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static * @param {Object.} object Plain object - * @returns {topodata.CellInfo} CellInfo + * @returns {topodata.CellsAlias} CellsAlias */ - CellInfo.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.CellInfo) return object; - var message = new $root.topodata.CellInfo(); - if (object.server_address != null) message.server_address = String(object.server_address); - if (object.root != null) message.root = String(object.root); + CellsAlias.fromObject = function fromObject(object) { + if (object instanceof $root.topodata.CellsAlias) + return object; + var message = new $root.topodata.CellsAlias(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".topodata.CellsAlias.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) + message.cells[i] = String(object.cells[i]); + } return message; }; /** - * Creates a plain object from a CellInfo message. Also converts values to other types if specified. + * Creates a plain object from a CellsAlias message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @static - * @param {topodata.CellInfo} message CellInfo + * @param {topodata.CellsAlias} message CellsAlias * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CellInfo.toObject = function toObject(message, options) { - if (!options) options = {}; + CellsAlias.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.defaults) { - object.server_address = ''; - object.root = ''; + if (options.arrays || options.defaults) + object.cells = []; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = message.cells[j]; } - if (message.server_address != null && message.hasOwnProperty('server_address')) - object.server_address = message.server_address; - if (message.root != null && message.hasOwnProperty('root')) object.root = message.root; return object; }; /** - * Converts this CellInfo to JSON. + * Converts this CellsAlias to JSON. * @function toJSON - * @memberof topodata.CellInfo + * @memberof topodata.CellsAlias * @instance * @returns {Object.} JSON object */ - CellInfo.prototype.toJSON = function toJSON() { + CellsAlias.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CellInfo; + return CellsAlias; })(); - topodata.CellsAlias = (function () { + return topodata; +})(); + +$root.vttime = (function() { + + /** + * Namespace vttime. + * @exports vttime + * @namespace + */ + var vttime = {}; + + vttime.Time = (function() { + /** - * Properties of a CellsAlias. - * @memberof topodata - * @interface ICellsAlias - * @property {Array.|null} [cells] CellsAlias cells + * Properties of a Time. + * @memberof vttime + * @interface ITime + * @property {number|Long|null} [seconds] Time seconds + * @property {number|null} [nanoseconds] Time nanoseconds */ /** - * Constructs a new CellsAlias. - * @memberof topodata - * @classdesc Represents a CellsAlias. - * @implements ICellsAlias + * Constructs a new Time. + * @memberof vttime + * @classdesc Represents a Time. + * @implements ITime * @constructor - * @param {topodata.ICellsAlias=} [properties] Properties to set + * @param {vttime.ITime=} [properties] Properties to set */ - function CellsAlias(properties) { - this.cells = []; + function Time(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * CellsAlias cells. - * @member {Array.} cells - * @memberof topodata.CellsAlias + * Time seconds. + * @member {number|Long} seconds + * @memberof vttime.Time * @instance */ - CellsAlias.prototype.cells = $util.emptyArray; + Time.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new CellsAlias instance using the specified properties. + * Time nanoseconds. + * @member {number} nanoseconds + * @memberof vttime.Time + * @instance + */ + Time.prototype.nanoseconds = 0; + + /** + * Creates a new Time instance using the specified properties. * @function create - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static - * @param {topodata.ICellsAlias=} [properties] Properties to set - * @returns {topodata.CellsAlias} CellsAlias instance + * @param {vttime.ITime=} [properties] Properties to set + * @returns {vttime.Time} Time instance */ - CellsAlias.create = function create(properties) { - return new CellsAlias(properties); + Time.create = function create(properties) { + return new Time(properties); }; /** - * Encodes the specified CellsAlias message. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. + * Encodes the specified Time message. Does not implicitly {@link vttime.Time.verify|verify} messages. * @function encode - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static - * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode + * @param {vttime.ITime} message Time message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellsAlias.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.cells[i]); + Time.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanoseconds != null && Object.hasOwnProperty.call(message, "nanoseconds")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanoseconds); return writer; }; /** - * Encodes the specified CellsAlias message, length delimited. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. + * Encodes the specified Time message, length delimited. Does not implicitly {@link vttime.Time.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static - * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode + * @param {vttime.ITime} message Time message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellsAlias.encodeDelimited = function encodeDelimited(message, writer) { + Time.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CellsAlias message from the specified reader or buffer. + * Decodes a Time message from the specified reader or buffer. * @function decode - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.CellsAlias} CellsAlias + * @returns {vttime.Time} Time * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CellsAlias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.topodata.CellsAlias(); + Time.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vttime.Time(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.cells && message.cells.length)) message.cells = []; - message.cells.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanoseconds = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a CellsAlias message from the specified reader or buffer, length delimited. + * Decodes a Time message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.CellsAlias} CellsAlias + * @returns {vttime.Time} Time * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CellsAlias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Time.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CellsAlias message. + * Verifies a Time message. * @function verify - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CellsAlias.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.cells != null && message.hasOwnProperty('cells')) { - if (!Array.isArray(message.cells)) return 'cells: array expected'; - for (var i = 0; i < message.cells.length; ++i) - if (!$util.isString(message.cells[i])) return 'cells: string[] expected'; - } + Time.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanoseconds != null && message.hasOwnProperty("nanoseconds")) + if (!$util.isInteger(message.nanoseconds)) + return "nanoseconds: integer expected"; return null; }; /** - * Creates a CellsAlias message from a plain object. Also converts values to their respective internal types. + * Creates a Time message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static * @param {Object.} object Plain object - * @returns {topodata.CellsAlias} CellsAlias + * @returns {vttime.Time} Time */ - CellsAlias.fromObject = function fromObject(object) { - if (object instanceof $root.topodata.CellsAlias) return object; - var message = new $root.topodata.CellsAlias(); - if (object.cells) { - if (!Array.isArray(object.cells)) throw TypeError('.topodata.CellsAlias.cells: array expected'); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) message.cells[i] = String(object.cells[i]); - } + Time.fromObject = function fromObject(object) { + if (object instanceof $root.vttime.Time) + return object; + var message = new $root.vttime.Time(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanoseconds != null) + message.nanoseconds = object.nanoseconds | 0; return message; }; /** - * Creates a plain object from a CellsAlias message. Also converts values to other types if specified. + * Creates a plain object from a Time message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @static - * @param {topodata.CellsAlias} message CellsAlias + * @param {vttime.Time} message Time * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CellsAlias.toObject = function toObject(message, options) { - if (!options) options = {}; + Time.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.cells = []; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) object.cells[j] = message.cells[j]; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanoseconds = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanoseconds != null && message.hasOwnProperty("nanoseconds")) + object.nanoseconds = message.nanoseconds; return object; }; /** - * Converts this CellsAlias to JSON. + * Converts this Time to JSON. * @function toJSON - * @memberof topodata.CellsAlias + * @memberof vttime.Time * @instance * @returns {Object.} JSON object */ - CellsAlias.prototype.toJSON = function toJSON() { + Time.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CellsAlias; + return Time; })(); - return topodata; -})(); - -$root.vttime = (function () { - /** - * Namespace vttime. - * @exports vttime - * @namespace - */ - var vttime = {}; + vttime.Duration = (function() { - vttime.Time = (function () { /** - * Properties of a Time. + * Properties of a Duration. * @memberof vttime - * @interface ITime - * @property {number|Long|null} [seconds] Time seconds - * @property {number|null} [nanoseconds] Time nanoseconds + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new Time. + * Constructs a new Duration. * @memberof vttime - * @classdesc Represents a Time. - * @implements ITime + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {vttime.ITime=} [properties] Properties to set + * @param {vttime.IDuration=} [properties] Properties to set */ - function Time(properties) { + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * Time seconds. + * Duration seconds. * @member {number|Long} seconds - * @memberof vttime.Time + * @memberof vttime.Duration * @instance */ - Time.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Time nanoseconds. - * @member {number} nanoseconds - * @memberof vttime.Time + * Duration nanos. + * @member {number} nanos + * @memberof vttime.Duration * @instance */ - Time.prototype.nanoseconds = 0; + Duration.prototype.nanos = 0; /** - * Creates a new Time instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof vttime.Time + * @memberof vttime.Duration * @static - * @param {vttime.ITime=} [properties] Properties to set - * @returns {vttime.Time} Time instance + * @param {vttime.IDuration=} [properties] Properties to set + * @returns {vttime.Duration} Duration instance */ - Time.create = function create(properties) { - return new Time(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Time message. Does not implicitly {@link vttime.Time.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link vttime.Duration.verify|verify} messages. * @function encode - * @memberof vttime.Time + * @memberof vttime.Duration * @static - * @param {vttime.ITime} message Time message or plain object to encode + * @param {vttime.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Time.encode = function encode(message, writer) { - if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, 'seconds')) - writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); - if (message.nanoseconds != null && Object.hasOwnProperty.call(message, 'nanoseconds')) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanoseconds); + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified Time message, length delimited. Does not implicitly {@link vttime.Time.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link vttime.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof vttime.Time + * @memberof vttime.Duration * @static - * @param {vttime.ITime} message Time message or plain object to encode + * @param {vttime.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Time.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Time message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof vttime.Time + * @memberof vttime.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vttime.Time} Time + * @returns {vttime.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Time.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, - message = new $root.vttime.Time(); + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.vttime.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanoseconds = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a Time message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vttime.Time + * @memberof vttime.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vttime.Time} Time + * @returns {vttime.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Time.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Time message. + * Verifies a Duration message. * @function verify - * @memberof vttime.Time + * @memberof vttime.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Time.verify = function verify(message) { - if (typeof message !== 'object' || message === null) return 'object expected'; - if (message.seconds != null && message.hasOwnProperty('seconds')) - if ( - !$util.isInteger(message.seconds) && - !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)) - ) - return 'seconds: integer|Long expected'; - if (message.nanoseconds != null && message.hasOwnProperty('nanoseconds')) - if (!$util.isInteger(message.nanoseconds)) return 'nanoseconds: integer expected'; + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a Time message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vttime.Time + * @memberof vttime.Duration * @static * @param {Object.} object Plain object - * @returns {vttime.Time} Time + * @returns {vttime.Duration} Duration */ - Time.fromObject = function fromObject(object) { - if (object instanceof $root.vttime.Time) return object; - var message = new $root.vttime.Time(); + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.vttime.Duration) + return object; + var message = new $root.vttime.Duration(); if (object.seconds != null) - if ($util.Long) (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === 'string') message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === 'number') message.seconds = object.seconds; - else if (typeof object.seconds === 'object') - message.seconds = new $util.LongBits( - object.seconds.low >>> 0, - object.seconds.high >>> 0 - ).toNumber(); - if (object.nanoseconds != null) message.nanoseconds = object.nanoseconds | 0; + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a Time message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof vttime.Time + * @memberof vttime.Duration * @static - * @param {vttime.Time} message Time + * @param {vttime.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Time.toObject = function toObject(message, options) { - if (!options) options = {}; + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = - options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else object.seconds = options.longs === String ? '0' : 0; - object.nanoseconds = 0; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } - if (message.seconds != null && message.hasOwnProperty('seconds')) - if (typeof message.seconds === 'number') + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else - object.seconds = - options.longs === String - ? $util.Long.prototype.toString.call(message.seconds) - : options.longs === Number - ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() - : message.seconds; - if (message.nanoseconds != null && message.hasOwnProperty('nanoseconds')) - object.nanoseconds = message.nanoseconds; + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this Time to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof vttime.Time + * @memberof vttime.Duration * @instance * @returns {Object.} JSON object */ - Time.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Time; + return Duration; })(); return vttime; From a4a559489a211901c30da1a5e543f49e2974243f Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Mon, 14 Jun 2021 21:25:25 -0400 Subject: [PATCH 2/9] [vexec] Backport fix for typechange in sqlparser In upstream (where the previous commit was cherry-picked from), all of the `New` functions take a `string` argument, but previously (and therefore in our vtctld branch) they took a `[]byte`. Signed-off-by: Andrew Mason --- go/vt/vtctl/workflow/vexec/query_planner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/vt/vtctl/workflow/vexec/query_planner.go b/go/vt/vtctl/workflow/vexec/query_planner.go index b271e065b3e..f95a1350cba 100644 --- a/go/vt/vtctl/workflow/vexec/query_planner.go +++ b/go/vt/vtctl/workflow/vexec/query_planner.go @@ -320,7 +320,7 @@ func (planner *VReplicationLogQueryPlanner) planSelect(sel *sqlparser.Select) (Q var expr sqlparser.Expr switch len(streamIDs) { case 0: // WHERE vreplication_log.vrepl_id IN () => WHERE 1 != 1 - one := sqlparser.NewIntLiteral("1") + one := sqlparser.NewIntLiteral([]byte("1")) expr = &sqlparser.ComparisonExpr{ Operator: sqlparser.NotEqualOp, Left: one, @@ -332,12 +332,12 @@ func (planner *VReplicationLogQueryPlanner) planSelect(sel *sqlparser.Select) (Q Left: &sqlparser.ColName{ Name: sqlparser.NewColIdent("vrepl_id"), }, - Right: sqlparser.NewIntLiteral(fmt.Sprintf("%d", streamIDs[0])), + Right: sqlparser.NewIntLiteral([]byte(fmt.Sprintf("%d", streamIDs[0]))), } default: // WHERE vreplication_log.vrepl_id IN (?) vals := []sqlparser.Expr{} for _, streamID := range streamIDs { - vals = append(vals, sqlparser.NewIntLiteral(fmt.Sprintf("%d", streamID))) + vals = append(vals, sqlparser.NewIntLiteral([]byte(fmt.Sprintf("%d", streamID)))) } var tuple sqlparser.ValTuple = vals From b669ab387ae77884db97499b1f1c3c4b21d4e73d Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Tue, 15 Jun 2021 08:17:01 -0400 Subject: [PATCH 3/9] Restore `grpcvtctldserver` tests Steps taken: 1. `git checkout upstream/main -- go/vt/vtctl/grpcvtctldserver/server_test.go` 2. `git checkout upstream/main -- go/vt/vtctl/grpcvtctldserver/testutil` 3. Replace imports of `google.golang.org/protobuf/proto` with `github.com/golang/protobuf/proto`, as we haven't taken the protobuf upgrade yet 4. Remove all types referenced in the tests that we haven't added to vtctldatapb yet Note: at the time, `upstream/main` resolved to `83dfb9aa59ce47a313ecb7bc12804298e76d350c`. Signed-off-by: Andrew Mason --- go/vt/vtctl/grpcvtctldserver/server_test.go | 4094 +++++++++++++++++ .../testutil/proto_compare.go | 77 +- .../testutil/test_tmclient.go | 16 + go/vt/vtctl/grpcvtctldserver/testutil/util.go | 119 +- 4 files changed, 4285 insertions(+), 21 deletions(-) create mode 100644 go/vt/vtctl/grpcvtctldserver/server_test.go diff --git a/go/vt/vtctl/grpcvtctldserver/server_test.go b/go/vt/vtctl/grpcvtctldserver/server_test.go new file mode 100644 index 00000000000..2d5c802fb03 --- /dev/null +++ b/go/vt/vtctl/grpcvtctldserver/server_test.go @@ -0,0 +1,4094 @@ +/* +Copyright 2020 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package grpcvtctldserver + +import ( + "context" + "errors" + "fmt" + "testing" + "time" + + "github.com/golang/protobuf/proto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/test/utils" + "vitess.io/vitess/go/vt/logutil" + "vitess.io/vitess/go/vt/mysqlctl/backupstorage" + "vitess.io/vitess/go/vt/topo" + "vitess.io/vitess/go/vt/topo/memorytopo" + "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/vtctl/grpcvtctldserver/testutil" + "vitess.io/vitess/go/vt/vttablet/tmclient" + + mysqlctlpb "vitess.io/vitess/go/vt/proto/mysqlctl" + querypb "vitess.io/vitess/go/vt/proto/query" + replicationdatapb "vitess.io/vitess/go/vt/proto/replicationdata" + tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vschemapb "vitess.io/vitess/go/vt/proto/vschema" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" + vtctlservicepb "vitess.io/vitess/go/vt/proto/vtctlservice" + "vitess.io/vitess/go/vt/proto/vttime" +) + +func init() { + *backupstorage.BackupStorageImplementation = testutil.BackupStorageImplementation + + // For tests that don't actually care about mocking the tmclient (i.e. they + // call NewVtctldServer to initialize the unit under test), this needs to be + // set. + // + // Tests that do care about the tmclient should use + // testutil.NewVtctldServerWithTabletManagerClient to initialize their + // VtctldServer. + *tmclient.TabletManagerProtocol = "grpcvtctldserver.test" + tmclient.RegisterTabletManagerClientFactory("grpcvtctldserver.test", func() tmclient.TabletManagerClient { + return nil + }) +} + +func TestChangeTabletType(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + cells []string + tablets []*topodatapb.Tablet + req *vtctldatapb.ChangeTabletTypeRequest + expected *vtctldatapb.ChangeTabletTypeResponse + shouldErr bool + }{ + { + name: "success", + cells: []string{"zone1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + }, + }, + req: &vtctldatapb.ChangeTabletTypeRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + DbType: topodatapb.TabletType_RDONLY, + }, + expected: &vtctldatapb.ChangeTabletTypeResponse{ + BeforeTablet: &topodatapb.Tablet{ + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + }, + AfterTablet: &topodatapb.Tablet{ + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_RDONLY, + }, + WasDryRun: false, + }, + shouldErr: false, + }, + { + name: "dry run", + cells: []string{"zone1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + }, + }, + req: &vtctldatapb.ChangeTabletTypeRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + DbType: topodatapb.TabletType_RDONLY, + DryRun: true, + }, + expected: &vtctldatapb.ChangeTabletTypeResponse{ + BeforeTablet: &topodatapb.Tablet{ + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + }, + AfterTablet: &topodatapb.Tablet{ + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_RDONLY, + }, + WasDryRun: true, + }, + shouldErr: false, + }, + { + name: "tablet not found", + cells: []string{"zone1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 200, + }, + Type: topodatapb.TabletType_REPLICA, + }, + }, + req: &vtctldatapb.ChangeTabletTypeRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + DbType: topodatapb.TabletType_RDONLY, + }, + expected: nil, + shouldErr: true, + }, + { + name: "master promotions not allowed", + cells: []string{"zone1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + }, + }, + req: &vtctldatapb.ChangeTabletTypeRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + DbType: topodatapb.TabletType_MASTER, + }, + expected: nil, + shouldErr: true, + }, + { + name: "master demotions not allowed", + cells: []string{"zone1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + }, + }, + req: &vtctldatapb.ChangeTabletTypeRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + DbType: topodatapb.TabletType_REPLICA, + }, + expected: nil, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer(tt.cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, &testutil.TabletManagerClient{ + TopoServer: ts, + }, func(ts *topo.Server) vtctlservicepb.VtctldServer { return NewVtctldServer(ts) }) + + testutil.AddTablets(ctx, t, ts, nil, tt.tablets...) + + resp, err := vtctld.ChangeTabletType(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + + // If we are testing a dry-run, then the tablet in the actual + // topo should match the BeforeTablet in the response. Otherwise, + // the tablet in the actual topo should match the AfterTablet in + // the response. + expectedRealType := resp.AfterTablet.Type + msg := "ChangeTabletType did not cause topo update" + if tt.req.DryRun { + expectedRealType = resp.BeforeTablet.Type + msg = "dryrun type change resulted in real type change" + } + + tablet, err := ts.GetTablet(ctx, tt.req.TabletAlias) + assert.NoError(t, err, + "could not load tablet %s from topo after type change %v -> %v [dryrun=%t]", + topoproto.TabletAliasString(tt.req.TabletAlias), + resp.BeforeTablet.Type, + resp.AfterTablet.Type, + resp.WasDryRun, + ) + utils.MustMatch(t, expectedRealType, tablet.Type, msg) + }) + } + + t.Run("tabletmanager failure", func(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("zone1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, &testutil.TabletManagerClient{ + TopoServer: nil, + }, func(ts *topo.Server) vtctlservicepb.VtctldServer { return NewVtctldServer(ts) }) + + testutil.AddTablet(ctx, t, ts, &topodatapb.Tablet{ + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + }, nil) + + _, err := vtctld.ChangeTabletType(ctx, &vtctldatapb.ChangeTabletTypeRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + DbType: topodatapb.TabletType_RDONLY, + }) + assert.Error(t, err) + }) +} + +func TestCreateKeyspace(t *testing.T) { + t.Parallel() + + cells := []string{"zone1", "zone2", "zone3"} + tests := []struct { + name string + topo map[string]*topodatapb.Keyspace + vschemas map[string]*vschemapb.Keyspace + req *vtctldatapb.CreateKeyspaceRequest + expected *vtctldatapb.CreateKeyspaceResponse + shouldErr bool + vschemaShouldExist bool + expectedVSchema *vschemapb.Keyspace + }{ + { + name: "normal keyspace", + topo: nil, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testkeyspace", + Type: topodatapb.KeyspaceType_NORMAL, + }, + expected: &vtctldatapb.CreateKeyspaceResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{ + KeyspaceType: topodatapb.KeyspaceType_NORMAL, + }, + }, + }, + vschemaShouldExist: true, + expectedVSchema: &vschemapb.Keyspace{ + Sharded: false, + }, + shouldErr: false, + }, + { + name: "snapshot keyspace", + topo: map[string]*topodatapb.Keyspace{ + "testkeyspace": { + KeyspaceType: topodatapb.KeyspaceType_NORMAL, + }, + }, + vschemas: map[string]*vschemapb.Keyspace{ + "testkeyspace": { + Sharded: true, + Vindexes: map[string]*vschemapb.Vindex{ + "h1": { + Type: "hash", + }, + }, + }, + }, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testsnapshot", + Type: topodatapb.KeyspaceType_SNAPSHOT, + BaseKeyspace: "testkeyspace", + SnapshotTime: &vttime.Time{ + Seconds: 1, + }, + }, + expected: &vtctldatapb.CreateKeyspaceResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testsnapshot", + Keyspace: &topodatapb.Keyspace{ + KeyspaceType: topodatapb.KeyspaceType_SNAPSHOT, + BaseKeyspace: "testkeyspace", + SnapshotTime: &vttime.Time{ + Seconds: 1, + }, + }, + }, + }, + vschemaShouldExist: true, + expectedVSchema: &vschemapb.Keyspace{ + Sharded: true, + Vindexes: map[string]*vschemapb.Vindex{ + "h1": { + Type: "hash", + }, + }, + RequireExplicitRouting: true, + }, + shouldErr: false, + }, + { + name: "snapshot keyspace with no base keyspace specified", + topo: nil, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testsnapshot", + Type: topodatapb.KeyspaceType_SNAPSHOT, + SnapshotTime: &vttime.Time{}, + }, + expected: nil, + shouldErr: true, + }, + { + name: "snapshot keyspace with no snapshot time", + topo: nil, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testsnapshot", + Type: topodatapb.KeyspaceType_SNAPSHOT, + BaseKeyspace: "testkeyspace", + }, + expected: nil, + shouldErr: true, + }, + { + name: "snapshot keyspace with nonexistent base keyspace", + topo: nil, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testsnapshot", + Type: topodatapb.KeyspaceType_SNAPSHOT, + BaseKeyspace: "testkeyspace", + SnapshotTime: &vttime.Time{Seconds: 100}, + }, + expected: &vtctldatapb.CreateKeyspaceResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testsnapshot", + Keyspace: &topodatapb.Keyspace{ + KeyspaceType: topodatapb.KeyspaceType_SNAPSHOT, + BaseKeyspace: "testkeyspace", + SnapshotTime: &vttime.Time{Seconds: 100}, + }, + }, + }, + vschemaShouldExist: true, + expectedVSchema: &vschemapb.Keyspace{ + Sharded: false, + RequireExplicitRouting: true, + }, + shouldErr: false, + }, + { + name: "invalid keyspace type", + topo: nil, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "badkeyspacetype", + Type: 10000000, + }, + expected: nil, + shouldErr: true, + }, + { + name: "keyspace exists/no force", + topo: map[string]*topodatapb.Keyspace{ + "testkeyspace": { + KeyspaceType: topodatapb.KeyspaceType_NORMAL, + ShardingColumnName: "col1", + ShardingColumnType: topodatapb.KeyspaceIdType_UINT64, + }, + }, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testkeyspace", + Type: topodatapb.KeyspaceType_NORMAL, + Force: false, + }, + expected: nil, + shouldErr: true, + }, + { + name: "keyspace exists/force", + topo: map[string]*topodatapb.Keyspace{ + "testkeyspace": { + KeyspaceType: topodatapb.KeyspaceType_NORMAL, + ShardingColumnName: "col1", + ShardingColumnType: topodatapb.KeyspaceIdType_UINT64, + }, + }, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testkeyspace", + Type: topodatapb.KeyspaceType_NORMAL, + Force: true, + }, + expected: &vtctldatapb.CreateKeyspaceResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{ + KeyspaceType: topodatapb.KeyspaceType_NORMAL, + ShardingColumnName: "col1", + ShardingColumnType: topodatapb.KeyspaceIdType_UINT64, + }, + }, + }, + vschemaShouldExist: true, + expectedVSchema: &vschemapb.Keyspace{ + Sharded: false, + }, + shouldErr: false, + }, + { + name: "allow empty vschema", + topo: nil, + req: &vtctldatapb.CreateKeyspaceRequest{ + Name: "testkeyspace", + Type: topodatapb.KeyspaceType_NORMAL, + AllowEmptyVSchema: true, + }, + expected: &vtctldatapb.CreateKeyspaceResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{ + KeyspaceType: topodatapb.KeyspaceType_NORMAL, + }, + }, + }, + vschemaShouldExist: false, + expectedVSchema: nil, + shouldErr: false, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + if tt.req == nil { + t.Skip("test not yet implemented") + } + + ctx := context.Background() + ts := memorytopo.NewServer(cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + for name, ks := range tt.topo { + testutil.AddKeyspace(ctx, t, ts, &vtctldatapb.Keyspace{ + Name: name, + Keyspace: ks, + }) + } + + for name, vs := range tt.vschemas { + require.NoError(t, ts.SaveVSchema(ctx, name, vs), "error in SaveVSchema(%v, %+v)", name, vs) + } + + // Create the keyspace and make some assertions + resp, err := vtctld.CreateKeyspace(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + testutil.AssertKeyspacesEqual(t, tt.expected.Keyspace, resp.Keyspace, "%+v\n%+v\n", tt.expected.Keyspace, resp.Keyspace) + + // Fetch the newly-created keyspace out of the topo and assert on it + ks, err := ts.GetKeyspace(ctx, tt.req.Name) + assert.NoError(t, err, "cannot get keyspace %v after creating", tt.req.Name) + require.NotNil(t, ks.Keyspace) + + actualKs := &vtctldatapb.Keyspace{ + Name: tt.req.Name, + Keyspace: ks.Keyspace, + } + testutil.AssertKeyspacesEqual( + t, + tt.expected.Keyspace, + actualKs, + "created keyspace %v does not match requested keyspace (name = %v) %v", + actualKs, + tt.expected.Keyspace, + ) + + // Finally, check the VSchema + vs, err := ts.GetVSchema(ctx, tt.req.Name) + if !tt.vschemaShouldExist { + assert.True(t, topo.IsErrType(err, topo.NoNode), "vschema should not exist, but got other error = %v", err) + return + } + assert.NoError(t, err) + utils.MustMatch(t, tt.expectedVSchema, vs) + }) + } +} + +func TestCreateShard(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + keyspaces []*vtctldatapb.Keyspace + shards []*vtctldatapb.Shard + topoErr error + req *vtctldatapb.CreateShardRequest + expected *vtctldatapb.CreateShardResponse + shouldErr bool + }{ + { + name: "success", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + }, + expected: &vtctldatapb.CreateShardResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + Shard: &vtctldatapb.Shard{ + Keyspace: "testkeyspace", + Name: "-", + Shard: &topodatapb.Shard{ + KeyRange: &topodatapb.KeyRange{}, + IsMasterServing: true, + }, + }, + ShardAlreadyExists: false, + }, + shouldErr: false, + }, + { + name: "include parent", + keyspaces: nil, + shards: nil, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + IncludeParent: true, + }, + expected: &vtctldatapb.CreateShardResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + Shard: &vtctldatapb.Shard{ + Keyspace: "testkeyspace", + Name: "-", + Shard: &topodatapb.Shard{ + KeyRange: &topodatapb.KeyRange{}, + IsMasterServing: true, + }, + }, + ShardAlreadyExists: false, + }, + shouldErr: false, + }, + { + name: "keyspace does not exist", + keyspaces: nil, + shards: nil, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + }, + expected: nil, + shouldErr: true, + }, + { + name: "include parent/keyspace exists/no force", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + IncludeParent: true, + }, + expected: nil, + shouldErr: true, + }, + { + name: "include parent/keyspace exists/force", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + IncludeParent: true, + Force: true, + }, + expected: &vtctldatapb.CreateShardResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + Shard: &vtctldatapb.Shard{ + Keyspace: "testkeyspace", + Name: "-", + Shard: &topodatapb.Shard{ + KeyRange: &topodatapb.KeyRange{}, + IsMasterServing: true, + }, + }, + ShardAlreadyExists: false, + }, + shouldErr: false, + }, + { + name: "shard exists/no force", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + }, + expected: nil, + shouldErr: true, + }, + { + name: "shard exists/force", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoErr: nil, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Force: true, + }, + expected: &vtctldatapb.CreateShardResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + Shard: &vtctldatapb.Shard{ + Keyspace: "testkeyspace", + Name: "-", + Shard: &topodatapb.Shard{ + KeyRange: &topodatapb.KeyRange{}, + IsMasterServing: true, + }, + }, + ShardAlreadyExists: true, + }, + shouldErr: false, + }, + { + name: "topo is down", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + topoErr: assert.AnError, + req: &vtctldatapb.CreateShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + }, + expected: nil, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + if tt.req == nil { + t.Skip("focusing on other tests") + } + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory("zone1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + for _, ks := range tt.keyspaces { + testutil.AddKeyspace(ctx, t, ts, ks) + } + + testutil.AddShards(ctx, t, ts, tt.shards...) + + if tt.topoErr != nil { + topofactory.SetError(tt.topoErr) + } + + resp, err := vtctld.CreateShard(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestDeleteKeyspace(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + keyspaces []*vtctldatapb.Keyspace + shards []*vtctldatapb.Shard + srvKeyspaces map[string]map[string]*topodatapb.SrvKeyspace + topoErr error + req *vtctldatapb.DeleteKeyspaceRequest + expected *vtctldatapb.DeleteKeyspaceResponse + expectedRemainingKeyspaces []string + expectedRemainingShards map[string][]string + shouldErr bool + }{ + { + name: "success", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + srvKeyspaces: nil, + topoErr: nil, + req: &vtctldatapb.DeleteKeyspaceRequest{ + Keyspace: "testkeyspace", + }, + expected: &vtctldatapb.DeleteKeyspaceResponse{}, + expectedRemainingKeyspaces: []string{}, + expectedRemainingShards: map[string][]string{}, + shouldErr: false, + }, + { + name: "keyspace does not exist", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "otherkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + srvKeyspaces: nil, + topoErr: nil, + req: &vtctldatapb.DeleteKeyspaceRequest{ + Keyspace: "testkeyspace", + }, + expected: nil, + expectedRemainingKeyspaces: []string{"otherkeyspace"}, + expectedRemainingShards: map[string][]string{ + "otherkeyspace": nil, + }, + shouldErr: true, + }, + { + name: "keyspace has shards/Recursive=false", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-80", + }, + { + Keyspace: "testkeyspace", + Name: "80-", + }, + }, + srvKeyspaces: nil, + topoErr: nil, + req: &vtctldatapb.DeleteKeyspaceRequest{ + Keyspace: "testkeyspace", + }, + expected: nil, + expectedRemainingKeyspaces: []string{"testkeyspace"}, + expectedRemainingShards: map[string][]string{ + "testkeyspace": {"-80", "80-"}, + }, + shouldErr: true, + }, + { + name: "keyspace has shards/Recursive=true", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-80", + }, + { + Keyspace: "testkeyspace", + Name: "80-", + }, + }, + srvKeyspaces: nil, + topoErr: nil, + req: &vtctldatapb.DeleteKeyspaceRequest{ + Keyspace: "testkeyspace", + Recursive: true, + }, + expected: &vtctldatapb.DeleteKeyspaceResponse{}, + expectedRemainingKeyspaces: []string{}, + expectedRemainingShards: map[string][]string{}, + shouldErr: false, + }, + // Not sure how to force this case because we always pass + // (Recursive=true, EvenIfServing=true) so anything short of "topo + // server is down" won't fail, and "topo server is down" will cause us + // to error before we even reach this point in the code, so, ¯\_(ツ)_/¯. + // { + // name: "recursive/cannot delete shard", + // }, + { + name: "topo error", + keyspaces: []*vtctldatapb.Keyspace{ + { + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + }, + shards: nil, + srvKeyspaces: nil, + topoErr: assert.AnError, + req: &vtctldatapb.DeleteKeyspaceRequest{ + Keyspace: "testkeyspace", + }, + expected: nil, + expectedRemainingKeyspaces: []string{"testkeyspace"}, + expectedRemainingShards: map[string][]string{ + "testkeyspace": nil, + }, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + cells := []string{"zone1", "zone2", "zone3"} + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory(cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + testutil.AddKeyspaces(ctx, t, ts, tt.keyspaces...) + testutil.AddShards(ctx, t, ts, tt.shards...) + testutil.UpdateSrvKeyspaces(ctx, t, ts, tt.srvKeyspaces) + + if tt.topoErr != nil { + topofactory.SetError(tt.topoErr) + } + + defer func() { + if tt.expectedRemainingKeyspaces == nil { + return + } + + topofactory.SetError(nil) + + keyspaces, err := ts.GetKeyspaces(ctx) + require.NoError(t, err, "cannot get keyspaces names after DeleteKeyspace call") + assert.ElementsMatch(t, tt.expectedRemainingKeyspaces, keyspaces) + + if tt.expectedRemainingShards == nil { + return + } + + remainingShards := make(map[string][]string, len(keyspaces)) + + for _, ks := range keyspaces { + shards, err := ts.GetShardNames(ctx, ks) + require.NoError(t, err, "cannot get shard names for keyspace %s", ks) + + remainingShards[ks] = shards + } + + utils.MustMatch(t, tt.expectedRemainingShards, remainingShards) + }() + + resp, err := vtctld.DeleteKeyspace(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestDeleteShards(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + shards []*vtctldatapb.Shard + tablets []*topodatapb.Tablet + replicationGraphs []*topo.ShardReplicationInfo + srvKeyspaces map[string]map[string]*topodatapb.SrvKeyspace + topoErr error + req *vtctldatapb.DeleteShardsRequest + expected *vtctldatapb.DeleteShardsResponse + expectedRemainingShards []*vtctldatapb.Shard + shouldErr bool + }{ + { + name: "success", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: nil, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + }, + expected: &vtctldatapb.DeleteShardsResponse{}, + expectedRemainingShards: []*vtctldatapb.Shard{}, + shouldErr: false, + }, + { + name: "shard not found", + shards: nil, + tablets: nil, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + }, + expected: nil, + shouldErr: true, + }, + { + name: "multiple shards", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + { + Keyspace: "otherkeyspace", + Name: "-80", + }, + { + Keyspace: "otherkeyspace", + Name: "80-", + }, + }, + tablets: nil, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + { + Keyspace: "otherkeyspace", + Name: "-80", + }, + }, + }, + expected: &vtctldatapb.DeleteShardsResponse{}, + expectedRemainingShards: []*vtctldatapb.Shard{ + { + Keyspace: "otherkeyspace", + Name: "80-", + }, + }, + shouldErr: false, + }, + { + name: "topo is down", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: nil, + topoErr: assert.AnError, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + }, + expected: nil, + expectedRemainingShards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + shouldErr: true, + }, + { + name: "shard is serving/EvenIfServing=false", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: nil, + srvKeyspaces: map[string]map[string]*topodatapb.SrvKeyspace{ + "zone1": { + "testkeyspace": &topodatapb.SrvKeyspace{ + Partitions: []*topodatapb.SrvKeyspace_KeyspacePartition{ + { + ServedType: topodatapb.TabletType_MASTER, + ShardReferences: []*topodatapb.ShardReference{ + { + Name: "-", + KeyRange: &topodatapb.KeyRange{}, + }, + }, + }, + }, + }, + }, + }, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + }, + expected: nil, + expectedRemainingShards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + shouldErr: true, + }, + { + name: "shard is serving/EvenIfServing=true", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: nil, + srvKeyspaces: map[string]map[string]*topodatapb.SrvKeyspace{ + "zone1": { + "testkeyspace": &topodatapb.SrvKeyspace{ + Partitions: []*topodatapb.SrvKeyspace_KeyspacePartition{ + { + ServedType: topodatapb.TabletType_MASTER, + ShardReferences: []*topodatapb.ShardReference{ + { + Name: "-", + KeyRange: &topodatapb.KeyRange{}, + }, + }, + }, + }, + }, + }, + }, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + EvenIfServing: true, + }, + expected: &vtctldatapb.DeleteShardsResponse{}, + expectedRemainingShards: []*vtctldatapb.Shard{}, + shouldErr: false, + }, + { + name: "ShardReplication in topo", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: nil, + replicationGraphs: []*topo.ShardReplicationInfo{ + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + }, + }, + }, "zone1", "testkeyspace", "-"), + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone2", + Uid: 200, + }, + }, + }, + }, "zone2", "testkeyspace", "-"), + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone3", + Uid: 300, + }, + }, + }, + }, "zone3", "testkeyspace", "-"), + }, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + }, + expected: &vtctldatapb.DeleteShardsResponse{}, + expectedRemainingShards: []*vtctldatapb.Shard{}, + shouldErr: false, + }, + { + name: "shard has tablets/Recursive=false", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + }, + expected: nil, + expectedRemainingShards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + shouldErr: true, + }, + { + name: "shard has tablets/Recursive=true", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + Recursive: true, + }, + expected: &vtctldatapb.DeleteShardsResponse{}, + expectedRemainingShards: []*vtctldatapb.Shard{}, + shouldErr: false, + }, + { + name: "tablets in topo belonging to other shard", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-80", + }, + { + Keyspace: "testkeyspace", + Name: "80-", + }, + }, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "80-", + }, + }, + topoErr: nil, + req: &vtctldatapb.DeleteShardsRequest{ + Shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-80", + }, + }, + }, + expected: &vtctldatapb.DeleteShardsResponse{}, + expectedRemainingShards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "80-", + }, + }, + shouldErr: false, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + cells := []string{"zone1", "zone2", "zone3"} + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory(cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + testutil.AddShards(ctx, t, ts, tt.shards...) + testutil.AddTablets(ctx, t, ts, nil, tt.tablets...) + testutil.SetupReplicationGraphs(ctx, t, ts, tt.replicationGraphs...) + testutil.UpdateSrvKeyspaces(ctx, t, ts, tt.srvKeyspaces) + + if tt.topoErr != nil { + topofactory.SetError(tt.topoErr) + } + + if tt.expectedRemainingShards != nil { + defer func() { + topofactory.SetError(nil) + + actualShards := []*vtctldatapb.Shard{} + + keyspaces, err := ts.GetKeyspaces(ctx) + require.NoError(t, err, "cannot get keyspace names to check remaining shards") + + for _, ks := range keyspaces { + shards, err := ts.GetShardNames(ctx, ks) + require.NoError(t, err, "cannot get shard names for keyspace %s", ks) + + for _, shard := range shards { + actualShards = append(actualShards, &vtctldatapb.Shard{ + Keyspace: ks, + Name: shard, + }) + } + } + + assert.ElementsMatch(t, tt.expectedRemainingShards, actualShards) + }() + } + + resp, err := vtctld.DeleteShards(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestDeleteTablets(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + tablets []*topodatapb.Tablet + shardFieldUpdates map[string]func(*topo.ShardInfo) error + lockedShards []*vtctldatapb.Shard + topoError error + req *vtctldatapb.DeleteTabletsRequest + expected *vtctldatapb.DeleteTabletsResponse + expectedRemainingTablets []*topodatapb.Tablet + shouldErr bool + }{ + { + name: "single replica", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + lockedShards: nil, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + }, + }, + expected: &vtctldatapb.DeleteTabletsResponse{}, + expectedRemainingTablets: []*topodatapb.Tablet{}, + shouldErr: false, + }, + { + name: "single primary/no AllowPrimary", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 100, + Nanoseconds: 10, + }, + }, + }, + lockedShards: nil, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + }, + }, + expected: nil, + shouldErr: true, + }, + { + name: "single primary/with AllowPrimary", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 100, + Nanoseconds: 10, + }, + }, + }, + lockedShards: nil, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + }, + AllowPrimary: true, + }, + expected: &vtctldatapb.DeleteTabletsResponse{}, + expectedRemainingTablets: []*topodatapb.Tablet{}, + shouldErr: false, + }, + { + name: "multiple tablets", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 102, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + lockedShards: nil, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + { + Cell: "zone1", + Uid: 102, + }, + }, + }, + expected: &vtctldatapb.DeleteTabletsResponse{}, + expectedRemainingTablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + shouldErr: false, + }, + { + name: "stale primary record", + tablets: []*topodatapb.Tablet{ + { + // The stale primary we're going to delete. + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 100, + Nanoseconds: 10, + }, + }, + { + // The real shard primary, which we'll update in the shard + // record below. + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 1001, + Nanoseconds: 101, + }, + }, + }, + shardFieldUpdates: map[string]func(*topo.ShardInfo) error{ + "testkeyspace/-": func(si *topo.ShardInfo) error { + si.MasterAlias = &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + } + si.MasterTermStartTime = &vttime.Time{ + Seconds: 1001, + Nanoseconds: 101, + } + + return nil + }, + }, + lockedShards: nil, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + }, + }, + expected: &vtctldatapb.DeleteTabletsResponse{}, + expectedRemainingTablets: []*topodatapb.Tablet{ + { + // The true shard primary still exists (phew!) + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 1001, + Nanoseconds: 101, + }, + }, + }, + shouldErr: false, + }, + { + name: "tablet not found", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + lockedShards: nil, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 200, + }, + }, + }, + expected: nil, + expectedRemainingTablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + shouldErr: true, + }, + { + name: "shard is locked", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 100, + Nanoseconds: 10, + }, + }, + }, + lockedShards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + }, + AllowPrimary: true, + }, + expected: nil, + expectedRemainingTablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-", + MasterTermStartTime: &vttime.Time{ + Seconds: 100, + Nanoseconds: 10, + }, + }, + }, + shouldErr: true, + }, + { + name: "another shard is locked", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "-80", + MasterTermStartTime: &vttime.Time{ + Seconds: 100, + Nanoseconds: 10, + }, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 200, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "80-", + MasterTermStartTime: &vttime.Time{ + Seconds: 200, + Nanoseconds: 20, + }, + }, + }, + lockedShards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "80-", + }, + }, + topoError: nil, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + // testkeyspace/-80 + Cell: "zone1", + Uid: 100, + }, + }, + AllowPrimary: true, + }, + expected: &vtctldatapb.DeleteTabletsResponse{}, + expectedRemainingTablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 200, + }, + Type: topodatapb.TabletType_MASTER, + Keyspace: "testkeyspace", + Shard: "80-", + MasterTermStartTime: &vttime.Time{ + Seconds: 200, + Nanoseconds: 20, + }, + }, + }, + shouldErr: false, + }, + { + name: "topo server is down", + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + lockedShards: nil, + topoError: assert.AnError, + req: &vtctldatapb.DeleteTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 200, + }, + }, + }, + expected: nil, + expectedRemainingTablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Type: topodatapb.TabletType_REPLICA, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + if tt.req == nil { + t.Skip("focusing on other tests") + } + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory("zone1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + // Setup tablets and shards + testutil.AddTablets(ctx, t, ts, nil, tt.tablets...) + + for key, updateFn := range tt.shardFieldUpdates { + ks, shard, err := topoproto.ParseKeyspaceShard(key) + require.NoError(t, err, "bad keyspace/shard provided in shardFieldUpdates: %s", key) + + _, err = ts.UpdateShardFields(ctx, ks, shard, updateFn) + require.NoError(t, err, "failed to update shard fields for %s", key) + } + + // Set locks + for _, shard := range tt.lockedShards { + lctx, unlock, lerr := ts.LockShard(ctx, shard.Keyspace, shard.Name, "testing locked shard") + require.NoError(t, lerr, "cannot lock shard %s/%s", shard.Keyspace, shard.Name) + // unlock at the end of the test, we don't care about this error + // value anymore + defer unlock(&lerr) + + // we do, however, care that the lock context gets propogated + // both to additional calls to lock, and to the actual RPC call. + ctx = lctx + } + + // Set errors + if tt.topoError != nil { + topofactory.SetError(tt.topoError) + } + + checkRemainingTablets := func() { + topofactory.SetError(nil) + + resp, err := vtctld.GetTablets(ctx, &vtctldatapb.GetTabletsRequest{}) + assert.NoError(t, err, "cannot look up tablets from topo after issuing DeleteTablets request") + testutil.AssertSameTablets(t, tt.expectedRemainingTablets, resp.Tablets) + } + + // Run the test + resp, err := vtctld.DeleteTablets(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + + if tt.expectedRemainingTablets != nil { + checkRemainingTablets() + } + + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + checkRemainingTablets() + }) + } +} + +func TestFindAllShardsInKeyspace(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("cell1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + ks := &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + } + testutil.AddKeyspace(ctx, t, ts, ks) + + si1, err := ts.GetOrCreateShard(ctx, ks.Name, "-80") + require.NoError(t, err) + si2, err := ts.GetOrCreateShard(ctx, ks.Name, "80-") + require.NoError(t, err) + + resp, err := vtctld.FindAllShardsInKeyspace(ctx, &vtctldatapb.FindAllShardsInKeyspaceRequest{Keyspace: ks.Name}) + assert.NoError(t, err) + assert.NotNil(t, resp) + + expected := map[string]*vtctldatapb.Shard{ + "-80": { + Keyspace: ks.Name, + Name: "-80", + Shard: si1.Shard, + }, + "80-": { + Keyspace: ks.Name, + Name: "80-", + Shard: si2.Shard, + }, + } + + utils.MustMatch(t, expected, resp.Shards) + + _, err = vtctld.FindAllShardsInKeyspace(ctx, &vtctldatapb.FindAllShardsInKeyspaceRequest{Keyspace: "nothing"}) + assert.Error(t, err) +} + +func TestGetBackups(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer() + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + testutil.BackupStorage.Backups = map[string][]string{ + "testkeyspace/-": {"backup1", "backup2"}, + } + + expected := &vtctldatapb.GetBackupsResponse{ + Backups: []*mysqlctlpb.BackupInfo{ + { + Directory: "testkeyspace/-", + Name: "backup1", + }, + { + Directory: "testkeyspace/-", + Name: "backup2", + }, + }, + } + + resp, err := vtctld.GetBackups(ctx, &vtctldatapb.GetBackupsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }) + assert.NoError(t, err) + utils.MustMatch(t, expected, resp) + + t.Run("no backupstorage", func(t *testing.T) { + *backupstorage.BackupStorageImplementation = "doesnotexist" + defer func() { *backupstorage.BackupStorageImplementation = testutil.BackupStorageImplementation }() + + _, err := vtctld.GetBackups(ctx, &vtctldatapb.GetBackupsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }) + assert.Error(t, err) + }) + + t.Run("listbackups error", func(t *testing.T) { + testutil.BackupStorage.ListBackupsError = assert.AnError + defer func() { testutil.BackupStorage.ListBackupsError = nil }() + + _, err := vtctld.GetBackups(ctx, &vtctldatapb.GetBackupsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }) + assert.Error(t, err) + }) +} + +func TestGetKeyspace(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("cell1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + expected := &vtctldatapb.GetKeyspaceResponse{ + Keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{ + ShardingColumnName: "col1", + }, + }, + } + testutil.AddKeyspace(ctx, t, ts, expected.Keyspace) + + ks, err := vtctld.GetKeyspace(ctx, &vtctldatapb.GetKeyspaceRequest{Keyspace: expected.Keyspace.Name}) + assert.NoError(t, err) + utils.MustMatch(t, expected, ks) + + _, err = vtctld.GetKeyspace(ctx, &vtctldatapb.GetKeyspaceRequest{Keyspace: "notfound"}) + assert.Error(t, err) +} + +func TestGetCellInfoNames(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("cell1", "cell2", "cell3") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + resp, err := vtctld.GetCellInfoNames(ctx, &vtctldatapb.GetCellInfoNamesRequest{}) + assert.NoError(t, err) + assert.ElementsMatch(t, []string{"cell1", "cell2", "cell3"}, resp.Names) + + ts = memorytopo.NewServer() + vtctld = testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + resp, err = vtctld.GetCellInfoNames(ctx, &vtctldatapb.GetCellInfoNamesRequest{}) + assert.NoError(t, err) + assert.Empty(t, resp.Names) + + ts, topofactory := memorytopo.NewServerAndFactory("cell1") + vtctld = testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + topofactory.SetError(assert.AnError) + _, err = vtctld.GetCellInfoNames(ctx, &vtctldatapb.GetCellInfoNamesRequest{}) + assert.Error(t, err) +} + +func TestGetCellInfo(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer() + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + expected := &topodatapb.CellInfo{ + ServerAddress: "example.com", + Root: "vitess", + } + input := proto.Clone(expected).(*topodatapb.CellInfo) + require.NoError(t, ts.CreateCellInfo(ctx, "cell1", input)) + + resp, err := vtctld.GetCellInfo(ctx, &vtctldatapb.GetCellInfoRequest{Cell: "cell1"}) + assert.NoError(t, err) + utils.MustMatch(t, expected, resp.CellInfo) + + _, err = vtctld.GetCellInfo(ctx, &vtctldatapb.GetCellInfoRequest{Cell: "does_not_exist"}) + assert.Error(t, err) + + _, err = vtctld.GetCellInfo(ctx, &vtctldatapb.GetCellInfoRequest{}) + assert.Error(t, err) +} + +func TestGetCellsAliases(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("c11", "c12", "c13", "c21", "c22") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + alias1 := &topodatapb.CellsAlias{ + Cells: []string{"c11", "c12", "c13"}, + } + alias2 := &topodatapb.CellsAlias{ + Cells: []string{"c21", "c22"}, + } + + for i, alias := range []*topodatapb.CellsAlias{alias1, alias2} { + input := proto.Clone(alias).(*topodatapb.CellsAlias) + name := fmt.Sprintf("a%d", i+1) + require.NoError(t, ts.CreateCellsAlias(ctx, name, input), "cannot create cells alias %d (idx = %d) = %+v", i+1, i, input) + } + + expected := map[string]*topodatapb.CellsAlias{ + "a1": alias1, + "a2": alias2, + } + + resp, err := vtctld.GetCellsAliases(ctx, &vtctldatapb.GetCellsAliasesRequest{}) + assert.NoError(t, err) + utils.MustMatch(t, expected, resp.Aliases) + + ts, topofactory := memorytopo.NewServerAndFactory() + vtctld = testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + topofactory.SetError(assert.AnError) + _, err = vtctld.GetCellsAliases(ctx, &vtctldatapb.GetCellsAliasesRequest{}) + assert.Error(t, err) +} + +func TestGetKeyspaces(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory("cell1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + resp, err := vtctld.GetKeyspaces(ctx, &vtctldatapb.GetKeyspacesRequest{}) + assert.NoError(t, err) + assert.Empty(t, resp.Keyspaces) + + expected := []*vtctldatapb.Keyspace{ + { + Name: "ks1", + Keyspace: &topodatapb.Keyspace{ + ShardingColumnName: "ks1_col1", + }, + }, + { + Name: "ks2", + Keyspace: &topodatapb.Keyspace{ + ShardingColumnName: "ks2_col1", + }, + }, + { + Name: "ks3", + Keyspace: &topodatapb.Keyspace{ + ShardingColumnName: "ks3_col1", + }, + }, + } + for _, ks := range expected { + testutil.AddKeyspace(ctx, t, ts, ks) + } + + resp, err = vtctld.GetKeyspaces(ctx, &vtctldatapb.GetKeyspacesRequest{}) + assert.NoError(t, err) + utils.MustMatch(t, expected, resp.Keyspaces) + + topofactory.SetError(errors.New("error from toposerver")) + + _, err = vtctld.GetKeyspaces(ctx, &vtctldatapb.GetKeyspacesRequest{}) + assert.Error(t, err) +} + +func TestGetSchema(t *testing.T) { + ctx := context.Background() + ts := memorytopo.NewServer("zone1") + tmc := testutil.TabletManagerClient{ + GetSchemaResults: map[string]struct { + Schema *tabletmanagerdatapb.SchemaDefinition + Error error + }{}, + } + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, &tmc, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + validAlias := &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + } + testutil.AddTablet(ctx, t, ts, &topodatapb.Tablet{ + Alias: validAlias, + }, nil) + otherAlias := &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + } + testutil.AddTablet(ctx, t, ts, &topodatapb.Tablet{ + Alias: otherAlias, + }, nil) + + // we need to run this on each test case or they will pollute each other + setupSchema := func() { + tmc.GetSchemaResults[topoproto.TabletAliasString(validAlias)] = struct { + Schema *tabletmanagerdatapb.SchemaDefinition + Error error + }{ + Schema: &tabletmanagerdatapb.SchemaDefinition{ + DatabaseSchema: "CREATE DATABASE vt_testkeyspace", + TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ + { + Name: "t1", + Schema: `CREATE TABLE t1 ( + id int(11) not null, + PRIMARY KEY (id) +);`, + Type: "BASE", + Columns: []string{"id"}, + DataLength: 100, + RowCount: 50, + Fields: []*querypb.Field{ + { + Name: "id", + Type: querypb.Type_INT32, + }, + }, + }, + }, + }, + Error: nil, + } + } + + tests := []*struct { + name string + req *vtctldatapb.GetSchemaRequest + expected *vtctldatapb.GetSchemaResponse + shouldErr bool + }{ + { + name: "normal path", + req: &vtctldatapb.GetSchemaRequest{ + TabletAlias: validAlias, + }, + expected: &vtctldatapb.GetSchemaResponse{ + Schema: &tabletmanagerdatapb.SchemaDefinition{ + DatabaseSchema: "CREATE DATABASE vt_testkeyspace", + TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ + { + Name: "t1", + Schema: `CREATE TABLE t1 ( + id int(11) not null, + PRIMARY KEY (id) +);`, + Type: "BASE", + Columns: []string{"id"}, + DataLength: 100, + RowCount: 50, + Fields: []*querypb.Field{ + { + Name: "id", + Type: querypb.Type_INT32, + }, + }, + }, + }, + }, + }, + shouldErr: false, + }, + { + name: "table names only", + req: &vtctldatapb.GetSchemaRequest{ + TabletAlias: validAlias, + TableNamesOnly: true, + }, + expected: &vtctldatapb.GetSchemaResponse{ + Schema: &tabletmanagerdatapb.SchemaDefinition{ + DatabaseSchema: "CREATE DATABASE vt_testkeyspace", + TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ + { + Name: "t1", + }, + }, + }, + }, + shouldErr: false, + }, + { + name: "table sizes only", + req: &vtctldatapb.GetSchemaRequest{ + TabletAlias: validAlias, + TableSizesOnly: true, + }, + expected: &vtctldatapb.GetSchemaResponse{ + Schema: &tabletmanagerdatapb.SchemaDefinition{ + DatabaseSchema: "CREATE DATABASE vt_testkeyspace", + TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ + { + Name: "t1", + Type: "BASE", + DataLength: 100, + RowCount: 50, + }, + }, + }, + }, + shouldErr: false, + }, + { + name: "table names take precedence over table sizes", + req: &vtctldatapb.GetSchemaRequest{ + TabletAlias: validAlias, + TableNamesOnly: true, + TableSizesOnly: true, + }, + expected: &vtctldatapb.GetSchemaResponse{ + Schema: &tabletmanagerdatapb.SchemaDefinition{ + DatabaseSchema: "CREATE DATABASE vt_testkeyspace", + TableDefinitions: []*tabletmanagerdatapb.TableDefinition{ + { + Name: "t1", + }, + }, + }, + }, + shouldErr: false, + }, + // error cases + { + name: "no tablet", + req: &vtctldatapb.GetSchemaRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "notfound", + Uid: 100, + }, + }, + expected: nil, + shouldErr: true, + }, + { + name: "no schema", + req: &vtctldatapb.GetSchemaRequest{ + TabletAlias: otherAlias, + }, + expected: nil, + shouldErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + setupSchema() + + resp, err := vtctld.GetSchema(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestGetShard(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + topo []*vtctldatapb.Shard + topoError error + req *vtctldatapb.GetShardRequest + expected *vtctldatapb.GetShardResponse + shouldErr bool + }{ + { + name: "success", + topo: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: nil, + req: &vtctldatapb.GetShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + }, + expected: &vtctldatapb.GetShardResponse{ + Shard: &vtctldatapb.Shard{ + Keyspace: "testkeyspace", + Name: "-", + Shard: &topodatapb.Shard{ + KeyRange: &topodatapb.KeyRange{}, + IsMasterServing: true, + }, + }, + }, + shouldErr: false, + }, + { + name: "shard not found", + topo: nil, + topoError: nil, + req: &vtctldatapb.GetShardRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + }, + shouldErr: true, + }, + { + name: "unavailable topo server", + topo: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: assert.AnError, + req: &vtctldatapb.GetShardRequest{}, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + cells := []string{"zone1", "zone2", "zone3"} + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory(cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + testutil.AddShards(ctx, t, ts, tt.topo...) + + if tt.topoError != nil { + topofactory.SetError(tt.topoError) + } + + resp, err := vtctld.GetShard(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestGetSrvKeyspaces(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + cells []string + srvKeyspaces []*testutil.SrvKeyspace + topoErr error + req *vtctldatapb.GetSrvKeyspacesRequest + expected *vtctldatapb.GetSrvKeyspacesResponse + shouldErr bool + }{ + { + name: "success", + cells: []string{"zone1", "zone2"}, + srvKeyspaces: []*testutil.SrvKeyspace{ + { + Cell: "zone1", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone1-sharding-col", + }, + }, + { + Cell: "zone2", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone2-sharding-col", + }, + }, + }, + req: &vtctldatapb.GetSrvKeyspacesRequest{ + Keyspace: "testkeyspace", + }, + expected: &vtctldatapb.GetSrvKeyspacesResponse{ + SrvKeyspaces: map[string]*topodatapb.SrvKeyspace{ + "zone1": { + ShardingColumnName: "zone1-sharding-col", + }, + "zone2": { + ShardingColumnName: "zone2-sharding-col", + }, + }, + }, + shouldErr: false, + }, + { + name: "filtering by cell", + cells: []string{"zone1", "zone2"}, + srvKeyspaces: []*testutil.SrvKeyspace{ + { + Cell: "zone1", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone1-sharding-col", + }, + }, + { + Cell: "zone2", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone2-sharding-col", + }, + }, + }, + req: &vtctldatapb.GetSrvKeyspacesRequest{ + Keyspace: "testkeyspace", + Cells: []string{"zone1"}, + }, + expected: &vtctldatapb.GetSrvKeyspacesResponse{ + SrvKeyspaces: map[string]*topodatapb.SrvKeyspace{ + "zone1": { + ShardingColumnName: "zone1-sharding-col", + }, + }, + }, + shouldErr: false, + }, + { + name: "no srvkeyspace for single cell", + cells: []string{"zone1", "zone2"}, + srvKeyspaces: []*testutil.SrvKeyspace{ + { + Cell: "zone1", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone1-sharding-col", + }, + }, + }, + req: &vtctldatapb.GetSrvKeyspacesRequest{ + Keyspace: "testkeyspace", + }, + expected: &vtctldatapb.GetSrvKeyspacesResponse{ + SrvKeyspaces: map[string]*topodatapb.SrvKeyspace{ + "zone1": { + ShardingColumnName: "zone1-sharding-col", + }, + "zone2": nil, + }, + }, + shouldErr: false, + }, + { + name: "error getting cell names", + cells: []string{"zone1"}, + srvKeyspaces: []*testutil.SrvKeyspace{ + { + Cell: "zone1", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone1-sharding-col", + }, + }, + }, + topoErr: assert.AnError, + req: &vtctldatapb.GetSrvKeyspacesRequest{ + Keyspace: "testkeyspace", + }, + shouldErr: true, + }, + { + name: "error getting srvkeyspace", + cells: []string{"zone1"}, + srvKeyspaces: []*testutil.SrvKeyspace{ + { + Cell: "zone1", + Keyspace: "testkeyspace", + SrvKeyspace: &topodatapb.SrvKeyspace{ + ShardingColumnName: "zone1-sharding-col", + }, + }, + }, + topoErr: assert.AnError, + req: &vtctldatapb.GetSrvKeyspacesRequest{ + Keyspace: "testkeyspace", + Cells: []string{"zone1"}, + }, + shouldErr: true, + }, + } + + ctx := context.Background() + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + if tt.req == nil { + t.SkipNow() + } + + ts, topofactory := memorytopo.NewServerAndFactory(tt.cells...) + + testutil.AddSrvKeyspaces(t, ts, tt.srvKeyspaces...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + if tt.topoErr != nil { + topofactory.SetError(tt.topoErr) + } + + resp, err := vtctld.GetSrvKeyspaces(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestGetSrvVSchema(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory("zone1", "zone2") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + zone1SrvVSchema := &vschemapb.SrvVSchema{ + Keyspaces: map[string]*vschemapb.Keyspace{ + "testkeyspace": { + Sharded: true, + RequireExplicitRouting: false, + }, + }, + RoutingRules: &vschemapb.RoutingRules{ + Rules: []*vschemapb.RoutingRule{}, + }, + } + zone2SrvVSchema := &vschemapb.SrvVSchema{ + Keyspaces: map[string]*vschemapb.Keyspace{ + "testkeyspace": { + Sharded: true, + RequireExplicitRouting: false, + }, + "unsharded": { + Sharded: false, + RequireExplicitRouting: false, + }, + }, + RoutingRules: &vschemapb.RoutingRules{ + Rules: []*vschemapb.RoutingRule{}, + }, + } + + err := ts.UpdateSrvVSchema(ctx, "zone1", zone1SrvVSchema) + require.NoError(t, err, "cannot add zone1 srv vschema") + err = ts.UpdateSrvVSchema(ctx, "zone2", zone2SrvVSchema) + require.NoError(t, err, "cannot add zone2 srv vschema") + + expected := &vschemapb.SrvVSchema{ // have to copy our structs because of proto marshal artifacts + Keyspaces: map[string]*vschemapb.Keyspace{ + "testkeyspace": { + Sharded: true, + RequireExplicitRouting: false, + }, + }, + RoutingRules: &vschemapb.RoutingRules{ + Rules: []*vschemapb.RoutingRule{}, + }, + } + resp, err := vtctld.GetSrvVSchema(ctx, &vtctldatapb.GetSrvVSchemaRequest{Cell: "zone1"}) + assert.NoError(t, err) + utils.MustMatch(t, expected.Keyspaces, resp.SrvVSchema.Keyspaces, "GetSrvVSchema(zone1) mismatch") + assert.ElementsMatch(t, expected.RoutingRules.Rules, resp.SrvVSchema.RoutingRules.Rules, "GetSrvVSchema(zone1) rules mismatch") + + expected = &vschemapb.SrvVSchema{ // have to copy our structs because of proto marshal artifacts + Keyspaces: map[string]*vschemapb.Keyspace{ + "testkeyspace": { + Sharded: true, + RequireExplicitRouting: false, + }, + "unsharded": { + Sharded: false, + RequireExplicitRouting: false, + }, + }, + RoutingRules: &vschemapb.RoutingRules{ + Rules: []*vschemapb.RoutingRule{}, + }, + } + resp, err = vtctld.GetSrvVSchema(ctx, &vtctldatapb.GetSrvVSchemaRequest{Cell: "zone2"}) + assert.NoError(t, err) + utils.MustMatch(t, expected.Keyspaces, resp.SrvVSchema.Keyspaces, "GetSrvVSchema(zone2) mismatch") + assert.ElementsMatch(t, expected.RoutingRules.Rules, resp.SrvVSchema.RoutingRules.Rules, "GetSrvVSchema(zone2) rules mismatch") + + resp, err = vtctld.GetSrvVSchema(ctx, &vtctldatapb.GetSrvVSchemaRequest{Cell: "dne"}) + assert.Error(t, err, "GetSrvVSchema(dne)") + assert.Nil(t, resp, "GetSrvVSchema(dne)") + + topofactory.SetError(assert.AnError) + _, err = vtctld.GetSrvVSchema(ctx, &vtctldatapb.GetSrvVSchemaRequest{Cell: "zone1"}) + assert.Error(t, err) +} + +func TestGetTablet(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("cell1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + tablet := &topodatapb.Tablet{ + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Hostname: "localhost", + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_REPLICA, + } + + testutil.AddTablet(ctx, t, ts, tablet, nil) + + resp, err := vtctld.GetTablet(ctx, &vtctldatapb.GetTabletRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + }) + assert.NoError(t, err) + utils.MustMatch(t, resp.Tablet, tablet) + + // not found + _, err = vtctld.GetTablet(ctx, &vtctldatapb.GetTabletRequest{ + TabletAlias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + }) + assert.Error(t, err) +} + +func TestGetTablets(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + cells []string + tablets []*topodatapb.Tablet + req *vtctldatapb.GetTabletsRequest + expected []*topodatapb.Tablet + shouldErr bool + }{ + { + name: "no tablets", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{}, + req: &vtctldatapb.GetTabletsRequest{}, + expected: []*topodatapb.Tablet{}, + shouldErr: false, + }, + { + name: "keyspace and shard filter", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-80", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Keyspace: "ks1", + Shard: "80-", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 102, + }, + Keyspace: "ks2", + Shard: "-", + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Keyspace: "ks1", + Shard: "80-", + }, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Keyspace: "ks1", + Shard: "80-", + }, + }, + shouldErr: false, + }, + { + name: "keyspace filter", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Keyspace: "ks1", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 102, + }, + Keyspace: "otherkeyspace", + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Keyspace: "ks1", + }, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Keyspace: "ks1", + }, + }, + shouldErr: false, + }, + { + name: "keyspace and shard filter - stale primary", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-80", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Keyspace: "ks1", + Shard: "80-", + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 102, + }, + Keyspace: "ks2", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 15, 4, 5, 0, time.UTC)), + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 103, + }, + Keyspace: "ks2", + Shard: "-", + Hostname: "stale.primary", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 14, 4, 5, 0, time.UTC)), + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Keyspace: "ks2", + Shard: "-", + }, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 102, + }, + Keyspace: "ks2", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 15, 4, 5, 0, time.UTC)), + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 103, + }, + Keyspace: "ks2", + Shard: "-", + Hostname: "stale.primary", + Type: topodatapb.TabletType_UNKNOWN, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 14, 4, 5, 0, time.UTC)), + }, + }, + shouldErr: false, + }, + { + name: "stale primary", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-", + Hostname: "slightly less stale", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 15, 4, 5, 0, time.UTC)), + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Hostname: "stale primary", + Keyspace: "ks1", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 14, 4, 5, 0, time.UTC)), + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 103, + }, + Hostname: "true primary", + Keyspace: "ks1", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 16, 4, 5, 0, time.UTC)), + }, + }, + req: &vtctldatapb.GetTabletsRequest{}, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-", + Hostname: "slightly less stale", + Type: topodatapb.TabletType_UNKNOWN, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 15, 4, 5, 0, time.UTC)), + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 101, + }, + Hostname: "stale primary", + Keyspace: "ks1", + Shard: "-", + Type: topodatapb.TabletType_UNKNOWN, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 14, 4, 5, 0, time.UTC)), + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 103, + }, + Hostname: "true primary", + Keyspace: "ks1", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + MasterTermStartTime: logutil.TimeToProto(time.Date(2006, time.January, 2, 16, 4, 5, 0, time.UTC)), + }, + }, + shouldErr: false, + }, + { + name: "keyspace and shard filter - error", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{}, + req: &vtctldatapb.GetTabletsRequest{ + Keyspace: "ks1", + Shard: "-", + }, + expected: []*topodatapb.Tablet{}, + shouldErr: true, + }, + { + name: "cells filter", + cells: []string{"cell1", "cell2", "cell3"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell2", + Uid: 200, + }, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell3", + Uid: 300, + }, + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Cells: []string{"cell1", "cell3"}, + }, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell3", + Uid: 300, + }, + }, + }, + shouldErr: false, + }, + { + name: "cells filter with single error is nonfatal", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-", + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Cells: []string{"cell1", "doesnotexist"}, + }, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-", + }, + }, + shouldErr: false, + }, + { + name: "cells filter with single error is fatal in strict mode", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-", + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Cells: []string{"cell1", "doesnotexist"}, + Strict: true, + }, + shouldErr: true, + }, + { + name: "in nonstrict mode if all cells fail the request fails", + cells: []string{"cell1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "cell1", + Uid: 100, + }, + Keyspace: "ks1", + Shard: "-", + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + Cells: []string{"doesnotexist", "alsodoesnotexist"}, + }, + shouldErr: true, + }, + { + name: "tablet alias filtering", + cells: []string{"zone1"}, + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + req: &vtctldatapb.GetTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 100, + }, + { + // This tablet doesn't exist, but doesn't cause a failure. + Cell: "zone404", + Uid: 404, + }, + }, + // The below filters are ignored, because TabletAliases always + // takes precedence. + Keyspace: "another_keyspace", + Shard: "-80", + Cells: []string{"zone404"}, + }, + expected: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + }, + }, + shouldErr: false, + }, + { + name: "tablet alias filter with none found", + tablets: []*topodatapb.Tablet{}, + req: &vtctldatapb.GetTabletsRequest{ + TabletAliases: []*topodatapb.TabletAlias{ + { + Cell: "zone1", + Uid: 101, + }, + }, + }, + expected: []*topodatapb.Tablet{}, + shouldErr: false, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer(tt.cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + testutil.AddTablets(ctx, t, ts, nil, tt.tablets...) + + resp, err := vtctld.GetTablets(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + testutil.AssertSameTablets(t, tt.expected, resp.Tablets) + }) + } +} + +func TestGetVSchema(t *testing.T) { + t.Parallel() + + ctx := context.Background() + ts := memorytopo.NewServer("zone1") + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + t.Run("found", func(t *testing.T) { + t.Parallel() + + err := ts.SaveVSchema(ctx, "testkeyspace", &vschemapb.Keyspace{ + Sharded: true, + Vindexes: map[string]*vschemapb.Vindex{ + "v1": { + Type: "hash", + }, + }, + }) + require.NoError(t, err) + + expected := &vtctldatapb.GetVSchemaResponse{ + VSchema: &vschemapb.Keyspace{ + Sharded: true, + Vindexes: map[string]*vschemapb.Vindex{ + "v1": { + Type: "hash", + }, + }, + }, + } + + resp, err := vtctld.GetVSchema(ctx, &vtctldatapb.GetVSchemaRequest{ + Keyspace: "testkeyspace", + }) + assert.NoError(t, err) + utils.MustMatch(t, expected, resp) + }) + + t.Run("not found", func(t *testing.T) { + t.Parallel() + + _, err := vtctld.GetVSchema(ctx, &vtctldatapb.GetVSchemaRequest{ + Keyspace: "doesnotexist", + }) + assert.Error(t, err) + }) +} + +func TestRemoveKeyspaceCell(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + keyspace *vtctldatapb.Keyspace + shards []*vtctldatapb.Shard + topoError error + topoIsLocked bool + srvKeyspaceDoesNotExist bool + req *vtctldatapb.RemoveKeyspaceCellRequest + expected *vtctldatapb.RemoveKeyspaceCellResponse + shouldErr bool + }{ + { + name: "success", + keyspace: nil, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: nil, + topoIsLocked: false, + srvKeyspaceDoesNotExist: false, + req: &vtctldatapb.RemoveKeyspaceCellRequest{ + Keyspace: "testkeyspace", + Cell: "zone1", + }, + expected: &vtctldatapb.RemoveKeyspaceCellResponse{}, + shouldErr: false, + }, + { + name: "success/empty keyspace", + keyspace: &vtctldatapb.Keyspace{ + Name: "testkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + shards: nil, + topoError: nil, + topoIsLocked: false, + srvKeyspaceDoesNotExist: false, + req: &vtctldatapb.RemoveKeyspaceCellRequest{ + Keyspace: "testkeyspace", + Cell: "zone1", + }, + expected: &vtctldatapb.RemoveKeyspaceCellResponse{}, + shouldErr: false, + }, + { + name: "keyspace not found", + keyspace: &vtctldatapb.Keyspace{ + Name: "otherkeyspace", + Keyspace: &topodatapb.Keyspace{}, + }, + shards: nil, + topoError: nil, + topoIsLocked: false, + srvKeyspaceDoesNotExist: false, + req: &vtctldatapb.RemoveKeyspaceCellRequest{ + Keyspace: "testkeyspace", + Cell: "zone1", + }, + expected: nil, + shouldErr: true, + }, + { + name: "topo is down", + keyspace: nil, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: assert.AnError, + topoIsLocked: false, + srvKeyspaceDoesNotExist: false, + req: &vtctldatapb.RemoveKeyspaceCellRequest{ + Keyspace: "testkeyspace", + Cell: "zone1", + }, + expected: nil, + shouldErr: true, + }, + { + name: "topo is locked", + keyspace: nil, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: nil, + topoIsLocked: true, + srvKeyspaceDoesNotExist: false, + req: &vtctldatapb.RemoveKeyspaceCellRequest{ + Keyspace: "testkeyspace", + Cell: "zone1", + }, + expected: nil, + shouldErr: true, + }, + { + name: "srvkeyspace already deleted", + keyspace: nil, + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + topoError: nil, + topoIsLocked: false, + srvKeyspaceDoesNotExist: true, + req: &vtctldatapb.RemoveKeyspaceCellRequest{ + Keyspace: "testkeyspace", + Cell: "zone1", + }, + expected: nil, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + cells := []string{"zone1", "zone2", "zone3"} + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory(cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + // Setup topo + if tt.keyspace != nil { + testutil.AddKeyspace(ctx, t, ts, tt.keyspace) + } + + testutil.AddShards(ctx, t, ts, tt.shards...) + + // For certain tests, we don't actually create the SrvKeyspace + // object. + if !tt.srvKeyspaceDoesNotExist { + updateSrvKeyspace := func(keyspace string) { + for _, cell := range cells { + err := ts.UpdateSrvKeyspace(ctx, cell, keyspace, &topodatapb.SrvKeyspace{}) + require.NoError(t, err, "could not create empty SrvKeyspace for keyspace %s in cell %s", tt.req.Keyspace, cell) + } + } + + updateSrvKeyspace(tt.req.Keyspace) + if tt.keyspace != nil { + updateSrvKeyspace(tt.keyspace.Name) + } + } + + // Set errors and locks + if tt.topoError != nil { + topofactory.SetError(tt.topoError) + } + + if tt.topoIsLocked { + lctx, unlock, err := ts.LockKeyspace(ctx, tt.req.Keyspace, "testing locked keyspace") + require.NoError(t, err, "cannot lock keyspace %s", tt.req.Keyspace) + defer unlock(&err) + + ctx = lctx + } + + resp, err := vtctld.RemoveKeyspaceCell(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestRemoveShardCell(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + servingCells []string + shards []*vtctldatapb.Shard + replicationGraphs []*topo.ShardReplicationInfo + topoError error + topoIsLocked bool + req *vtctldatapb.RemoveShardCellRequest + expected *vtctldatapb.RemoveShardCellResponse + shouldErr bool + }{ + { + name: "success", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + replicationGraphs: []*topo.ShardReplicationInfo{ + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + }, + }, + }, "zone1", "testkeyspace", "-"), + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone2", + Uid: 200, + }, + }, + }, + }, "zone2", "testkeyspace", "-"), + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone3", + Uid: 300, + }, + }, + }, + }, "zone3", "testkeyspace", "-"), + }, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + Recursive: true, + }, + expected: &vtctldatapb.RemoveShardCellResponse{}, + shouldErr: false, + }, + { + name: "success/no tablets", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + }, + expected: &vtctldatapb.RemoveShardCellResponse{}, + shouldErr: false, + }, + { + name: "nonexistent shard", + shards: nil, + replicationGraphs: nil, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + }, + expected: nil, + shouldErr: true, + }, + { + name: "cell does not exist", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "fourthzone", + }, + expected: nil, + shouldErr: true, + }, + { + name: "cell not in serving list", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + servingCells: []string{"zone1"}, + replicationGraphs: nil, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + }, + expected: nil, + shouldErr: true, + }, + { + name: "tablets/non-recursive", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + replicationGraphs: []*topo.ShardReplicationInfo{ + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + }, + }, + }, "zone1", "testkeyspace", "-"), + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone2", + Uid: 200, + }, + }, + }, + }, "zone2", "testkeyspace", "-"), + topo.NewShardReplicationInfo(&topodatapb.ShardReplication{ + Nodes: []*topodatapb.ShardReplication_Node{ + { + TabletAlias: &topodatapb.TabletAlias{ + Cell: "zone3", + Uid: 300, + }, + }, + }, + }, "zone3", "testkeyspace", "-"), + }, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + Recursive: false, // non-recursive + replication graph = failure + }, + expected: nil, + shouldErr: true, + }, + { + name: "topo server down", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + replicationGraphs: nil, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + }, + topoError: assert.AnError, + topoIsLocked: false, + expected: nil, + shouldErr: true, + }, + // Not sure how to set up this test case. + // { + // name: "topo server down for replication check/no force", + // }, + // Not sure how to set up this test case. + // { + // name: "topo server down for replication check/force", + // }, + { + name: "cannot lock keyspace", + shards: []*vtctldatapb.Shard{ + { + Keyspace: "testkeyspace", + Name: "-", + }, + }, + replicationGraphs: nil, + req: &vtctldatapb.RemoveShardCellRequest{ + Keyspace: "testkeyspace", + ShardName: "-", + Cell: "zone2", + }, + topoError: nil, + topoIsLocked: true, + expected: nil, + shouldErr: true, + }, + // Not sure how to set up this test case. + // { + // name: "cannot delete srvkeyspace partition", + // }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + cells := []string{"zone1", "zone2", "zone3"} + + ctx := context.Background() + ts, topofactory := memorytopo.NewServerAndFactory(cells...) + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, ts, nil, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + // Setup shard topos and replication graphs. + testutil.AddShards(ctx, t, ts, tt.shards...) + testutil.SetupReplicationGraphs(ctx, t, ts, tt.replicationGraphs...) + + // Set up srvkeyspace partitions; a little gross. + servingCells := tt.servingCells + if servingCells == nil { // we expect an explicit empty list to have a shard with no serving cells + servingCells = cells + } + + for _, shard := range tt.shards { + lctx, unlock, lerr := ts.LockKeyspace(ctx, shard.Keyspace, "initializing serving graph for test") + require.NoError(t, lerr, "cannot lock keyspace %s to initialize serving graph", shard.Keyspace) + + for _, cell := range servingCells { + + err := ts.UpdateSrvKeyspace(lctx, cell, shard.Keyspace, &topodatapb.SrvKeyspace{ + Partitions: []*topodatapb.SrvKeyspace_KeyspacePartition{ + { + ServedType: topodatapb.TabletType_REPLICA, + ShardReferences: []*topodatapb.ShardReference{ + { + Name: shard.Name, + }, + }, + }, + }, + }) + require.NoError(t, err, "cannot update srvkeyspace for %s/%s in cell %v", shard.Keyspace, shard.Name, cell) + } + + unlock(&lerr) + } + + // Set errors and locks. + if tt.topoError != nil { + topofactory.SetError(tt.topoError) + } + + if tt.topoIsLocked { + lctx, unlock, err := ts.LockKeyspace(ctx, tt.req.Keyspace, "testing locked keyspace") + require.NoError(t, err, "cannot lock keyspace %s", tt.req.Keyspace) + defer unlock(&err) + + // Need to use the lock ctx in the RPC call so we fail when + // attempting to lock the keyspace rather than waiting forever + // for the lock. Explicitly setting a deadline would be another + // way to achieve this. + ctx = lctx + } + + // Make the RPC and assert things about it. + resp, err := vtctld.RemoveShardCell(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} + +func TestShardReplicationPositions(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + ts *topo.Server + tablets []*topodatapb.Tablet + tmc tmclient.TabletManagerClient + ctxTimeout time.Duration + req *vtctldatapb.ShardReplicationPositionsRequest + expected *vtctldatapb.ShardReplicationPositionsResponse + shouldErr bool + }{ + { + name: "success", + ts: memorytopo.NewServer("zone1"), + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_REPLICA, + }, + }, + tmc: &testutil.TabletManagerClient{ + MasterPositionResults: map[string]struct { + Position string + Error error + }{ + "zone1-0000000100": { + Position: "primary_tablet_position", + }, + }, + ReplicationStatusResults: map[string]struct { + Position *replicationdatapb.Status + Error error + }{ + "zone1-0000000101": { + Position: &replicationdatapb.Status{ + Position: "replica_tablet_position", + }, + }, + }, + }, + req: &vtctldatapb.ShardReplicationPositionsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }, + expected: &vtctldatapb.ShardReplicationPositionsResponse{ + ReplicationStatuses: map[string]*replicationdatapb.Status{ + "zone1-0000000100": { + Position: "primary_tablet_position", + }, + "zone1-0000000101": { + Position: "replica_tablet_position", + }, + }, + TabletMap: map[string]*topodatapb.Tablet{ + "zone1-0000000100": { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + }, + "zone1-0000000101": { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_REPLICA, + }, + }, + }, + shouldErr: false, + }, + { + name: "timeouts are nonfatal", + ts: memorytopo.NewServer("zone1"), + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_REPLICA, + }, + }, + tmc: &testutil.TabletManagerClient{ + MasterPositionDelays: map[string]time.Duration{ + "zone1-0000000100": time.Millisecond * 100, + }, + MasterPositionResults: map[string]struct { + Position string + Error error + }{ + "zone1-0000000100": { + Position: "primary_tablet_position", + }, + }, + ReplicationStatusDelays: map[string]time.Duration{ + "zone1-0000000101": time.Millisecond * 100, + }, + ReplicationStatusResults: map[string]struct { + Position *replicationdatapb.Status + Error error + }{ + "zone1-0000000101": { + Position: &replicationdatapb.Status{ + Position: "replica_tablet_position", + }, + }, + }, + }, + ctxTimeout: time.Millisecond * 10, + req: &vtctldatapb.ShardReplicationPositionsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }, + expected: &vtctldatapb.ShardReplicationPositionsResponse{ + ReplicationStatuses: map[string]*replicationdatapb.Status{ + "zone1-0000000100": nil, + "zone1-0000000101": nil, + }, + TabletMap: map[string]*topodatapb.Tablet{ + "zone1-0000000100": { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + }, + "zone1-0000000101": { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_REPLICA, + }, + }, + }, + shouldErr: false, + }, + { + name: "other rpc errors are fatal", + ts: memorytopo.NewServer("zone1"), + tablets: []*topodatapb.Tablet{ + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 100, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_MASTER, + }, + { + Alias: &topodatapb.TabletAlias{ + Cell: "zone1", + Uid: 101, + }, + Keyspace: "testkeyspace", + Shard: "-", + Type: topodatapb.TabletType_REPLICA, + }, + }, + tmc: &testutil.TabletManagerClient{ + MasterPositionResults: map[string]struct { + Position string + Error error + }{ + "zone1-0000000100": { + Error: assert.AnError, + }, + }, + ReplicationStatusResults: map[string]struct { + Position *replicationdatapb.Status + Error error + }{ + "zone1-0000000101": { + Position: &replicationdatapb.Status{ + Position: "replica_tablet_position", + }, + }, + }, + }, + req: &vtctldatapb.ShardReplicationPositionsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }, + expected: nil, + shouldErr: true, + }, + { + name: "nonexistent shard", + ts: memorytopo.NewServer("zone1"), + req: &vtctldatapb.ShardReplicationPositionsRequest{ + Keyspace: "testkeyspace", + Shard: "-", + }, + expected: nil, + shouldErr: true, + }, + } + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + ctx := context.Background() + + testutil.AddTablets(ctx, t, tt.ts, &testutil.AddTabletOptions{ + AlsoSetShardMaster: true, + SkipShardCreation: false, + }, tt.tablets...) + + vtctld := testutil.NewVtctldServerWithTabletManagerClient(t, tt.ts, tt.tmc, func(ts *topo.Server) vtctlservicepb.VtctldServer { + return NewVtctldServer(ts) + }) + + if tt.ctxTimeout > 0 { + _ctx, cancel := context.WithTimeout(ctx, tt.ctxTimeout) + defer cancel() + + ctx = _ctx + } + + resp, err := vtctld.ShardReplicationPositions(ctx, tt.req) + if tt.shouldErr { + assert.Error(t, err) + + return + } + + assert.NoError(t, err) + utils.MustMatch(t, tt.expected, resp) + }) + } +} diff --git a/go/vt/vtctl/grpcvtctldserver/testutil/proto_compare.go b/go/vt/vtctl/grpcvtctldserver/testutil/proto_compare.go index dd06ec80d84..9757c39a101 100644 --- a/go/vt/vtctl/grpcvtctldserver/testutil/proto_compare.go +++ b/go/vt/vtctl/grpcvtctldserver/testutil/proto_compare.go @@ -17,30 +17,87 @@ limitations under the License. package testutil import ( + "fmt" + "sort" "testing" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" + "vitess.io/vitess/go/test/utils" + + logutilpb "vitess.io/vitess/go/vt/proto/logutil" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) +// AssertEmergencyReparentShardResponsesEqual asserts that two +// vtctldatapb.EmergencyReparentShardResponse objects are equal, ignoring their +// respective Events field in the comparison. +func AssertEmergencyReparentShardResponsesEqual(t *testing.T, expected *vtctldatapb.EmergencyReparentShardResponse, actual *vtctldatapb.EmergencyReparentShardResponse, msgAndArgs ...interface{}) { + t.Helper() + + expected = proto.Clone(expected).(*vtctldatapb.EmergencyReparentShardResponse) + expected.Events = nil + + actual = proto.Clone(actual).(*vtctldatapb.EmergencyReparentShardResponse) + actual.Events = nil + + utils.MustMatch(t, expected, actual) +} + +func AssertSameTablets(t *testing.T, expected, actual []*topodatapb.Tablet) { + sort.Slice(expected, func(i, j int) bool { + return fmt.Sprintf("%v", expected[i]) < fmt.Sprintf("%v", expected[j]) + }) + sort.Slice(actual, func(i, j int) bool { + return fmt.Sprintf("%v", actual[i]) < fmt.Sprintf("%v", actual[j]) + }) + utils.MustMatch(t, expected, actual) +} + // AssertKeyspacesEqual is a convenience function to assert that two // vtctldatapb.Keyspace objects are equal, after clearing out any reserved // proto XXX_ fields. func AssertKeyspacesEqual(t *testing.T, expected *vtctldatapb.Keyspace, actual *vtctldatapb.Keyspace, msgAndArgs ...interface{}) { t.Helper() + utils.MustMatch(t, expected, actual) +} + +// AssertLogutilEventsOccurred asserts that for something containing a slice of +// logutilpb.Event, that the container is non-nil, and the event slice is +// non-zero. +// +// This test function is generalized with an anonymous interface that any +// protobuf type containing a slice of logutilpb.Event elements called Events, +// which is the convention in protobuf types in the Vitess codebase, already +// implements. +func AssertLogutilEventsOccurred(t *testing.T, container interface{ GetEvents() []*logutilpb.Event }, msgAndArgs ...interface{}) { + t.Helper() - for _, ks := range []*vtctldatapb.Keyspace{expected, actual} { - if ks.Keyspace != nil { - ks.Keyspace.XXX_sizecache = 0 - ks.Keyspace.XXX_unrecognized = nil - } + if container == nil { + assert.Fail(t, "Events container must not be nil", msgAndArgs...) + + return + } + + assert.Greater(t, len(container.GetEvents()), 0, msgAndArgs...) +} + +// AssertNoLogutilEventsOccurred asserts that for something containing a slice +// of logutilpb.Event, that the container is either nil, or that the event slice +// is exactly zero length. +// +// This test function is generalized with an anonymous interface that any +// protobuf type containing a slice of logutilpb.Event elements called Events, +// which is the convention in protobuf types in the Vitess codebase, already +// implements. +func AssertNoLogutilEventsOccurred(t *testing.T, container interface{ GetEvents() []*logutilpb.Event }, msgAndArgs ...interface{}) { + t.Helper() - if ks.Keyspace.SnapshotTime != nil { - ks.Keyspace.SnapshotTime.XXX_sizecache = 0 - ks.Keyspace.SnapshotTime.XXX_unrecognized = nil - } + if container == nil { + return } - assert.Equal(t, expected, actual, msgAndArgs...) + assert.Equal(t, len(container.GetEvents()), 0, msgAndArgs...) } diff --git a/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go b/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go index ccc4e53c5b0..5423d72c5cf 100644 --- a/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go +++ b/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go @@ -162,6 +162,8 @@ type TabletManagerClient struct { Result string Error error } + // keyed by tablet alias. + RefreshStateResults map[string]error ReplicationStatusDelays map[string]time.Duration ReplicationStatusResults map[string]struct { Position *replicationdatapb.Status @@ -366,6 +368,20 @@ func (fake *TabletManagerClient) PromoteReplica(ctx context.Context, tablet *top return "", assert.AnError } +// RefreshState is part of the tmclient.TabletManagerClient interface. +func (fake *TabletManagerClient) RefreshState(ctx context.Context, tablet *topodatapb.Tablet) error { + if fake.RefreshStateResults == nil { + return fmt.Errorf("%w: no RefreshState results on fake TabletManagerClient", assert.AnError) + } + + key := topoproto.TabletAliasString(tablet.Alias) + if err, ok := fake.RefreshStateResults[key]; ok { + return err + } + + return fmt.Errorf("%w: no RefreshState result set for tablet %s", assert.AnError, key) +} + // ReplicationStatus is part of the tmclient.TabletManagerClient interface. func (fake *TabletManagerClient) ReplicationStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error) { if fake.ReplicationStatusResults == nil { diff --git a/go/vt/vtctl/grpcvtctldserver/testutil/util.go b/go/vt/vtctl/grpcvtctldserver/testutil/util.go index c6298c86556..095e11dca89 100644 --- a/go/vt/vtctl/grpcvtctldserver/testutil/util.go +++ b/go/vt/vtctl/grpcvtctldserver/testutil/util.go @@ -20,13 +20,17 @@ package testutil import ( "context" + "errors" + "fmt" "testing" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/require" "golang.org/x/net/nettest" "google.golang.org/grpc" "vitess.io/vitess/go/vt/topo" + "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vtctl/vtctldclient" topodatapb "vitess.io/vitess/go/vt/proto/topodata" @@ -59,13 +63,48 @@ func WithTestServer( test(t, client) } +// WithTestServers creates N gRPC servers listening locally with the given RPC +// implementations, and then runs the test func with N clients created, where +// clients[i] points at servers[i]. +func WithTestServers( + t *testing.T, + test func(t *testing.T, clients ...vtctldclient.VtctldClient), + servers ...vtctlservicepb.VtctldServer, +) { + // Declare our recursive helper function so it can refer to itself. + var withTestServers func(t *testing.T, servers ...vtctlservicepb.VtctldServer) + + // Preallocate a slice of clients we're eventually going to call the test + // function with. + clients := make([]vtctldclient.VtctldClient, 0, len(servers)) + + withTestServers = func(t *testing.T, servers ...vtctlservicepb.VtctldServer) { + if len(servers) == 0 { + // We've started up all the test servers and accumulated clients for + // each of them (or there were no test servers to start, and we've + // accumulated no clients), so finally we run the test and stop + // recursing. + test(t, clients...) + + return + } + + // Start up a test server for the head of our server slice, accumulate + // the resulting client, and recurse on the tail of our server slice. + WithTestServer(t, servers[0], func(t *testing.T, client vtctldclient.VtctldClient) { + clients = append(clients, client) + withTestServers(t, servers[1:]...) + }) + } + + withTestServers(t, servers...) +} + // AddKeyspace adds a keyspace to a topology, failing a test if that keyspace // could not be added. It shallow copies the proto struct to prevent XXX_ fields // from changing in the marshalling. func AddKeyspace(ctx context.Context, t *testing.T, ts *topo.Server, ks *vtctldatapb.Keyspace) { - in := *ks.Keyspace // take a copy to avoid XXX_ fields changing. - - err := ts.CreateKeyspace(ctx, ks.Name, &in) + err := ts.CreateKeyspace(ctx, ks.Name, proto.Clone(ks.Keyspace).(*topodatapb.Keyspace)) require.NoError(t, err) } @@ -77,6 +116,23 @@ func AddKeyspaces(ctx context.Context, t *testing.T, ts *topo.Server, keyspaces } } +// AddTabletOptions is a container for different behaviors tests need from +// AddTablet. +type AddTabletOptions struct { + // AlsoSetShardMaster is an option to control additional setup to take when + // AddTablet receives a tablet of type MASTER. When set, AddTablet will also + // update the shard record to make that tablet the primary, and fail the + // test if the shard record has a serving primary already. + AlsoSetShardMaster bool + // ForceSetShardMaster, when combined with AlsoSetShardMaster, will ignore + // any existing primary in the shard, making the current tablet the serving + // primary (given it is type MASTER), and log that it has done so. + ForceSetShardMaster bool + // SkipShardCreation, when set, makes AddTablet never attempt to create a + // shard record in the topo under any circumstances. + SkipShardCreation bool +} + // AddTablet adds a tablet to the topology, failing a test if that tablet record // could not be created. It shallow copies to prevent XXX_ fields from changing, // including nested proto message fields. @@ -84,13 +140,24 @@ func AddKeyspaces(ctx context.Context, t *testing.T, ts *topo.Server, keyspaces // AddTablet also optionally adds empty keyspace and shard records to the // topology, if they are set on the tablet record and they cannot be retrieved // from the topo server without error. -func AddTablet(ctx context.Context, t *testing.T, ts *topo.Server, tablet *topodatapb.Tablet) { - in := *tablet - alias := *tablet.Alias - in.Alias = &alias +// +// If AddTablet receives a tablet record with a keyspace and shard set, and that +// tablet's type is MASTER, and opts.AlsoSetShardMaster is set, then AddTablet +// will update the shard record to make that tablet the shard master and set the +// shard to serving. If that shard record already has a serving primary, then +// AddTablet will fail the test. +func AddTablet(ctx context.Context, t *testing.T, ts *topo.Server, tablet *topodatapb.Tablet, opts *AddTabletOptions) { + tablet = proto.Clone(tablet).(*topodatapb.Tablet) + if opts == nil { + opts = &AddTabletOptions{} + } + + err := ts.CreateTablet(ctx, tablet) + require.NoError(t, err, "CreateTablet(%+v)", tablet) - err := ts.CreateTablet(ctx, &in) - require.NoError(t, err, "CreateTablet(%+v)", &in) + if opts.SkipShardCreation { + return + } if tablet.Keyspace != "" { if _, err := ts.GetKeyspace(ctx, tablet.Keyspace); err != nil { @@ -103,15 +170,36 @@ func AddTablet(ctx context.Context, t *testing.T, ts *topo.Server, tablet *topod err := ts.CreateShard(ctx, tablet.Keyspace, tablet.Shard) require.NoError(t, err, "CreateShard(%s, %s)", tablet.Keyspace, tablet.Shard) } + + if tablet.Type == topodatapb.TabletType_MASTER && opts.AlsoSetShardMaster { + _, err := ts.UpdateShardFields(ctx, tablet.Keyspace, tablet.Shard, func(si *topo.ShardInfo) error { + if si.IsMasterServing && si.MasterAlias != nil { + msg := fmt.Sprintf("shard %v/%v already has a serving master (%v)", tablet.Keyspace, tablet.Shard, topoproto.TabletAliasString(si.MasterAlias)) + + if !opts.ForceSetShardMaster { + return errors.New(msg) + } + + t.Logf("%s; replacing with %v because ForceSetShardMaster = true", msg, topoproto.TabletAliasString(tablet.Alias)) + } + + si.MasterAlias = tablet.Alias + si.IsMasterServing = true + si.MasterTermStartTime = tablet.MasterTermStartTime + + return nil + }) + require.NoError(t, err, "UpdateShardFields(%s, %s) to set %s as serving primary failed", tablet.Keyspace, tablet.Shard, topoproto.TabletAliasString(tablet.Alias)) + } } } } // AddTablets adds a list of tablets to the topology. See AddTablet for more // details. -func AddTablets(ctx context.Context, t *testing.T, ts *topo.Server, tablets ...*topodatapb.Tablet) { +func AddTablets(ctx context.Context, t *testing.T, ts *topo.Server, opts *AddTabletOptions, tablets ...*topodatapb.Tablet) { for _, tablet := range tablets { - AddTablet(ctx, t, ts, tablet) + AddTablet(ctx, t, ts, tablet, opts) } } @@ -130,6 +218,15 @@ func AddShards(ctx context.Context, t *testing.T, ts *topo.Server, shards ...*vt err := ts.CreateShard(ctx, shard.Keyspace, shard.Name) require.NoError(t, err, "CreateShard(%s/%s)", shard.Keyspace, shard.Name) + + if shard.Shard != nil { + _, err := ts.UpdateShardFields(ctx, shard.Keyspace, shard.Name, func(si *topo.ShardInfo) error { + si.Shard = shard.Shard + + return nil + }) + require.NoError(t, err, "UpdateShardFields(%s/%s, %v)", shard.Keyspace, shard.Name, shard.Shard) + } } } From 498c127425e01313fa3a56459c41774a0215fe0f Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Mon, 31 May 2021 21:18:29 -0400 Subject: [PATCH 4/9] Merge pull request #8221 from tinyspeck/sarabee-vtctld-getsrvvschemas [vtctld] Add GetSrvVSchemas command Signed-off-by: Andrew Mason --- .../internal/command/serving_graph.go | 52 +- go/vt/proto/vtctldata/vtctldata.pb.go | 466 +++++++++++------- go/vt/proto/vtctlservice/vtctlservice.pb.go | 125 +++-- go/vt/vtctl/grpcvtctldclient/client_gen.go | 9 + go/vt/vtctl/grpcvtctldserver/server.go | 42 +- proto/vtctldata.proto | 9 + proto/vtctlservice.proto | 5 +- 7 files changed, 468 insertions(+), 240 deletions(-) diff --git a/go/cmd/vtctldclient/internal/command/serving_graph.go b/go/cmd/vtctldclient/internal/command/serving_graph.go index 18a5d04ec37..35675ea2d18 100644 --- a/go/cmd/vtctldclient/internal/command/serving_graph.go +++ b/go/cmd/vtctldclient/internal/command/serving_graph.go @@ -29,15 +29,27 @@ import ( var ( // GetSrvKeyspaces makes a GetSrvKeyspaces gRPC call to a vtctld. GetSrvKeyspaces = &cobra.Command{ - Use: "GetSrvKeyspaces [ ...]", - Args: cobra.MinimumNArgs(1), - RunE: commandGetSrvKeyspaces, + Use: "GetSrvKeyspaces [ ...]", + Short: "Returns the SrvKeyspaces for the given keyspace in one or more cells.", + Args: cobra.MinimumNArgs(1), + RunE: commandGetSrvKeyspaces, + DisableFlagsInUseLine: true, } // GetSrvVSchema makes a GetSrvVSchema gRPC call to a vtctld. GetSrvVSchema = &cobra.Command{ - Use: "GetSrvVSchema cell", - Args: cobra.ExactArgs(1), - RunE: commandGetSrvVSchema, + Use: "GetSrvVSchema cell", + Short: "Returns the SrvVSchema for the given cell.", + Args: cobra.ExactArgs(1), + RunE: commandGetSrvVSchema, + DisableFlagsInUseLine: true, + } + // GetSrvVSchemas makes a GetSrvVSchemas gRPC call to a vtctld. + GetSrvVSchemas = &cobra.Command{ + Use: "GetSrvVSchemas [ ...]", + Short: "Returns the SrvVSchema for all cells, optionally filtered by the given cells.", + Args: cobra.ArbitraryArgs, + RunE: commandGetSrvVSchemas, + DisableFlagsInUseLine: true, } ) @@ -87,7 +99,35 @@ func commandGetSrvVSchema(cmd *cobra.Command, args []string) error { return nil } +func commandGetSrvVSchemas(cmd *cobra.Command, args []string) error { + cli.FinishedParsing(cmd) + + cells := cmd.Flags().Args()[0:] + + resp, err := client.GetSrvVSchemas(commandCtx, &vtctldatapb.GetSrvVSchemasRequest{ + Cells: cells, + }) + if err != nil { + return err + } + + // By default, an empty array will serialize as `null`, but `[]` is a little nicer. + data := []byte("[]") + + if len(resp.SrvVSchemas) > 0 { + data, err = cli.MarshalJSON(resp.SrvVSchemas) + if err != nil { + return err + } + } + + fmt.Printf("%s\n", data) + + return nil +} + func init() { Root.AddCommand(GetSrvKeyspaces) Root.AddCommand(GetSrvVSchema) + Root.AddCommand(GetSrvVSchemas) } diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 022eb4f1b12..fb479151b92 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -2561,6 +2561,85 @@ func (m *GetSrvVSchemaResponse) GetSrvVSchema() *vschema.SrvVSchema { return nil } +type GetSrvVSchemasRequest struct { + Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSrvVSchemasRequest) Reset() { *m = GetSrvVSchemasRequest{} } +func (m *GetSrvVSchemasRequest) String() string { return proto.CompactTextString(m) } +func (*GetSrvVSchemasRequest) ProtoMessage() {} +func (*GetSrvVSchemasRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f41247b323a1ab2e, []int{43} +} + +func (m *GetSrvVSchemasRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSrvVSchemasRequest.Unmarshal(m, b) +} +func (m *GetSrvVSchemasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSrvVSchemasRequest.Marshal(b, m, deterministic) +} +func (m *GetSrvVSchemasRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSrvVSchemasRequest.Merge(m, src) +} +func (m *GetSrvVSchemasRequest) XXX_Size() int { + return xxx_messageInfo_GetSrvVSchemasRequest.Size(m) +} +func (m *GetSrvVSchemasRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetSrvVSchemasRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSrvVSchemasRequest proto.InternalMessageInfo + +func (m *GetSrvVSchemasRequest) GetCells() []string { + if m != nil { + return m.Cells + } + return nil +} + +type GetSrvVSchemasResponse struct { + // SrvVSchemas is a mapping of cell name to SrvVSchema + SrvVSchemas map[string]*vschema.SrvVSchema `protobuf:"bytes,1,rep,name=srv_v_schemas,json=srvVSchemas,proto3" json:"srv_v_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSrvVSchemasResponse) Reset() { *m = GetSrvVSchemasResponse{} } +func (m *GetSrvVSchemasResponse) String() string { return proto.CompactTextString(m) } +func (*GetSrvVSchemasResponse) ProtoMessage() {} +func (*GetSrvVSchemasResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f41247b323a1ab2e, []int{44} +} + +func (m *GetSrvVSchemasResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSrvVSchemasResponse.Unmarshal(m, b) +} +func (m *GetSrvVSchemasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSrvVSchemasResponse.Marshal(b, m, deterministic) +} +func (m *GetSrvVSchemasResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSrvVSchemasResponse.Merge(m, src) +} +func (m *GetSrvVSchemasResponse) XXX_Size() int { + return xxx_messageInfo_GetSrvVSchemasResponse.Size(m) +} +func (m *GetSrvVSchemasResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetSrvVSchemasResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSrvVSchemasResponse proto.InternalMessageInfo + +func (m *GetSrvVSchemasResponse) GetSrvVSchemas() map[string]*vschema.SrvVSchema { + if m != nil { + return m.SrvVSchemas + } + return nil +} + type GetTabletRequest struct { TabletAlias *topodata.TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2572,7 +2651,7 @@ func (m *GetTabletRequest) Reset() { *m = GetTabletRequest{} } func (m *GetTabletRequest) String() string { return proto.CompactTextString(m) } func (*GetTabletRequest) ProtoMessage() {} func (*GetTabletRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{43} + return fileDescriptor_f41247b323a1ab2e, []int{45} } func (m *GetTabletRequest) XXX_Unmarshal(b []byte) error { @@ -2611,7 +2690,7 @@ func (m *GetTabletResponse) Reset() { *m = GetTabletResponse{} } func (m *GetTabletResponse) String() string { return proto.CompactTextString(m) } func (*GetTabletResponse) ProtoMessage() {} func (*GetTabletResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{44} + return fileDescriptor_f41247b323a1ab2e, []int{46} } func (m *GetTabletResponse) XXX_Unmarshal(b []byte) error { @@ -2668,7 +2747,7 @@ func (m *GetTabletsRequest) Reset() { *m = GetTabletsRequest{} } func (m *GetTabletsRequest) String() string { return proto.CompactTextString(m) } func (*GetTabletsRequest) ProtoMessage() {} func (*GetTabletsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{45} + return fileDescriptor_f41247b323a1ab2e, []int{47} } func (m *GetTabletsRequest) XXX_Unmarshal(b []byte) error { @@ -2735,7 +2814,7 @@ func (m *GetTabletsResponse) Reset() { *m = GetTabletsResponse{} } func (m *GetTabletsResponse) String() string { return proto.CompactTextString(m) } func (*GetTabletsResponse) ProtoMessage() {} func (*GetTabletsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{46} + return fileDescriptor_f41247b323a1ab2e, []int{48} } func (m *GetTabletsResponse) XXX_Unmarshal(b []byte) error { @@ -2774,7 +2853,7 @@ func (m *GetVSchemaRequest) Reset() { *m = GetVSchemaRequest{} } func (m *GetVSchemaRequest) String() string { return proto.CompactTextString(m) } func (*GetVSchemaRequest) ProtoMessage() {} func (*GetVSchemaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{47} + return fileDescriptor_f41247b323a1ab2e, []int{49} } func (m *GetVSchemaRequest) XXX_Unmarshal(b []byte) error { @@ -2813,7 +2892,7 @@ func (m *GetVSchemaResponse) Reset() { *m = GetVSchemaResponse{} } func (m *GetVSchemaResponse) String() string { return proto.CompactTextString(m) } func (*GetVSchemaResponse) ProtoMessage() {} func (*GetVSchemaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{48} + return fileDescriptor_f41247b323a1ab2e, []int{50} } func (m *GetVSchemaResponse) XXX_Unmarshal(b []byte) error { @@ -2853,7 +2932,7 @@ func (m *GetWorkflowsRequest) Reset() { *m = GetWorkflowsRequest{} } func (m *GetWorkflowsRequest) String() string { return proto.CompactTextString(m) } func (*GetWorkflowsRequest) ProtoMessage() {} func (*GetWorkflowsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{49} + return fileDescriptor_f41247b323a1ab2e, []int{51} } func (m *GetWorkflowsRequest) XXX_Unmarshal(b []byte) error { @@ -2899,7 +2978,7 @@ func (m *GetWorkflowsResponse) Reset() { *m = GetWorkflowsResponse{} } func (m *GetWorkflowsResponse) String() string { return proto.CompactTextString(m) } func (*GetWorkflowsResponse) ProtoMessage() {} func (*GetWorkflowsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{50} + return fileDescriptor_f41247b323a1ab2e, []int{52} } func (m *GetWorkflowsResponse) XXX_Unmarshal(b []byte) error { @@ -2946,7 +3025,7 @@ func (m *RemoveKeyspaceCellRequest) Reset() { *m = RemoveKeyspaceCellReq func (m *RemoveKeyspaceCellRequest) String() string { return proto.CompactTextString(m) } func (*RemoveKeyspaceCellRequest) ProtoMessage() {} func (*RemoveKeyspaceCellRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{51} + return fileDescriptor_f41247b323a1ab2e, []int{53} } func (m *RemoveKeyspaceCellRequest) XXX_Unmarshal(b []byte) error { @@ -3005,7 +3084,7 @@ func (m *RemoveKeyspaceCellResponse) Reset() { *m = RemoveKeyspaceCellRe func (m *RemoveKeyspaceCellResponse) String() string { return proto.CompactTextString(m) } func (*RemoveKeyspaceCellResponse) ProtoMessage() {} func (*RemoveKeyspaceCellResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{52} + return fileDescriptor_f41247b323a1ab2e, []int{54} } func (m *RemoveKeyspaceCellResponse) XXX_Unmarshal(b []byte) error { @@ -3046,7 +3125,7 @@ func (m *RemoveShardCellRequest) Reset() { *m = RemoveShardCellRequest{} func (m *RemoveShardCellRequest) String() string { return proto.CompactTextString(m) } func (*RemoveShardCellRequest) ProtoMessage() {} func (*RemoveShardCellRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{53} + return fileDescriptor_f41247b323a1ab2e, []int{55} } func (m *RemoveShardCellRequest) XXX_Unmarshal(b []byte) error { @@ -3112,7 +3191,7 @@ func (m *RemoveShardCellResponse) Reset() { *m = RemoveShardCellResponse func (m *RemoveShardCellResponse) String() string { return proto.CompactTextString(m) } func (*RemoveShardCellResponse) ProtoMessage() {} func (*RemoveShardCellResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{54} + return fileDescriptor_f41247b323a1ab2e, []int{56} } func (m *RemoveShardCellResponse) XXX_Unmarshal(b []byte) error { @@ -3146,7 +3225,7 @@ func (m *ReparentTabletRequest) Reset() { *m = ReparentTabletRequest{} } func (m *ReparentTabletRequest) String() string { return proto.CompactTextString(m) } func (*ReparentTabletRequest) ProtoMessage() {} func (*ReparentTabletRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{55} + return fileDescriptor_f41247b323a1ab2e, []int{57} } func (m *ReparentTabletRequest) XXX_Unmarshal(b []byte) error { @@ -3190,7 +3269,7 @@ func (m *ReparentTabletResponse) Reset() { *m = ReparentTabletResponse{} func (m *ReparentTabletResponse) String() string { return proto.CompactTextString(m) } func (*ReparentTabletResponse) ProtoMessage() {} func (*ReparentTabletResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{56} + return fileDescriptor_f41247b323a1ab2e, []int{58} } func (m *ReparentTabletResponse) XXX_Unmarshal(b []byte) error { @@ -3244,7 +3323,7 @@ func (m *ShardReplicationPositionsRequest) Reset() { *m = ShardReplicati func (m *ShardReplicationPositionsRequest) String() string { return proto.CompactTextString(m) } func (*ShardReplicationPositionsRequest) ProtoMessage() {} func (*ShardReplicationPositionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{57} + return fileDescriptor_f41247b323a1ab2e, []int{59} } func (m *ShardReplicationPositionsRequest) XXX_Unmarshal(b []byte) error { @@ -3295,7 +3374,7 @@ func (m *ShardReplicationPositionsResponse) Reset() { *m = ShardReplicat func (m *ShardReplicationPositionsResponse) String() string { return proto.CompactTextString(m) } func (*ShardReplicationPositionsResponse) ProtoMessage() {} func (*ShardReplicationPositionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{58} + return fileDescriptor_f41247b323a1ab2e, []int{60} } func (m *ShardReplicationPositionsResponse) XXX_Unmarshal(b []byte) error { @@ -3343,7 +3422,7 @@ func (m *TabletExternallyReparentedRequest) Reset() { *m = TabletExterna func (m *TabletExternallyReparentedRequest) String() string { return proto.CompactTextString(m) } func (*TabletExternallyReparentedRequest) ProtoMessage() {} func (*TabletExternallyReparentedRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{59} + return fileDescriptor_f41247b323a1ab2e, []int{61} } func (m *TabletExternallyReparentedRequest) XXX_Unmarshal(b []byte) error { @@ -3385,7 +3464,7 @@ func (m *TabletExternallyReparentedResponse) Reset() { *m = TabletExtern func (m *TabletExternallyReparentedResponse) String() string { return proto.CompactTextString(m) } func (*TabletExternallyReparentedResponse) ProtoMessage() {} func (*TabletExternallyReparentedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f41247b323a1ab2e, []int{60} + return fileDescriptor_f41247b323a1ab2e, []int{62} } func (m *TabletExternallyReparentedResponse) XXX_Unmarshal(b []byte) error { @@ -3487,6 +3566,9 @@ func init() { proto.RegisterMapType((map[string]*topodata.SrvKeyspace)(nil), "vtctldata.GetSrvKeyspacesResponse.SrvKeyspacesEntry") proto.RegisterType((*GetSrvVSchemaRequest)(nil), "vtctldata.GetSrvVSchemaRequest") proto.RegisterType((*GetSrvVSchemaResponse)(nil), "vtctldata.GetSrvVSchemaResponse") + proto.RegisterType((*GetSrvVSchemasRequest)(nil), "vtctldata.GetSrvVSchemasRequest") + proto.RegisterType((*GetSrvVSchemasResponse)(nil), "vtctldata.GetSrvVSchemasResponse") + proto.RegisterMapType((map[string]*vschema.SrvVSchema)(nil), "vtctldata.GetSrvVSchemasResponse.SrvVSchemasEntry") proto.RegisterType((*GetTabletRequest)(nil), "vtctldata.GetTabletRequest") proto.RegisterType((*GetTabletResponse)(nil), "vtctldata.GetTabletResponse") proto.RegisterType((*GetTabletsRequest)(nil), "vtctldata.GetTabletsRequest") @@ -3512,176 +3594,180 @@ func init() { func init() { proto.RegisterFile("vtctldata.proto", fileDescriptor_f41247b323a1ab2e) } var fileDescriptor_f41247b323a1ab2e = []byte{ - // 2733 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x3a, 0xcb, 0x6f, 0x1b, 0xc7, - 0xf9, 0xa0, 0x28, 0x52, 0xe4, 0xc7, 0x87, 0xa4, 0x11, 0x25, 0x6d, 0x98, 0xd8, 0x51, 0xd6, 0xb1, - 0xa3, 0x9f, 0x1d, 0x53, 0xb6, 0x92, 0x18, 0x81, 0x93, 0xfc, 0x6a, 0x59, 0xa2, 0x0c, 0x39, 0x8e, - 0xaa, 0x2e, 0x55, 0x05, 0xcd, 0xa1, 0xdb, 0xd1, 0xee, 0x88, 0x5e, 0x68, 0xb9, 0xcb, 0xec, 0x0c, - 0x29, 0x31, 0x3d, 0xf4, 0xd2, 0x1e, 0x0a, 0x14, 0xe8, 0x1f, 0x90, 0x4b, 0x4f, 0x3d, 0xf4, 0xd6, - 0x4b, 0x80, 0x02, 0x45, 0x8f, 0x3d, 0xf5, 0x1f, 0xe8, 0xb5, 0x87, 0xde, 0xfa, 0x3f, 0x14, 0xf3, - 0x5a, 0x2e, 0x97, 0x0f, 0xcb, 0x72, 0x4f, 0xda, 0xf9, 0x1e, 0x33, 0xdf, 0x7c, 0xef, 0x6f, 0x28, - 0x58, 0xec, 0x33, 0x87, 0xf9, 0x2e, 0x66, 0xb8, 0xd1, 0x8d, 0x42, 0x16, 0xa2, 0x62, 0x0c, 0xa8, - 0x2f, 0x9d, 0x7a, 0x81, 0x1f, 0xb6, 0x87, 0xc8, 0x7a, 0xc5, 0x0f, 0xdb, 0x3d, 0xe6, 0xf9, 0x6a, - 0x59, 0xed, 0x0c, 0xe8, 0xb7, 0xbe, 0xc3, 0xf4, 0x7a, 0x35, 0x22, 0x5d, 0xdf, 0x73, 0x30, 0xf3, - 0xc2, 0x20, 0xc1, 0xb5, 0xce, 0xf0, 0xa9, 0x4f, 0x58, 0x07, 0x07, 0xb8, 0x4d, 0xa2, 0x04, 0xa2, - 0xca, 0xc2, 0x6e, 0x98, 0xdc, 0xbe, 0x4f, 0x9d, 0x97, 0xa4, 0xa3, 0x97, 0xe5, 0x3e, 0x63, 0x5e, - 0x87, 0xc8, 0x95, 0xf9, 0x35, 0xd4, 0x9b, 0x97, 0xc4, 0xe9, 0x31, 0x72, 0xc2, 0x25, 0xdc, 0x0d, - 0x3b, 0x1d, 0x1c, 0xb8, 0x16, 0xf9, 0xb6, 0x47, 0x28, 0x43, 0x08, 0xe6, 0x71, 0xd4, 0xa6, 0x46, - 0x66, 0x23, 0xbb, 0x59, 0xb4, 0xc4, 0x37, 0xba, 0x0d, 0x55, 0xec, 0x70, 0x59, 0x6c, 0xbe, 0x4d, - 0xd8, 0x63, 0xc6, 0xdc, 0x46, 0x66, 0x33, 0x6b, 0x55, 0x24, 0xf4, 0x58, 0x02, 0xcd, 0x5d, 0x78, - 0x7b, 0xe2, 0xc6, 0xb4, 0x1b, 0x06, 0x94, 0xa0, 0xf7, 0x21, 0x47, 0xfa, 0x24, 0x60, 0x46, 0x66, - 0x23, 0xb3, 0x59, 0xda, 0xae, 0x36, 0xb4, 0x0e, 0x9a, 0x1c, 0x6a, 0x49, 0xa4, 0xf9, 0xdb, 0x0c, - 0x18, 0xc7, 0xfc, 0x9a, 0x5f, 0x61, 0x46, 0x22, 0x0f, 0xfb, 0xde, 0x77, 0xa4, 0x45, 0x18, 0xf3, - 0x82, 0x36, 0x45, 0xef, 0x41, 0x99, 0xe1, 0xa8, 0x4d, 0x98, 0x2d, 0x34, 0x21, 0x76, 0x2a, 0x5a, - 0x25, 0x09, 0x13, 0x5c, 0xe8, 0x1e, 0x2c, 0xd3, 0xb0, 0x17, 0x39, 0xc4, 0x26, 0x97, 0xdd, 0x88, - 0x50, 0xea, 0x85, 0x81, 0x10, 0xb7, 0x68, 0x2d, 0x49, 0x44, 0x33, 0x86, 0xa3, 0x1b, 0x00, 0x4e, - 0x44, 0x30, 0x23, 0xb6, 0xeb, 0xfa, 0x46, 0x56, 0x50, 0x15, 0x25, 0x64, 0xcf, 0xf5, 0xcd, 0x7f, - 0xce, 0xc1, 0xca, 0x24, 0x31, 0xea, 0x50, 0xb8, 0x08, 0xa3, 0xf3, 0x33, 0x3f, 0xbc, 0x50, 0x22, - 0xc4, 0x6b, 0xf4, 0x01, 0x2c, 0xaa, 0xf3, 0xcf, 0xc9, 0x80, 0x76, 0xb1, 0x43, 0xd4, 0xe9, 0x55, - 0x09, 0xfe, 0x52, 0x41, 0x39, 0xa1, 0xba, 0x4b, 0x4c, 0x28, 0x05, 0xa8, 0x4a, 0x70, 0x4c, 0x78, - 0x07, 0x16, 0x29, 0x0b, 0xbb, 0x36, 0x3e, 0x63, 0x24, 0xb2, 0x9d, 0xb0, 0x3b, 0x30, 0xe6, 0x37, - 0x32, 0x9b, 0x05, 0xab, 0xc2, 0xc1, 0x3b, 0x1c, 0xba, 0x1b, 0x76, 0x07, 0xe8, 0x39, 0x54, 0x85, - 0x56, 0x6c, 0xaa, 0xe4, 0x34, 0x72, 0x1b, 0xd9, 0xcd, 0xd2, 0xf6, 0xad, 0xc6, 0xd0, 0x35, 0xa7, - 0x69, 0xd6, 0xaa, 0x08, 0xd6, 0xf8, 0x86, 0x08, 0xe6, 0x1d, 0xe2, 0xfb, 0x46, 0x5e, 0x48, 0x24, - 0xbe, 0xa5, 0xf2, 0xb9, 0xff, 0xd9, 0x6c, 0xd0, 0x25, 0xd4, 0x58, 0xd0, 0xca, 0xe7, 0xb0, 0x63, - 0x0e, 0x42, 0xff, 0x07, 0x4b, 0xe4, 0x92, 0x91, 0x28, 0xc0, 0xbe, 0xed, 0xf8, 0x3d, 0xca, 0x48, - 0x64, 0x14, 0x04, 0xd9, 0xa2, 0x86, 0xef, 0x4a, 0xb0, 0x79, 0x08, 0x85, 0xf8, 0x86, 0x08, 0xe6, - 0x03, 0xdc, 0xd1, 0xe6, 0x14, 0xdf, 0xa8, 0x01, 0x85, 0x11, 0x05, 0x96, 0xb6, 0x51, 0x23, 0xf6, - 0x72, 0xcd, 0x69, 0xc5, 0x34, 0xe6, 0xcf, 0x21, 0xd7, 0x7a, 0x89, 0x23, 0x97, 0x1b, 0x27, 0x66, - 0x54, 0xc6, 0x39, 0x4f, 0x1f, 0x34, 0x97, 0x38, 0xe8, 0x36, 0xe4, 0x28, 0x67, 0x14, 0xda, 0x2f, - 0x6d, 0x2f, 0x0e, 0x4f, 0x11, 0xfb, 0x59, 0x12, 0x6b, 0xfe, 0xa7, 0x04, 0x85, 0xaf, 0xb5, 0x91, - 0x27, 0x09, 0xfc, 0x23, 0xc8, 0x4b, 0x0b, 0x2b, 0x71, 0x3f, 0x48, 0xa8, 0x5d, 0x33, 0x36, 0xac, - 0x61, 0x5c, 0xbf, 0x08, 0xe5, 0x5f, 0x4b, 0xb1, 0xf1, 0x0d, 0xa4, 0xe5, 0x95, 0x24, 0x57, 0xdf, - 0x40, 0xb2, 0xa1, 0x87, 0xb0, 0xda, 0xc1, 0x97, 0x76, 0xdf, 0x4e, 0x64, 0x0f, 0xdb, 0xc7, 0x6d, - 0xe1, 0x2e, 0x59, 0x0b, 0x75, 0xf0, 0xe5, 0x49, 0x92, 0x1f, 0xb7, 0xd1, 0x73, 0xa8, 0x88, 0xeb, - 0xd9, 0x94, 0x45, 0x04, 0x77, 0xb4, 0xcb, 0xdc, 0x9e, 0x74, 0xb4, 0x50, 0x47, 0x4b, 0xd2, 0x35, - 0x03, 0x16, 0x0d, 0xac, 0x32, 0x4d, 0x80, 0xea, 0xbf, 0x80, 0xe5, 0x31, 0x12, 0xb4, 0x04, 0xd9, - 0x73, 0x32, 0x50, 0x8a, 0xe2, 0x9f, 0xe8, 0x13, 0xc8, 0xf5, 0xb1, 0xdf, 0xd3, 0x6a, 0x7a, 0xf7, - 0x15, 0x47, 0x59, 0x92, 0xfa, 0xf1, 0xdc, 0xa7, 0x99, 0xfa, 0x01, 0xac, 0x4c, 0xb8, 0xff, 0x4c, - 0x8b, 0xaf, 0x41, 0x5e, 0x08, 0x49, 0x8d, 0x39, 0x91, 0xd0, 0xd4, 0xaa, 0xfe, 0x97, 0x0c, 0x94, - 0x12, 0xa7, 0xa0, 0x8f, 0x61, 0x41, 0xab, 0x20, 0x23, 0x54, 0x50, 0x9f, 0x28, 0x97, 0x14, 0x49, - 0x93, 0xa2, 0x7d, 0x1e, 0xc3, 0x22, 0x24, 0x9c, 0x30, 0x60, 0x51, 0xe8, 0xcb, 0x63, 0x4a, 0xdb, - 0x37, 0x52, 0x5e, 0x24, 0x03, 0x8f, 0xed, 0x4a, 0x2a, 0x4b, 0x06, 0xaa, 0x5e, 0x52, 0xf4, 0x21, - 0x20, 0x8f, 0xda, 0xdd, 0xc8, 0xeb, 0xe0, 0x68, 0x60, 0x53, 0x12, 0xf5, 0xbd, 0xa0, 0x2d, 0xdc, - 0xa0, 0x60, 0x2d, 0x79, 0xf4, 0x48, 0x22, 0x5a, 0x12, 0x5e, 0xff, 0x57, 0x1e, 0xf2, 0x4a, 0xec, - 0x2a, 0xcc, 0x79, 0xae, 0xb8, 0x74, 0xd6, 0x9a, 0xf3, 0x5c, 0x54, 0xd3, 0xce, 0x2c, 0x3d, 0x5c, - 0x2e, 0xd0, 0x7d, 0xee, 0x59, 0xfc, 0x40, 0xe5, 0x59, 0xab, 0x43, 0xe9, 0xa4, 0x5c, 0x3b, 0xbe, - 0x87, 0xa9, 0xa5, 0x88, 0xd0, 0x17, 0x50, 0x91, 0x05, 0xcb, 0x56, 0x0e, 0x3d, 0x2f, 0xb8, 0x8c, - 0x46, 0xa2, 0x8c, 0x3d, 0x15, 0x9f, 0x2d, 0x81, 0xb7, 0xca, 0xa7, 0x89, 0x15, 0x37, 0x47, 0x37, - 0xa4, 0x1e, 0x37, 0x8d, 0x91, 0x93, 0xe6, 0xd0, 0x6b, 0x74, 0x0b, 0x44, 0xd2, 0xb2, 0x63, 0x02, - 0x99, 0x60, 0xca, 0x1c, 0x78, 0xa4, 0x89, 0xf8, 0x25, 0x18, 0x66, 0x44, 0x65, 0x18, 0xb9, 0x40, - 0xeb, 0xb0, 0xe0, 0x9e, 0xda, 0x22, 0xec, 0x64, 0x4a, 0xc9, 0xbb, 0xa7, 0x87, 0x3c, 0xf0, 0x76, - 0x60, 0x95, 0x45, 0x38, 0xa0, 0x89, 0x12, 0x45, 0x19, 0xee, 0x74, 0x8d, 0xa2, 0x10, 0xbb, 0xdc, - 0x50, 0xd5, 0x8f, 0x97, 0x29, 0xab, 0x96, 0x20, 0x3d, 0xd6, 0x94, 0x68, 0x0b, 0xca, 0x9c, 0xc4, - 0xee, 0x75, 0x5d, 0xcc, 0x88, 0x6b, 0xc0, 0x04, 0xce, 0x12, 0xff, 0xfc, 0xa9, 0x24, 0x40, 0x06, - 0x2c, 0x74, 0x08, 0xa5, 0xb8, 0x4d, 0x8c, 0x92, 0x10, 0x46, 0x2f, 0x51, 0x13, 0x4a, 0x3c, 0x45, - 0xdb, 0x42, 0x68, 0x6a, 0x94, 0x85, 0x3b, 0xbc, 0x3f, 0xdd, 0x99, 0x1a, 0x3c, 0x77, 0xb7, 0x38, - 0xb1, 0x05, 0x8e, 0xfe, 0xa4, 0x68, 0x1b, 0xe6, 0xfd, 0xb0, 0x4d, 0x8d, 0x8a, 0xe0, 0xbf, 0x39, - 0x83, 0xff, 0x45, 0xd8, 0xb6, 0x04, 0x2d, 0x2f, 0x14, 0xdc, 0x68, 0x67, 0x84, 0x39, 0x2f, 0x6d, - 0x12, 0x45, 0x61, 0x64, 0x54, 0x85, 0x70, 0xbc, 0xdb, 0xd8, 0xe7, 0xd0, 0x26, 0x07, 0xd6, 0x1f, - 0x43, 0x31, 0x3e, 0x94, 0x2b, 0x3b, 0x59, 0x4b, 0xe5, 0x82, 0x2b, 0xdb, 0xc7, 0x94, 0xd9, 0xdd, - 0x73, 0xe5, 0x49, 0x79, 0xbe, 0x3c, 0x3a, 0xaf, 0xff, 0x3b, 0x03, 0xd9, 0x17, 0x61, 0x7b, 0xcc, - 0xf1, 0xde, 0x86, 0xa2, 0x0c, 0x0a, 0xdb, 0x73, 0x55, 0x77, 0x50, 0x90, 0x80, 0x03, 0x97, 0xa7, - 0x4b, 0x5e, 0x32, 0x54, 0x7d, 0x13, 0xdf, 0x43, 0x23, 0xcf, 0x27, 0x8d, 0x7c, 0x4f, 0x17, 0x64, - 0xd7, 0xc6, 0x4c, 0x78, 0x4f, 0xda, 0x0c, 0xaa, 0x3c, 0xbb, 0x3b, 0x8c, 0x13, 0x2b, 0x83, 0x71, - 0xe2, 0xfc, 0x24, 0x62, 0x85, 0xdf, 0x61, 0x49, 0x8b, 0x2d, 0x8c, 0x5a, 0xac, 0x06, 0x39, 0x27, - 0xec, 0x05, 0x4c, 0xb8, 0x55, 0xd6, 0x92, 0x0b, 0xf3, 0xfb, 0x0c, 0xac, 0xef, 0xbe, 0xc4, 0x41, - 0x9b, 0x1c, 0xc7, 0x05, 0x4e, 0xf7, 0x48, 0x9f, 0xc6, 0x95, 0x10, 0xf3, 0xc0, 0x51, 0x0d, 0xcd, - 0x94, 0xa8, 0x52, 0x05, 0x52, 0x2c, 0xd0, 0x7d, 0xe1, 0xc4, 0x42, 0x19, 0x5c, 0x49, 0xd5, 0xed, - 0x5a, 0x9a, 0x49, 0x9c, 0x93, 0x77, 0x4f, 0xf9, 0x5f, 0xe1, 0xf3, 0xd1, 0xc0, 0x8e, 0x7a, 0x81, - 0x4a, 0x06, 0x79, 0x37, 0x1a, 0x58, 0xbd, 0xc0, 0xfc, 0x63, 0x06, 0x8c, 0x71, 0xe9, 0x54, 0xa3, - 0xf5, 0x09, 0x54, 0x4e, 0xc9, 0x59, 0x18, 0x11, 0x5b, 0x45, 0xbd, 0x94, 0x6f, 0x29, 0x7d, 0x94, - 0x55, 0x96, 0x64, 0x72, 0x85, 0x3e, 0x82, 0xb2, 0x6c, 0x31, 0x14, 0xd7, 0xdc, 0x14, 0xae, 0x92, - 0xa0, 0x52, 0x4c, 0x37, 0xa1, 0x74, 0x81, 0xa9, 0x3d, 0x2a, 0x65, 0xf1, 0x02, 0xd3, 0x3d, 0x29, - 0xe8, 0x0f, 0x59, 0x58, 0xdd, 0x15, 0x16, 0x8b, 0x6b, 0xf6, 0xb0, 0xd1, 0x1c, 0xab, 0xa1, 0x35, - 0xc8, 0x9d, 0x85, 0xba, 0x84, 0x16, 0x2c, 0xb9, 0x40, 0x5b, 0x50, 0xc3, 0xbe, 0x1f, 0x5e, 0xd8, - 0xa4, 0xd3, 0x65, 0x03, 0xbb, 0x6f, 0xcb, 0xe6, 0x56, 0x1d, 0xb6, 0x2c, 0x70, 0x4d, 0x8e, 0x3a, - 0x69, 0x09, 0x04, 0x7a, 0x00, 0x35, 0x91, 0xf8, 0xbc, 0xa0, 0x6d, 0x3b, 0xa1, 0xdf, 0xeb, 0x04, - 0x32, 0x6f, 0x48, 0x57, 0x43, 0x1a, 0xb7, 0x2b, 0x50, 0x22, 0x87, 0x3c, 0x1f, 0xe7, 0x10, 0x46, - 0xca, 0x09, 0x23, 0x19, 0xe3, 0x9d, 0xc7, 0x81, 0x2b, 0x54, 0x9e, 0xda, 0x4b, 0x18, 0xed, 0x09, - 0x94, 0x79, 0x06, 0x27, 0xae, 0x7d, 0x16, 0x85, 0x1d, 0x6a, 0xe4, 0xd3, 0x15, 0x41, 0xef, 0xd1, - 0x68, 0x09, 0xb2, 0xfd, 0x28, 0xec, 0x58, 0x25, 0x1a, 0x7f, 0x53, 0x74, 0x57, 0xc5, 0xcb, 0x82, - 0x38, 0x7d, 0x6d, 0x9c, 0x53, 0x9c, 0x2d, 0xe3, 0xe8, 0x16, 0x54, 0x4e, 0x31, 0x4d, 0x74, 0x9b, - 0x32, 0x39, 0x96, 0x39, 0x30, 0x6e, 0xb0, 0x1e, 0x42, 0x85, 0x06, 0xb8, 0x4b, 0x5f, 0x86, 0x4c, - 0xe4, 0xc7, 0x89, 0xa9, 0xb1, 0xac, 0x49, 0xf8, 0xca, 0x3c, 0x80, 0xb5, 0xb4, 0xdd, 0x94, 0x7b, - 0x6d, 0xa5, 0xca, 0x6d, 0x69, 0x7b, 0x25, 0x91, 0x9e, 0x26, 0xb4, 0x66, 0xbf, 0xcb, 0x00, 0x92, - 0x7b, 0xc9, 0x8e, 0x4a, 0x39, 0xc0, 0xac, 0xb2, 0x7d, 0x03, 0x40, 0xf6, 0x25, 0x89, 0x76, 0xad, - 0x28, 0x20, 0x87, 0x23, 0x7e, 0x92, 0x4d, 0xfa, 0xc9, 0x6d, 0xa8, 0x7a, 0x81, 0xe3, 0xf7, 0x5c, - 0x62, 0x77, 0x71, 0xc4, 0x27, 0x0d, 0xd5, 0x27, 0x2b, 0xe8, 0x91, 0x00, 0x9a, 0x7f, 0xc8, 0xc0, - 0xca, 0x88, 0x38, 0xd7, 0xbc, 0x17, 0xba, 0x93, 0x2c, 0xb6, 0x3c, 0x52, 0x86, 0xd4, 0xc9, 0xd6, - 0x31, 0x76, 0x47, 0x1b, 0xfb, 0x11, 0xc1, 0xee, 0xc0, 0x26, 0x97, 0x1e, 0x65, 0x54, 0x09, 0x2f, - 0x5d, 0x68, 0x47, 0xa2, 0x9a, 0x02, 0x63, 0xfe, 0x04, 0x56, 0xf7, 0x88, 0x4f, 0xc6, 0x83, 0x66, - 0x96, 0xce, 0xde, 0x81, 0x62, 0x44, 0x9c, 0x5e, 0x44, 0xbd, 0xbe, 0x0e, 0xa0, 0x21, 0xc0, 0x34, - 0x60, 0x2d, 0xbd, 0xa5, 0xbc, 0xb7, 0xf9, 0x9b, 0x0c, 0xac, 0x48, 0x94, 0x90, 0x9a, 0xea, 0xb3, - 0x36, 0xe3, 0xd6, 0x49, 0x76, 0x44, 0xe3, 0xf7, 0x53, 0xf8, 0xd9, 0x27, 0xf3, 0xb2, 0xc4, 0x47, - 0x3b, 0xdb, 0x3b, 0x8b, 0x3b, 0x1b, 0x65, 0x17, 0x0e, 0x3e, 0x38, 0x53, 0x6d, 0x8d, 0xb9, 0x06, - 0xb5, 0x51, 0x31, 0x94, 0x7c, 0x03, 0x0d, 0x97, 0x29, 0x27, 0x96, 0xef, 0x73, 0x35, 0xef, 0xa8, - 0x2c, 0x4c, 0xb4, 0x9c, 0x53, 0xf2, 0x70, 0x25, 0x91, 0x87, 0x09, 0xe5, 0x71, 0x23, 0x93, 0x8a, - 0xea, 0xba, 0x94, 0xdc, 0x65, 0x01, 0x54, 0x0d, 0x97, 0xb9, 0xae, 0xed, 0x10, 0x1f, 0xad, 0x64, - 0xfa, 0xfd, 0x1c, 0xdc, 0x68, 0x76, 0x48, 0xd4, 0x26, 0x81, 0x33, 0xb0, 0x88, 0x74, 0xb7, 0x2b, - 0x7b, 0xf7, 0xe4, 0x2e, 0xed, 0x11, 0x94, 0x02, 0x32, 0x94, 0x67, 0x66, 0xab, 0x06, 0x01, 0xd1, - 0x42, 0xa2, 0xff, 0x87, 0x45, 0xaf, 0x1d, 0xf0, 0x74, 0xaf, 0xfa, 0x7e, 0x6a, 0xcc, 0xcf, 0x52, - 0x44, 0x55, 0x52, 0xab, 0x4e, 0x9a, 0xa2, 0x3d, 0x58, 0xbd, 0xc0, 0x1e, 0x8b, 0xb9, 0xe3, 0x21, - 0x3f, 0x17, 0xbb, 0xb5, 0x48, 0x12, 0x7b, 0xbd, 0x48, 0xce, 0x1b, 0x2b, 0x9c, 0x5c, 0xb3, 0xeb, - 0xe1, 0xff, 0xaf, 0x19, 0xb8, 0x39, 0x4d, 0x23, 0x2a, 0xc0, 0x5e, 0x5f, 0x25, 0x4f, 0x60, 0xa9, - 0x1b, 0x85, 0x9d, 0x90, 0x97, 0xf8, 0x2b, 0xe9, 0x65, 0x51, 0x93, 0x6b, 0xe5, 0xdc, 0x81, 0xbc, - 0x78, 0x57, 0xd0, 0x3a, 0x49, 0xbf, 0x3a, 0x28, 0xac, 0xf9, 0x39, 0xdc, 0xdc, 0xf7, 0x02, 0x77, - 0xc7, 0xf7, 0xa5, 0xf7, 0x1d, 0x04, 0xaf, 0x11, 0x7a, 0xe6, 0xdf, 0x32, 0xf0, 0xee, 0x54, 0x76, - 0x75, 0xfb, 0xc3, 0x54, 0x38, 0x3d, 0x4a, 0x84, 0xd3, 0x2b, 0x78, 0x65, 0xb8, 0xa9, 0xa1, 0x4b, - 0x4f, 0x30, 0x5f, 0xaa, 0x01, 0x66, 0xea, 0xa0, 0x75, 0x67, 0x74, 0xd0, 0x9a, 0x90, 0x9e, 0xe2, - 0xc9, 0xca, 0x6c, 0xc2, 0xf2, 0x33, 0xc2, 0x9e, 0x62, 0xe7, 0xbc, 0xd7, 0xa5, 0xd7, 0x76, 0x61, - 0x73, 0x0f, 0x50, 0x72, 0x1b, 0x75, 0xf3, 0x06, 0x2c, 0x9c, 0x4a, 0x90, 0xba, 0x7a, 0xad, 0x11, - 0xbf, 0x77, 0x49, 0xda, 0x83, 0xe0, 0x2c, 0xb4, 0x34, 0x91, 0xf9, 0x16, 0xac, 0x3f, 0x23, 0x6c, - 0x97, 0xf8, 0x3e, 0x87, 0xf3, 0x84, 0xaf, 0x45, 0x32, 0x1f, 0x80, 0x31, 0x8e, 0x52, 0xc7, 0xd4, - 0x20, 0xc7, 0xab, 0x85, 0x7e, 0xba, 0x92, 0x0b, 0x73, 0x53, 0x88, 0xa4, 0x39, 0x12, 0xcd, 0x87, - 0x78, 0xdf, 0xc8, 0x0c, 0xdf, 0x37, 0xcc, 0x7d, 0x58, 0x19, 0xa1, 0x8c, 0xcb, 0x42, 0x91, 0xa3, - 0x6d, 0x2f, 0x38, 0x0b, 0x55, 0x5d, 0x48, 0xbc, 0x44, 0xc4, 0xe4, 0x05, 0x47, 0x7d, 0xf1, 0x4c, - 0xab, 0xf6, 0xa1, 0x2a, 0xd9, 0x68, 0xe9, 0x7f, 0xc8, 0xc4, 0x37, 0x1b, 0xa2, 0xd4, 0x31, 0x07, - 0xb0, 0x30, 0x9a, 0xc6, 0xb6, 0x12, 0xf6, 0x9a, 0xc2, 0xd4, 0x50, 0x6b, 0xe9, 0x18, 0x9a, 0xbf, - 0x7e, 0x04, 0xe5, 0x24, 0x62, 0x82, 0x6b, 0xdc, 0x1d, 0x75, 0x8d, 0xda, 0xe8, 0x7d, 0xe4, 0x31, - 0x49, 0xf7, 0x58, 0x15, 0xaa, 0xd1, 0x6e, 0x19, 0xdf, 0xe7, 0x00, 0x6a, 0xa3, 0x60, 0x75, 0x97, - 0x87, 0x50, 0xd4, 0x8e, 0xa2, 0x6f, 0x33, 0xb1, 0x94, 0x0e, 0xa9, 0xcc, 0x07, 0xc2, 0x4c, 0xaf, - 0x13, 0x73, 0xfb, 0x23, 0x32, 0x5d, 0xbf, 0x3b, 0xf9, 0xf5, 0x1c, 0x2c, 0x3d, 0x23, 0x4c, 0xb6, - 0x8e, 0x6f, 0xde, 0xe1, 0xaf, 0xa9, 0x59, 0x3b, 0x7e, 0x70, 0x90, 0x2b, 0xde, 0x9c, 0x90, 0x4b, - 0xd9, 0x9c, 0x28, 0x7c, 0x56, 0xe0, 0x2b, 0x0a, 0x7a, 0x2c, 0xc9, 0x6e, 0x81, 0xee, 0x56, 0xec, - 0xbe, 0x47, 0x2e, 0xa8, 0x2a, 0x95, 0x65, 0x05, 0x3c, 0xe1, 0x30, 0xb4, 0x09, 0x4b, 0xf2, 0xa5, - 0x4f, 0xb8, 0xb8, 0x1d, 0x06, 0xfe, 0x40, 0x24, 0xeb, 0x82, 0x7a, 0x58, 0x10, 0x71, 0xf1, 0xe3, - 0xc0, 0x1f, 0x0c, 0x29, 0xa9, 0xf7, 0x9d, 0xa6, 0xcc, 0x27, 0x28, 0x5b, 0x1c, 0xcc, 0x29, 0xcd, - 0x23, 0x91, 0x01, 0xb4, 0x16, 0x94, 0x32, 0x3f, 0x83, 0xbc, 0xea, 0xb5, 0xa5, 0x02, 0x6e, 0x35, - 0xc6, 0x5f, 0xa0, 0x25, 0xcb, 0x1e, 0x39, 0xf3, 0x02, 0x4f, 0xbd, 0x67, 0x09, 0x88, 0xf9, 0x02, - 0x16, 0xf9, 0x8e, 0xff, 0x9b, 0x96, 0xcf, 0x7c, 0x2c, 0xad, 0x34, 0x52, 0x50, 0xe2, 0x06, 0x2c, - 0x33, 0xb3, 0x01, 0x33, 0x9f, 0x8b, 0x88, 0x6c, 0x45, 0xfd, 0xb4, 0x07, 0xbf, 0x2a, 0xc5, 0xf1, - 0x98, 0xd6, 0x86, 0x94, 0x0b, 0xf3, 0x1f, 0x32, 0x86, 0x47, 0x37, 0x53, 0xf2, 0xfc, 0x0c, 0x2a, - 0x34, 0xea, 0xdb, 0x69, 0xdf, 0xff, 0x78, 0x34, 0x92, 0x27, 0xb1, 0x36, 0x92, 0x40, 0xfd, 0xb8, - 0x96, 0x00, 0xd5, 0x4f, 0x60, 0x79, 0x8c, 0x64, 0x42, 0x60, 0xdf, 0x1b, 0x0d, 0xec, 0x84, 0xc3, - 0x26, 0xb8, 0x93, 0x91, 0x7d, 0x57, 0x84, 0x70, 0x2b, 0xea, 0x9f, 0x8c, 0x06, 0xc0, 0xa4, 0x04, - 0x79, 0x08, 0xab, 0x29, 0xda, 0x78, 0xe0, 0xe4, 0xc2, 0x0e, 0x07, 0xb3, 0x38, 0xee, 0xd4, 0xaf, - 0x10, 0x09, 0x16, 0xa0, 0xf1, 0xb7, 0xf9, 0x42, 0x98, 0x54, 0x4d, 0x95, 0x6f, 0x1a, 0x78, 0xe6, - 0x17, 0xc2, 0x81, 0xf5, 0x6e, 0x4a, 0xb2, 0xcd, 0xf8, 0xe5, 0x6b, 0xda, 0x0c, 0xac, 0xf0, 0xe6, - 0x9f, 0x33, 0x09, 0xfe, 0xeb, 0x97, 0xc0, 0xa1, 0xd7, 0x64, 0x13, 0x5e, 0x23, 0x9e, 0x21, 0x59, - 0xe4, 0x39, 0x7a, 0x24, 0x51, 0xab, 0x09, 0x3d, 0x6c, 0xee, 0xea, 0x3d, 0xac, 0xf9, 0x44, 0x24, - 0xcd, 0x54, 0x6f, 0x8a, 0xee, 0xc2, 0x82, 0x24, 0x1b, 0x36, 0xee, 0xe9, 0x4b, 0x6b, 0x02, 0x73, - 0x4b, 0x5c, 0x3a, 0x65, 0xfb, 0x59, 0x59, 0xf7, 0xa9, 0x38, 0x32, 0xed, 0x00, 0x1f, 0x42, 0x21, - 0x65, 0xfc, 0xe5, 0xd8, 0xf8, 0xb1, 0xd7, 0x2d, 0xf4, 0x95, 0xdd, 0x2d, 0x91, 0xb9, 0xf5, 0x3b, - 0xd6, 0x95, 0x74, 0xfd, 0x2e, 0x94, 0xb0, 0xc3, 0xbc, 0x3e, 0x91, 0x29, 0x4c, 0xf6, 0xea, 0x20, - 0x41, 0x22, 0x7d, 0xc9, 0x52, 0x94, 0xd8, 0x73, 0x58, 0x8a, 0xf4, 0x4f, 0x33, 0x93, 0x4a, 0x91, - 0x66, 0xb0, 0x86, 0x54, 0xe6, 0xaf, 0xe0, 0x2d, 0x8b, 0x74, 0xc2, 0x7e, 0x3c, 0x29, 0xf1, 0x9a, - 0x78, 0x15, 0x21, 0x75, 0xcc, 0xcc, 0x25, 0x7e, 0x34, 0x99, 0x3c, 0xa9, 0x8e, 0x0c, 0x4c, 0xf3, - 0xe9, 0x51, 0xed, 0x1d, 0xa8, 0x4f, 0x12, 0x40, 0x8d, 0x1e, 0xdf, 0x67, 0x60, 0x4d, 0xa2, 0x45, - 0x8e, 0xbb, 0xaa, 0x70, 0xaf, 0x98, 0xa8, 0xb5, 0xec, 0xd9, 0x49, 0xb2, 0xcf, 0x4f, 0x95, 0x3d, - 0x97, 0x96, 0xfd, 0x2d, 0x58, 0x1f, 0x13, 0x4e, 0x09, 0xbe, 0x0f, 0xab, 0x7a, 0x2e, 0x18, 0x8d, - 0xf9, 0xfb, 0xa9, 0x20, 0x9d, 0xfd, 0x3c, 0x6d, 0xfe, 0x92, 0xdf, 0x7f, 0x74, 0x9f, 0x6b, 0x0f, - 0x18, 0x5b, 0xb0, 0x70, 0xa5, 0xb9, 0x42, 0x53, 0x99, 0xc7, 0xb0, 0xa1, 0x6a, 0x50, 0xfc, 0x3b, - 0x84, 0x7e, 0xb7, 0x7e, 0x83, 0xbe, 0xf9, 0x4f, 0x59, 0x78, 0x6f, 0xc6, 0xb6, 0xea, 0x7a, 0x97, - 0x50, 0x4b, 0xfe, 0xb2, 0x43, 0x19, 0x66, 0xbd, 0x61, 0xbf, 0xd8, 0x1c, 0xab, 0x7e, 0x33, 0xf6, - 0x4a, 0xfe, 0x8e, 0xd4, 0x52, 0xfb, 0xc8, 0xb2, 0xb3, 0x12, 0x8d, 0x63, 0xd0, 0x37, 0x00, 0x2a, - 0x4d, 0x75, 0x70, 0x57, 0xfd, 0xc4, 0xf1, 0xd9, 0x6b, 0x9d, 0x27, 0x95, 0xf9, 0x15, 0xee, 0xca, - 0x53, 0x8a, 0x4c, 0xaf, 0xeb, 0x36, 0x18, 0xd3, 0x84, 0x99, 0x50, 0xe0, 0xee, 0x8f, 0x16, 0xb8, - 0xf5, 0x46, 0xfa, 0x97, 0x72, 0xb9, 0x41, 0xf2, 0x57, 0xa3, 0x43, 0xa8, 0x8e, 0x9e, 0x7e, 0x95, - 0x59, 0x29, 0x9d, 0x31, 0x13, 0x25, 0xd3, 0x82, 0xf7, 0x24, 0xb0, 0xa9, 0x7e, 0xd2, 0xf4, 0xe3, - 0x79, 0x97, 0xb8, 0xd7, 0xf4, 0xe9, 0xbf, 0x67, 0xc0, 0x9c, 0xb5, 0xe9, 0xb5, 0x1d, 0xfc, 0xba, - 0x8f, 0x0a, 0x8f, 0xa0, 0x14, 0xfa, 0xc3, 0xa1, 0x7b, 0x7e, 0x26, 0x5f, 0xe8, 0xeb, 0x79, 0xfb, - 0xe9, 0xe6, 0x37, 0x77, 0xfa, 0x1e, 0x23, 0x94, 0x36, 0xbc, 0x70, 0x4b, 0x7e, 0x6d, 0xb5, 0xc3, - 0xad, 0x3e, 0xdb, 0x12, 0xff, 0x7c, 0xb0, 0x15, 0xfb, 0xcc, 0x69, 0x5e, 0x00, 0x3e, 0xfa, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x6a, 0x1a, 0xcc, 0x39, 0x21, 0x00, 0x00, + // 2786 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x3a, 0xcb, 0x6f, 0xe3, 0xc6, + 0xf9, 0xa0, 0x65, 0xc9, 0xd2, 0xa7, 0x87, 0xbd, 0xb4, 0x6c, 0x33, 0x4a, 0x76, 0xe3, 0x70, 0xb3, + 0x1b, 0x67, 0x93, 0x95, 0x13, 0xe7, 0x81, 0x20, 0x8f, 0xdf, 0x2f, 0x5e, 0x5b, 0x0e, 0xbc, 0xd9, + 0xb8, 0x2e, 0xe5, 0x3a, 0x68, 0x0e, 0x65, 0xc7, 0xe4, 0x58, 0x4b, 0x98, 0x22, 0x15, 0xce, 0x48, + 0xb6, 0xd2, 0x43, 0x2f, 0xed, 0xa1, 0x40, 0x81, 0xfe, 0x01, 0xb9, 0xf4, 0xd4, 0x43, 0x6f, 0xbd, + 0x04, 0x28, 0x50, 0xf4, 0xd6, 0x9e, 0xfa, 0x0f, 0xf4, 0xda, 0x43, 0x6f, 0xfd, 0x1f, 0x8a, 0x79, + 0x51, 0x24, 0x45, 0x69, 0xbd, 0xde, 0x9e, 0xcc, 0xf9, 0x1e, 0x33, 0xdf, 0x7c, 0xef, 0x6f, 0x64, + 0x58, 0x1e, 0x51, 0x87, 0xfa, 0x2e, 0xa2, 0xa8, 0x3d, 0x88, 0x42, 0x1a, 0xea, 0x95, 0x18, 0xd0, + 0x5a, 0x39, 0xf3, 0x02, 0x3f, 0xec, 0x4d, 0x90, 0xad, 0xba, 0x1f, 0xf6, 0x86, 0xd4, 0xf3, 0xe5, + 0xb2, 0xd1, 0x1f, 0x93, 0x6f, 0x7d, 0x87, 0xaa, 0xf5, 0x5a, 0x84, 0x07, 0xbe, 0xe7, 0x20, 0xea, + 0x85, 0x41, 0x82, 0x6b, 0x83, 0xa2, 0x33, 0x1f, 0xd3, 0x3e, 0x0a, 0x50, 0x0f, 0x47, 0x09, 0x44, + 0x83, 0x86, 0x83, 0x30, 0xb9, 0xfd, 0x88, 0x38, 0x4f, 0x71, 0x5f, 0x2d, 0x6b, 0x23, 0x4a, 0xbd, + 0x3e, 0x16, 0x2b, 0xf3, 0x6b, 0x68, 0x75, 0xae, 0xb0, 0x33, 0xa4, 0xf8, 0x94, 0x49, 0xb8, 0x17, + 0xf6, 0xfb, 0x28, 0x70, 0x2d, 0xfc, 0xed, 0x10, 0x13, 0xaa, 0xeb, 0xb0, 0x88, 0xa2, 0x1e, 0x31, + 0xb4, 0xcd, 0xc2, 0x56, 0xc5, 0xe2, 0xdf, 0xfa, 0x3d, 0x68, 0x20, 0x87, 0xc9, 0x62, 0xb3, 0x6d, + 0xc2, 0x21, 0x35, 0x16, 0x36, 0xb5, 0xad, 0x82, 0x55, 0x17, 0xd0, 0x13, 0x01, 0x34, 0xf7, 0xe0, + 0xe5, 0xdc, 0x8d, 0xc9, 0x20, 0x0c, 0x08, 0xd6, 0x5f, 0x87, 0x22, 0x1e, 0xe1, 0x80, 0x1a, 0xda, + 0xa6, 0xb6, 0x55, 0xdd, 0x69, 0xb4, 0x95, 0x0e, 0x3a, 0x0c, 0x6a, 0x09, 0xa4, 0xf9, 0x1b, 0x0d, + 0x8c, 0x13, 0x76, 0xcd, 0xaf, 0x10, 0xc5, 0x91, 0x87, 0x7c, 0xef, 0x3b, 0xdc, 0xc5, 0x94, 0x7a, + 0x41, 0x8f, 0xe8, 0xaf, 0x41, 0x8d, 0xa2, 0xa8, 0x87, 0xa9, 0xcd, 0x35, 0xc1, 0x77, 0xaa, 0x58, + 0x55, 0x01, 0xe3, 0x5c, 0xfa, 0x5b, 0x70, 0x8b, 0x84, 0xc3, 0xc8, 0xc1, 0x36, 0xbe, 0x1a, 0x44, + 0x98, 0x10, 0x2f, 0x0c, 0xb8, 0xb8, 0x15, 0x6b, 0x45, 0x20, 0x3a, 0x31, 0x5c, 0xbf, 0x0d, 0xe0, + 0x44, 0x18, 0x51, 0x6c, 0xbb, 0xae, 0x6f, 0x14, 0x38, 0x55, 0x45, 0x40, 0xf6, 0x5d, 0xdf, 0xfc, + 0xe7, 0x02, 0xac, 0xe6, 0x89, 0xd1, 0x82, 0xf2, 0x65, 0x18, 0x5d, 0x9c, 0xfb, 0xe1, 0xa5, 0x14, + 0x21, 0x5e, 0xeb, 0x6f, 0xc0, 0xb2, 0x3c, 0xff, 0x02, 0x8f, 0xc9, 0x00, 0x39, 0x58, 0x9e, 0xde, + 0x10, 0xe0, 0x2f, 0x25, 0x94, 0x11, 0xca, 0xbb, 0xc4, 0x84, 0x42, 0x80, 0x86, 0x00, 0xc7, 0x84, + 0xf7, 0x61, 0x99, 0xd0, 0x70, 0x60, 0xa3, 0x73, 0x8a, 0x23, 0xdb, 0x09, 0x07, 0x63, 0x63, 0x71, + 0x53, 0xdb, 0x2a, 0x5b, 0x75, 0x06, 0xde, 0x65, 0xd0, 0xbd, 0x70, 0x30, 0xd6, 0x1f, 0x43, 0x83, + 0x6b, 0xc5, 0x26, 0x52, 0x4e, 0xa3, 0xb8, 0x59, 0xd8, 0xaa, 0xee, 0xdc, 0x6d, 0x4f, 0x5c, 0x73, + 0x96, 0x66, 0xad, 0x3a, 0x67, 0x8d, 0x6f, 0xa8, 0xc3, 0xa2, 0x83, 0x7d, 0xdf, 0x28, 0x71, 0x89, + 0xf8, 0xb7, 0x50, 0x3e, 0xf3, 0x3f, 0x9b, 0x8e, 0x07, 0x98, 0x18, 0x4b, 0x4a, 0xf9, 0x0c, 0x76, + 0xc2, 0x40, 0xfa, 0x9b, 0xb0, 0x82, 0xaf, 0x28, 0x8e, 0x02, 0xe4, 0xdb, 0x8e, 0x3f, 0x24, 0x14, + 0x47, 0x46, 0x99, 0x93, 0x2d, 0x2b, 0xf8, 0x9e, 0x00, 0x9b, 0x47, 0x50, 0x8e, 0x6f, 0xa8, 0xc3, + 0x62, 0x80, 0xfa, 0xca, 0x9c, 0xfc, 0x5b, 0x6f, 0x43, 0x39, 0xa5, 0xc0, 0xea, 0x8e, 0xde, 0x8e, + 0xbd, 0x5c, 0x71, 0x5a, 0x31, 0x8d, 0xf9, 0x33, 0x28, 0x76, 0x9f, 0xa2, 0xc8, 0x65, 0xc6, 0x89, + 0x19, 0xa5, 0x71, 0x2e, 0xb2, 0x07, 0x2d, 0x24, 0x0e, 0xba, 0x07, 0x45, 0xc2, 0x18, 0xb9, 0xf6, + 0xab, 0x3b, 0xcb, 0x93, 0x53, 0xf8, 0x7e, 0x96, 0xc0, 0x9a, 0xff, 0xa9, 0x42, 0xf9, 0x6b, 0x65, + 0xe4, 0x3c, 0x81, 0xff, 0x1f, 0x4a, 0xc2, 0xc2, 0x52, 0xdc, 0x37, 0x12, 0x6a, 0x57, 0x8c, 0x6d, + 0x6b, 0x12, 0xd7, 0x4f, 0x42, 0xf1, 0xd7, 0x92, 0x6c, 0x6c, 0x03, 0x61, 0x79, 0x29, 0xc9, 0xf5, + 0x37, 0x10, 0x6c, 0xfa, 0xbb, 0xb0, 0xd6, 0x47, 0x57, 0xf6, 0xc8, 0x4e, 0x64, 0x0f, 0xdb, 0x47, + 0x3d, 0xee, 0x2e, 0x05, 0x4b, 0xef, 0xa3, 0xab, 0xd3, 0x24, 0x3f, 0xea, 0xe9, 0x8f, 0xa1, 0xce, + 0xaf, 0x67, 0x13, 0x1a, 0x61, 0xd4, 0x57, 0x2e, 0x73, 0x2f, 0xef, 0x68, 0xae, 0x8e, 0xae, 0xa0, + 0xeb, 0x04, 0x34, 0x1a, 0x5b, 0x35, 0x92, 0x00, 0xb5, 0x7e, 0x0e, 0xb7, 0xa6, 0x48, 0xf4, 0x15, + 0x28, 0x5c, 0xe0, 0xb1, 0x54, 0x14, 0xfb, 0xd4, 0x3f, 0x80, 0xe2, 0x08, 0xf9, 0x43, 0xa5, 0xa6, + 0x57, 0x9f, 0x71, 0x94, 0x25, 0xa8, 0x3f, 0x5e, 0xf8, 0x48, 0x6b, 0x1d, 0xc2, 0x6a, 0xce, 0xfd, + 0xe7, 0x5a, 0x7c, 0x1d, 0x4a, 0x5c, 0x48, 0x62, 0x2c, 0xf0, 0x84, 0x26, 0x57, 0xad, 0x3f, 0x6b, + 0x50, 0x4d, 0x9c, 0xa2, 0xbf, 0x0f, 0x4b, 0x4a, 0x05, 0x1a, 0x57, 0x41, 0x2b, 0x57, 0x2e, 0x21, + 0x92, 0x22, 0xd5, 0x0f, 0x58, 0x0c, 0xf3, 0x90, 0x70, 0xc2, 0x80, 0x46, 0xa1, 0x2f, 0x8e, 0xa9, + 0xee, 0xdc, 0xce, 0x78, 0x91, 0x08, 0x3c, 0xba, 0x27, 0xa8, 0x2c, 0x11, 0xa8, 0x6a, 0x49, 0xf4, + 0xb7, 0x41, 0xf7, 0x88, 0x3d, 0x88, 0xbc, 0x3e, 0x8a, 0xc6, 0x36, 0xc1, 0xd1, 0xc8, 0x0b, 0x7a, + 0xdc, 0x0d, 0xca, 0xd6, 0x8a, 0x47, 0x8e, 0x05, 0xa2, 0x2b, 0xe0, 0xad, 0x7f, 0x95, 0xa0, 0x24, + 0xc5, 0x6e, 0xc0, 0x82, 0xe7, 0xf2, 0x4b, 0x17, 0xac, 0x05, 0xcf, 0xd5, 0x9b, 0xca, 0x99, 0x85, + 0x87, 0x8b, 0x85, 0xfe, 0x90, 0x79, 0x16, 0x3b, 0x50, 0x7a, 0xd6, 0xda, 0x44, 0x3a, 0x21, 0xd7, + 0xae, 0xef, 0x21, 0x62, 0x49, 0x22, 0xfd, 0x33, 0xa8, 0x8b, 0x82, 0x65, 0x4b, 0x87, 0x5e, 0xe4, + 0x5c, 0x46, 0x3b, 0x51, 0xc6, 0x1e, 0xf1, 0xcf, 0x2e, 0xc7, 0x5b, 0xb5, 0xb3, 0xc4, 0x8a, 0x99, + 0x63, 0x10, 0x12, 0x8f, 0x99, 0xc6, 0x28, 0x0a, 0x73, 0xa8, 0xb5, 0x7e, 0x17, 0x78, 0xd2, 0xb2, + 0x63, 0x02, 0x91, 0x60, 0x6a, 0x0c, 0x78, 0xac, 0x88, 0xd8, 0x25, 0x28, 0xa2, 0x58, 0x66, 0x18, + 0xb1, 0xd0, 0x37, 0x60, 0xc9, 0x3d, 0xb3, 0x79, 0xd8, 0x89, 0x94, 0x52, 0x72, 0xcf, 0x8e, 0x58, + 0xe0, 0xed, 0xc2, 0x1a, 0x8d, 0x50, 0x40, 0x12, 0x25, 0x8a, 0x50, 0xd4, 0x1f, 0x18, 0x15, 0x2e, + 0x76, 0xad, 0x2d, 0xab, 0x1f, 0x2b, 0x53, 0x56, 0x33, 0x41, 0x7a, 0xa2, 0x28, 0xf5, 0x6d, 0xa8, + 0x31, 0x12, 0x7b, 0x38, 0x70, 0x11, 0xc5, 0xae, 0x01, 0x39, 0x9c, 0x55, 0xf6, 0xf9, 0x13, 0x41, + 0xa0, 0x1b, 0xb0, 0xd4, 0xc7, 0x84, 0xa0, 0x1e, 0x36, 0xaa, 0x5c, 0x18, 0xb5, 0xd4, 0x3b, 0x50, + 0x65, 0x29, 0xda, 0xe6, 0x42, 0x13, 0xa3, 0xc6, 0xdd, 0xe1, 0xf5, 0xd9, 0xce, 0xd4, 0x66, 0xb9, + 0xbb, 0xcb, 0x88, 0x2d, 0x70, 0xd4, 0x27, 0xd1, 0x77, 0x60, 0xd1, 0x0f, 0x7b, 0xc4, 0xa8, 0x73, + 0xfe, 0x3b, 0x73, 0xf8, 0x9f, 0x84, 0x3d, 0x8b, 0xd3, 0xb2, 0x42, 0xc1, 0x8c, 0x76, 0x8e, 0xa9, + 0xf3, 0xd4, 0xc6, 0x51, 0x14, 0x46, 0x46, 0x83, 0x0b, 0xc7, 0xba, 0x8d, 0x03, 0x06, 0xed, 0x30, + 0x60, 0xeb, 0x63, 0xa8, 0xc4, 0x87, 0x32, 0x65, 0x27, 0x6b, 0xa9, 0x58, 0x30, 0x65, 0xfb, 0x88, + 0x50, 0x7b, 0x70, 0x21, 0x3d, 0xa9, 0xc4, 0x96, 0xc7, 0x17, 0xad, 0x7f, 0x6b, 0x50, 0x78, 0x12, + 0xf6, 0xa6, 0x1c, 0xef, 0x65, 0xa8, 0x88, 0xa0, 0xb0, 0x3d, 0x57, 0x76, 0x07, 0x65, 0x01, 0x38, + 0x74, 0x59, 0xba, 0x64, 0x25, 0x43, 0xd6, 0x37, 0xfe, 0x3d, 0x31, 0xf2, 0x62, 0xd2, 0xc8, 0x6f, + 0xa9, 0x82, 0xec, 0xda, 0x88, 0x72, 0xef, 0xc9, 0x9a, 0x41, 0x96, 0x67, 0x77, 0x97, 0x32, 0x62, + 0x69, 0x30, 0x46, 0x5c, 0xca, 0x23, 0x96, 0xf8, 0x5d, 0x9a, 0xb4, 0xd8, 0x52, 0xda, 0x62, 0x4d, + 0x28, 0x3a, 0xe1, 0x30, 0xa0, 0xdc, 0xad, 0x0a, 0x96, 0x58, 0x98, 0xdf, 0x6b, 0xb0, 0xb1, 0xf7, + 0x14, 0x05, 0x3d, 0x7c, 0x12, 0x17, 0x38, 0xd5, 0x23, 0x7d, 0x14, 0x57, 0x42, 0xc4, 0x02, 0x47, + 0x36, 0x34, 0x33, 0xa2, 0x4a, 0x16, 0x48, 0xbe, 0xd0, 0x1f, 0x72, 0x27, 0xe6, 0xca, 0x60, 0x4a, + 0x6a, 0xec, 0x34, 0xb3, 0x4c, 0xfc, 0x9c, 0x92, 0x7b, 0xc6, 0xfe, 0x72, 0x9f, 0x8f, 0xc6, 0x76, + 0x34, 0x0c, 0x64, 0x32, 0x28, 0xb9, 0xd1, 0xd8, 0x1a, 0x06, 0xe6, 0x1f, 0x34, 0x30, 0xa6, 0xa5, + 0x93, 0x8d, 0xd6, 0x07, 0x50, 0x3f, 0xc3, 0xe7, 0x61, 0x84, 0x6d, 0x19, 0xf5, 0x42, 0xbe, 0x95, + 0xec, 0x51, 0x56, 0x4d, 0x90, 0x89, 0x95, 0xfe, 0x1e, 0xd4, 0x44, 0x8b, 0x21, 0xb9, 0x16, 0x66, + 0x70, 0x55, 0x39, 0x95, 0x64, 0xba, 0x03, 0xd5, 0x4b, 0x44, 0xec, 0xb4, 0x94, 0x95, 0x4b, 0x44, + 0xf6, 0x85, 0xa0, 0x3f, 0x14, 0x60, 0x6d, 0x8f, 0x5b, 0x2c, 0xae, 0xd9, 0x93, 0x46, 0x73, 0xaa, + 0x86, 0x36, 0xa1, 0x78, 0x1e, 0xaa, 0x12, 0x5a, 0xb6, 0xc4, 0x42, 0xdf, 0x86, 0x26, 0xf2, 0xfd, + 0xf0, 0xd2, 0xc6, 0xfd, 0x01, 0x1d, 0xdb, 0x23, 0x5b, 0x34, 0xb7, 0xf2, 0xb0, 0x5b, 0x1c, 0xd7, + 0x61, 0xa8, 0xd3, 0x2e, 0x47, 0xe8, 0xef, 0x40, 0x93, 0x27, 0x3e, 0x2f, 0xe8, 0xd9, 0x4e, 0xe8, + 0x0f, 0xfb, 0x81, 0xc8, 0x1b, 0xc2, 0xd5, 0x74, 0x85, 0xdb, 0xe3, 0x28, 0x9e, 0x43, 0x1e, 0x4f, + 0x73, 0x70, 0x23, 0x15, 0xb9, 0x91, 0x8c, 0xe9, 0xce, 0xe3, 0xd0, 0xe5, 0x2a, 0xcf, 0xec, 0xc5, + 0x8d, 0xf6, 0x39, 0xd4, 0x58, 0x06, 0xc7, 0xae, 0x7d, 0x1e, 0x85, 0x7d, 0x62, 0x94, 0xb2, 0x15, + 0x41, 0xed, 0xd1, 0xee, 0x72, 0xb2, 0x83, 0x28, 0xec, 0x5b, 0x55, 0x12, 0x7f, 0x13, 0xfd, 0x81, + 0x8c, 0x97, 0x25, 0x7e, 0xfa, 0xfa, 0x34, 0x27, 0x3f, 0x5b, 0xc4, 0xd1, 0x5d, 0xa8, 0x9f, 0x21, + 0x92, 0xe8, 0x36, 0x45, 0x72, 0xac, 0x31, 0x60, 0xdc, 0x60, 0xbd, 0x0b, 0x75, 0x12, 0xa0, 0x01, + 0x79, 0x1a, 0x52, 0x9e, 0x1f, 0x73, 0x53, 0x63, 0x4d, 0x91, 0xb0, 0x95, 0x79, 0x08, 0xeb, 0x59, + 0xbb, 0x49, 0xf7, 0xda, 0xce, 0x94, 0xdb, 0xea, 0xce, 0x6a, 0x22, 0x3d, 0xe5, 0xb4, 0x66, 0xbf, + 0xd5, 0x40, 0x17, 0x7b, 0x89, 0x8e, 0x4a, 0x3a, 0xc0, 0xbc, 0xb2, 0x7d, 0x1b, 0x40, 0xf4, 0x25, + 0x89, 0x76, 0xad, 0xc2, 0x21, 0x47, 0x29, 0x3f, 0x29, 0x24, 0xfd, 0xe4, 0x1e, 0x34, 0xbc, 0xc0, + 0xf1, 0x87, 0x2e, 0xb6, 0x07, 0x28, 0x62, 0x93, 0x86, 0xec, 0x93, 0x25, 0xf4, 0x98, 0x03, 0xcd, + 0xdf, 0x6b, 0xb0, 0x9a, 0x12, 0xe7, 0x86, 0xf7, 0xd2, 0xef, 0x27, 0x8b, 0x2d, 0x8b, 0x94, 0x09, + 0x75, 0xb2, 0x75, 0x8c, 0xdd, 0xd1, 0x46, 0x7e, 0x84, 0x91, 0x3b, 0xb6, 0xf1, 0x95, 0x47, 0x28, + 0x91, 0xc2, 0x0b, 0x17, 0xda, 0x15, 0xa8, 0x0e, 0xc7, 0x98, 0x3f, 0x86, 0xb5, 0x7d, 0xec, 0xe3, + 0xe9, 0xa0, 0x99, 0xa7, 0xb3, 0x57, 0xa0, 0x12, 0x61, 0x67, 0x18, 0x11, 0x6f, 0xa4, 0x02, 0x68, + 0x02, 0x30, 0x0d, 0x58, 0xcf, 0x6e, 0x29, 0xee, 0x6d, 0xfe, 0x5a, 0x83, 0x55, 0x81, 0xe2, 0x52, + 0x13, 0x75, 0xd6, 0x56, 0xdc, 0x3a, 0x89, 0x8e, 0x68, 0xfa, 0x7e, 0x12, 0x3f, 0xff, 0x64, 0x56, + 0x96, 0xd8, 0x68, 0x67, 0x7b, 0xe7, 0x71, 0x67, 0x23, 0xed, 0xc2, 0xc0, 0x87, 0xe7, 0xb2, 0xad, + 0x31, 0xd7, 0xa1, 0x99, 0x16, 0x43, 0xca, 0x37, 0x56, 0x70, 0x91, 0x72, 0x62, 0xf9, 0x3e, 0x95, + 0xf3, 0x8e, 0xcc, 0xc2, 0x58, 0xc9, 0x39, 0x23, 0x0f, 0xd7, 0x13, 0x79, 0x18, 0x13, 0x16, 0x37, + 0x22, 0xa9, 0xc8, 0xae, 0x4b, 0xca, 0x5d, 0xe3, 0x40, 0xd9, 0x70, 0x99, 0x1b, 0xca, 0x0e, 0xf1, + 0xd1, 0x52, 0xa6, 0xdf, 0x2d, 0xc0, 0xed, 0x4e, 0x1f, 0x47, 0x3d, 0x1c, 0x38, 0x63, 0x0b, 0x0b, + 0x77, 0xbb, 0xb6, 0x77, 0xe7, 0x77, 0x69, 0x1f, 0x42, 0x35, 0xc0, 0x13, 0x79, 0xe6, 0xb6, 0x6a, + 0x10, 0x60, 0x25, 0xa4, 0xfe, 0x7f, 0xb0, 0xec, 0xf5, 0x02, 0x96, 0xee, 0x65, 0xdf, 0x4f, 0x8c, + 0xc5, 0x79, 0x8a, 0x68, 0x08, 0x6a, 0xd9, 0x49, 0x13, 0x7d, 0x1f, 0xd6, 0x2e, 0x91, 0x47, 0x63, + 0xee, 0x78, 0xc8, 0x2f, 0xc6, 0x6e, 0xcd, 0x93, 0xc4, 0xfe, 0x30, 0x12, 0xf3, 0xc6, 0x2a, 0x23, + 0x57, 0xec, 0x6a, 0xf8, 0xff, 0x8b, 0x06, 0x77, 0x66, 0x69, 0x44, 0x06, 0xd8, 0xf3, 0xab, 0xe4, + 0x73, 0x58, 0x19, 0x44, 0x61, 0x3f, 0x64, 0x25, 0xfe, 0x5a, 0x7a, 0x59, 0x56, 0xe4, 0x4a, 0x39, + 0xf7, 0xa1, 0xc4, 0xdf, 0x15, 0x94, 0x4e, 0xb2, 0xaf, 0x0e, 0x12, 0x6b, 0x7e, 0x0a, 0x77, 0x0e, + 0xbc, 0xc0, 0xdd, 0xf5, 0x7d, 0xe1, 0x7d, 0x87, 0xc1, 0x73, 0x84, 0x9e, 0xf9, 0x57, 0x0d, 0x5e, + 0x9d, 0xc9, 0x2e, 0x6f, 0x7f, 0x94, 0x09, 0xa7, 0x0f, 0x13, 0xe1, 0xf4, 0x0c, 0x5e, 0x11, 0x6e, + 0x72, 0xe8, 0x52, 0x13, 0xcc, 0x97, 0x72, 0x80, 0x99, 0x39, 0x68, 0xdd, 0x4f, 0x0f, 0x5a, 0x39, + 0xe9, 0x29, 0x9e, 0xac, 0xcc, 0x0e, 0xdc, 0xfa, 0x02, 0xd3, 0x47, 0xc8, 0xb9, 0x18, 0x0e, 0xc8, + 0x8d, 0x5d, 0xd8, 0xdc, 0x07, 0x3d, 0xb9, 0x8d, 0xbc, 0x79, 0x1b, 0x96, 0xce, 0x04, 0x48, 0x5e, + 0xbd, 0xd9, 0x8e, 0xdf, 0xbb, 0x04, 0xed, 0x61, 0x70, 0x1e, 0x5a, 0x8a, 0xc8, 0x7c, 0x09, 0x36, + 0xbe, 0xc0, 0x74, 0x0f, 0xfb, 0x3e, 0x83, 0xb3, 0x84, 0xaf, 0x44, 0x32, 0xdf, 0x01, 0x63, 0x1a, + 0x25, 0x8f, 0x69, 0x42, 0x91, 0x55, 0x0b, 0xf5, 0x74, 0x25, 0x16, 0xe6, 0x16, 0x17, 0x49, 0x71, + 0x24, 0x9a, 0x0f, 0xfe, 0xbe, 0xa1, 0x4d, 0xde, 0x37, 0xcc, 0x03, 0x58, 0x4d, 0x51, 0xc6, 0x65, + 0xa1, 0xc2, 0xd0, 0xb6, 0x17, 0x9c, 0x87, 0xb2, 0x2e, 0x24, 0x5e, 0x22, 0x62, 0xf2, 0xb2, 0x23, + 0xbf, 0x58, 0xa6, 0x95, 0xfb, 0x10, 0x99, 0x6c, 0x94, 0xf4, 0x3f, 0x68, 0xf1, 0xcd, 0x26, 0x28, + 0x79, 0xcc, 0x21, 0x2c, 0xa5, 0xd3, 0xd8, 0x76, 0xc2, 0x5e, 0x33, 0x98, 0xda, 0x72, 0x2d, 0x1c, + 0x43, 0xf1, 0xb7, 0x8e, 0xa1, 0x96, 0x44, 0xe4, 0xb8, 0xc6, 0x83, 0xb4, 0x6b, 0x34, 0xd3, 0xf7, + 0x11, 0xc7, 0x24, 0xdd, 0x63, 0x8d, 0xab, 0x46, 0xb9, 0x65, 0x7c, 0x9f, 0x43, 0x68, 0xa6, 0xc1, + 0xf2, 0x2e, 0xef, 0x42, 0x45, 0x39, 0x8a, 0xba, 0x4d, 0x6e, 0x29, 0x9d, 0x50, 0x99, 0xef, 0x70, + 0x33, 0x3d, 0x4f, 0xcc, 0x1d, 0xa4, 0x64, 0xba, 0x79, 0x77, 0xf2, 0xab, 0x05, 0x58, 0xf9, 0x02, + 0x53, 0xd1, 0x3a, 0xbe, 0x78, 0x87, 0xbf, 0x2e, 0x67, 0xed, 0xf8, 0xc1, 0x41, 0xac, 0x58, 0x73, + 0x82, 0xaf, 0x44, 0x73, 0x22, 0xf1, 0x05, 0x8e, 0xaf, 0x4b, 0xe8, 0x89, 0x20, 0xbb, 0x0b, 0xaa, + 0x5b, 0xb1, 0x47, 0x1e, 0xbe, 0x24, 0xb2, 0x54, 0xd6, 0x24, 0xf0, 0x94, 0xc1, 0xf4, 0x2d, 0x58, + 0x11, 0x2f, 0x7d, 0xdc, 0xc5, 0xed, 0x30, 0xf0, 0xc7, 0x3c, 0x59, 0x97, 0xe5, 0xc3, 0x02, 0x8f, + 0x8b, 0x1f, 0x05, 0xfe, 0x78, 0x42, 0x49, 0xbc, 0xef, 0x14, 0x65, 0x29, 0x41, 0xd9, 0x65, 0x60, + 0x46, 0x69, 0x1e, 0xf3, 0x0c, 0xa0, 0xb4, 0x20, 0x95, 0xf9, 0x09, 0x94, 0x64, 0xaf, 0x2d, 0x14, + 0x70, 0xb7, 0x3d, 0xfd, 0x02, 0x2d, 0x58, 0xf6, 0xf1, 0xb9, 0x17, 0x78, 0xf2, 0x3d, 0x8b, 0x43, + 0xcc, 0x27, 0xb0, 0xcc, 0x76, 0xfc, 0xdf, 0xb4, 0x7c, 0xe6, 0xc7, 0xc2, 0x4a, 0xa9, 0x82, 0x12, + 0x37, 0x60, 0xda, 0xdc, 0x06, 0xcc, 0x7c, 0xcc, 0x23, 0xb2, 0x1b, 0x8d, 0xb2, 0x1e, 0xfc, 0xac, + 0x14, 0xc7, 0x62, 0x5a, 0x19, 0x52, 0x2c, 0xcc, 0x7f, 0x88, 0x18, 0x4e, 0x6f, 0x26, 0xe5, 0xf9, + 0x29, 0xd4, 0x49, 0x34, 0xb2, 0xb3, 0xbe, 0xff, 0x7e, 0x3a, 0x92, 0xf3, 0x58, 0xdb, 0x49, 0xa0, + 0x7a, 0x5c, 0x4b, 0x80, 0x5a, 0xa7, 0x70, 0x6b, 0x8a, 0x24, 0x27, 0xb0, 0xdf, 0x4a, 0x07, 0x76, + 0xc2, 0x61, 0x13, 0xdc, 0xc9, 0xc8, 0x7e, 0xc0, 0x43, 0xb8, 0x1b, 0x8d, 0x4e, 0xd3, 0x01, 0x90, + 0x97, 0x20, 0x8f, 0x60, 0x2d, 0x43, 0x1b, 0x0f, 0x9c, 0x4c, 0xd8, 0xc9, 0x60, 0x16, 0xc7, 0x9d, + 0xfc, 0x15, 0x22, 0xc1, 0x02, 0x24, 0xfe, 0x36, 0x1f, 0x66, 0xf6, 0x8b, 0xad, 0x92, 0xaf, 0xf9, + 0xbf, 0x69, 0xca, 0x8c, 0x13, 0x7a, 0x29, 0xc0, 0xa9, 0x50, 0xbc, 0x12, 0x40, 0x29, 0x7e, 0x67, + 0x4a, 0xf1, 0x59, 0xce, 0x84, 0x68, 0x52, 0xed, 0xd5, 0x89, 0x80, 0xa4, 0xd5, 0x85, 0x95, 0x2c, + 0x41, 0x8e, 0xd2, 0xdf, 0x4c, 0x2b, 0x3d, 0xf7, 0xde, 0x09, 0x95, 0x3f, 0xe1, 0x9e, 0x2c, 0x87, + 0xe9, 0x17, 0xcd, 0x37, 0xe6, 0x67, 0x3c, 0x6e, 0xd5, 0x6e, 0x52, 0x1f, 0x5b, 0xf1, 0x83, 0xdf, + 0xac, 0xd1, 0x5f, 0xe2, 0xcd, 0x3f, 0x69, 0x09, 0xfe, 0x9b, 0x57, 0xfe, 0x89, 0xc9, 0x0a, 0x09, + 0x93, 0xf1, 0xd7, 0x57, 0x1a, 0x79, 0x8e, 0x9a, 0xc4, 0xe4, 0x2a, 0xa7, 0x75, 0x2f, 0x5e, 0xbf, + 0x75, 0x37, 0x3f, 0xe7, 0xb5, 0x22, 0xd3, 0x92, 0xeb, 0x0f, 0x60, 0x49, 0x90, 0x4d, 0xe6, 0x95, + 0xec, 0xa5, 0x15, 0x81, 0xb9, 0xcd, 0x2f, 0x9d, 0x71, 0xf9, 0x79, 0xc5, 0xe6, 0x11, 0x3f, 0x32, + 0xeb, 0xf7, 0x6f, 0x43, 0x39, 0xe3, 0xf3, 0xb7, 0x62, 0xdb, 0xc7, 0xc1, 0xb6, 0x34, 0x92, 0xee, + 0x6e, 0xf1, 0x82, 0xa5, 0x9e, 0xef, 0xae, 0xa5, 0xeb, 0x57, 0xa1, 0x8a, 0x1c, 0xea, 0x8d, 0xb0, + 0xc8, 0xdc, 0x62, 0x44, 0x01, 0x01, 0xe2, 0x59, 0x5b, 0x54, 0xe0, 0xc4, 0x9e, 0x93, 0x0a, 0xac, + 0x7e, 0x91, 0xca, 0xab, 0xc0, 0x8a, 0xc1, 0x9a, 0x50, 0x99, 0xbf, 0x84, 0x97, 0x2c, 0xdc, 0x0f, + 0x47, 0xf1, 0x80, 0xc8, 0x5a, 0x81, 0xeb, 0x08, 0xa9, 0x52, 0xc5, 0x42, 0xe2, 0xb7, 0xa2, 0xfc, + 0x01, 0x3d, 0x35, 0x27, 0x2e, 0x66, 0x27, 0xd4, 0x57, 0xa0, 0x95, 0x27, 0x80, 0x9c, 0xb8, 0xbe, + 0xd7, 0x60, 0x5d, 0xa0, 0x79, 0x6a, 0xbf, 0xae, 0x70, 0xcf, 0x78, 0x48, 0x50, 0xb2, 0x17, 0xf2, + 0x64, 0x5f, 0x9c, 0x29, 0x7b, 0x31, 0x2b, 0xfb, 0x4b, 0xb0, 0x31, 0x25, 0x9c, 0x14, 0xfc, 0x00, + 0xd6, 0xd4, 0x38, 0x94, 0x8e, 0xf9, 0x87, 0x99, 0x20, 0x9d, 0xff, 0x2a, 0x6f, 0xfe, 0x82, 0xdd, + 0x3f, 0xbd, 0xcf, 0x8d, 0xe7, 0xaa, 0x6d, 0x58, 0xba, 0xd6, 0x38, 0xa5, 0xa8, 0xcc, 0x13, 0xd8, + 0x94, 0xa5, 0x37, 0xfe, 0xf9, 0x45, 0x3d, 0xd7, 0xbf, 0xc0, 0xb8, 0xf0, 0xc7, 0x02, 0xbc, 0x36, + 0x67, 0x5b, 0x79, 0xbd, 0x2b, 0x68, 0x26, 0x7f, 0xd0, 0x22, 0x14, 0xd1, 0xe1, 0xa4, 0x4d, 0xee, + 0x4c, 0x15, 0xfd, 0x39, 0x7b, 0x25, 0x7f, 0x3e, 0xeb, 0xca, 0x7d, 0x44, 0xda, 0x5f, 0x8d, 0xa6, + 0x31, 0xfa, 0x37, 0x00, 0x32, 0x4d, 0xf5, 0xd1, 0x40, 0xfe, 0xb2, 0xf3, 0xc9, 0x73, 0x9d, 0x27, + 0x94, 0xf9, 0x15, 0x1a, 0x88, 0x53, 0x2a, 0x54, 0xad, 0x5b, 0x36, 0x18, 0xb3, 0x84, 0xc9, 0x29, + 0x31, 0x0f, 0xd3, 0x25, 0x66, 0xa3, 0x9d, 0xfd, 0x07, 0x01, 0xb1, 0x41, 0xf2, 0xc7, 0xb2, 0x23, + 0x68, 0xa4, 0x4f, 0xbf, 0xce, 0x88, 0x98, 0xcd, 0x98, 0x89, 0xb2, 0x65, 0xc1, 0x6b, 0x02, 0xd8, + 0x91, 0xbf, 0xe4, 0xfa, 0xf1, 0x98, 0x8f, 0xdd, 0x1b, 0xfa, 0xf4, 0xdf, 0x35, 0x30, 0xe7, 0x6d, + 0x7a, 0x63, 0x07, 0xbf, 0xe9, 0x5b, 0xca, 0x87, 0x50, 0x0d, 0xfd, 0xc9, 0x5b, 0xc3, 0xe2, 0x5c, + 0xbe, 0xd0, 0x57, 0xcf, 0x0c, 0x8f, 0xb6, 0xbe, 0xb9, 0x3f, 0xf2, 0x28, 0x26, 0xa4, 0xed, 0x85, + 0xdb, 0xe2, 0x6b, 0xbb, 0x17, 0x6e, 0x8f, 0xe8, 0x36, 0xff, 0x9f, 0x8b, 0xed, 0xd8, 0x67, 0xce, + 0x4a, 0x1c, 0xf0, 0xde, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x87, 0x1d, 0xd2, 0x30, 0x22, + 0x00, 0x00, } diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index 4b6114b1330..bd8824c1b3f 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -30,46 +30,47 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("vtctlservice.proto", fileDescriptor_27055cdbb1148d2b) } var fileDescriptor_27055cdbb1148d2b = []byte{ - // 615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x96, 0x6f, 0x4f, 0x13, 0x31, - 0x1c, 0xc7, 0xf5, 0x81, 0x44, 0x2b, 0xca, 0x52, 0x1f, 0x18, 0x07, 0x1b, 0xdb, 0x14, 0x13, 0xc4, - 0x6c, 0x06, 0x5f, 0x01, 0x4c, 0x9c, 0x84, 0x84, 0x28, 0x5b, 0x46, 0x42, 0xc2, 0x83, 0x72, 0xfb, - 0xc1, 0x2e, 0xdc, 0x5d, 0x8f, 0x6b, 0x77, 0xc2, 0x1b, 0xf3, 0xf5, 0x99, 0xb5, 0x6b, 0xd7, 0xeb, - 0x9f, 0xc1, 0x23, 0x58, 0x3f, 0xdf, 0xdf, 0xf7, 0xd7, 0x3f, 0xdf, 0x36, 0x87, 0x70, 0xc9, 0x23, - 0x9e, 0x30, 0x28, 0xca, 0x38, 0x82, 0x6e, 0x5e, 0x50, 0x4e, 0xf1, 0xba, 0x39, 0x56, 0xdf, 0x10, - 0xbf, 0x26, 0x84, 0x13, 0x89, 0xf7, 0xef, 0xd0, 0x8b, 0xf1, 0x7c, 0x08, 0x4f, 0xd1, 0xbb, 0xa3, - 0x7b, 0x88, 0x66, 0x1c, 0xc4, 0xef, 0x3e, 0x4d, 0x53, 0x92, 0x4d, 0xf0, 0x4e, 0x77, 0x59, 0xe1, - 0xe1, 0x67, 0x70, 0x37, 0x03, 0xc6, 0xeb, 0x9f, 0x1f, 0x93, 0xb1, 0x9c, 0x66, 0x0c, 0x3a, 0xcf, - 0xbe, 0x3d, 0xdf, 0xff, 0x57, 0x43, 0x6b, 0x02, 0x4e, 0xf0, 0x25, 0xaa, 0xf5, 0xa7, 0x24, 0xbb, - 0x81, 0x11, 0xb9, 0x4a, 0x80, 0x8f, 0x1e, 0x72, 0xc0, 0x1d, 0xc3, 0xca, 0x86, 0xaa, 0xdd, 0xc7, - 0x95, 0x1a, 0xd5, 0x0b, 0x9f, 0xa3, 0xb7, 0xfd, 0x02, 0x08, 0x87, 0x13, 0x78, 0x60, 0x39, 0x89, - 0x00, 0xb7, 0xcc, 0xc2, 0x0a, 0x52, 0xd6, 0xed, 0x15, 0x0a, 0x6d, 0x7c, 0x8a, 0x5e, 0x4b, 0x36, - 0x9c, 0x92, 0x62, 0x82, 0x1b, 0x4e, 0x8d, 0x18, 0x57, 0x96, 0xcd, 0x10, 0x36, 0x27, 0xfa, 0x03, - 0x12, 0x08, 0x4c, 0xb4, 0x8a, 0x7c, 0x13, 0xb5, 0x15, 0xda, 0xf8, 0x0f, 0x5a, 0x97, 0x4c, 0x74, - 0x64, 0xb8, 0xe9, 0x14, 0x49, 0xa0, 0x4c, 0xb7, 0x83, 0x5c, 0x5b, 0x8e, 0xd0, 0x1b, 0x49, 0xe4, - 0x96, 0x33, 0xec, 0xd6, 0x2c, 0x88, 0x32, 0x6d, 0x85, 0x05, 0xda, 0xb5, 0x40, 0xef, 0x7f, 0xc6, - 0xd9, 0xe4, 0x20, 0x49, 0x64, 0xc3, 0xe3, 0x4c, 0x6f, 0xc5, 0xae, 0x51, 0x1e, 0xd0, 0xa8, 0x4e, - 0x5f, 0x9e, 0x22, 0xd5, 0x3d, 0x4f, 0x10, 0x1a, 0x00, 0x3f, 0x24, 0xd1, 0xed, 0x2c, 0x67, 0x78, - 0xcb, 0xa8, 0x5d, 0x0e, 0x2b, 0xe7, 0x46, 0x80, 0x6a, 0xb3, 0x4b, 0x54, 0x1b, 0x00, 0xef, 0x43, - 0x92, 0x1c, 0x67, 0xd7, 0xf4, 0x94, 0xa4, 0xc0, 0x2a, 0x51, 0xb6, 0xa1, 0x2f, 0xca, 0xae, 0xc6, - 0x4c, 0x9c, 0x41, 0x71, 0xc3, 0x5f, 0xe5, 0x4b, 0x5c, 0x05, 0x6b, 0xbf, 0x0b, 0xb4, 0xb1, 0x00, - 0xec, 0x20, 0x89, 0x09, 0x03, 0x86, 0xdb, 0x6e, 0x91, 0x62, 0xca, 0xb7, 0xb3, 0x4a, 0x62, 0xcd, - 0x55, 0x9f, 0x9f, 0x35, 0x57, 0xfb, 0xcc, 0x9a, 0x21, 0x6c, 0x86, 0xd8, 0x00, 0xd5, 0x10, 0x9b, - 0xc0, 0x17, 0xe2, 0x2a, 0xd7, 0x96, 0xbf, 0xd0, 0xab, 0x01, 0xf0, 0x61, 0x34, 0x85, 0x94, 0xe0, - 0xcd, 0xaa, 0x5e, 0x8e, 0x2a, 0xb3, 0x2d, 0x3f, 0xd4, 0x4e, 0x47, 0xe8, 0xe5, 0x7c, 0x58, 0xbc, - 0x03, 0x75, 0x4b, 0x6b, 0x3e, 0x02, 0x9b, 0x5e, 0x66, 0x9d, 0xc7, 0xb0, 0x28, 0x97, 0xcb, 0xb4, - 0xce, 0xc3, 0x64, 0x81, 0xf3, 0xa8, 0x4a, 0xcc, 0x1b, 0x2b, 0xe1, 0x78, 0xb1, 0xe0, 0x6d, 0xa7, - 0x6c, 0x5c, 0x5d, 0x74, 0x2b, 0x2c, 0xb0, 0xb6, 0x50, 0xde, 0x64, 0x7b, 0x0b, 0xe5, 0x68, 0x60, - 0x0b, 0x15, 0xb4, 0xee, 0xa1, 0x7a, 0x4e, 0xbc, 0xea, 0xd0, 0x3d, 0x74, 0x1f, 0x12, 0x69, 0xa6, - 0x56, 0x6a, 0x99, 0x59, 0xcb, 0x6c, 0x04, 0xa8, 0x95, 0xbc, 0x73, 0x5a, 0xdc, 0x5e, 0x27, 0xf4, - 0xaf, 0x93, 0x3c, 0x0d, 0x02, 0xc9, 0x33, 0xb8, 0xb6, 0x8c, 0x10, 0x3e, 0x83, 0x94, 0x96, 0xfa, - 0xb5, 0x9e, 0x5f, 0x22, 0xfc, 0xc9, 0x28, 0x74, 0xb1, 0xb2, 0xdf, 0x79, 0x44, 0x65, 0xa6, 0x49, - 0x72, 0x11, 0x33, 0xd1, 0xa1, 0xed, 0xd4, 0x6a, 0xe6, 0x4b, 0x93, 0x23, 0xd1, 0xde, 0xf7, 0xe8, - 0xc3, 0x22, 0xbc, 0x79, 0x12, 0x47, 0x84, 0xc7, 0x34, 0xfb, 0x4d, 0x59, 0x3c, 0xff, 0xcb, 0xf0, - 0x9e, 0x61, 0x11, 0x54, 0xa9, 0x7e, 0x5f, 0x9f, 0x26, 0x56, 0x9d, 0x0f, 0xf7, 0x2e, 0x76, 0xcb, - 0x98, 0x03, 0x63, 0xdd, 0x98, 0xf6, 0xe4, 0x7f, 0xbd, 0x1b, 0xda, 0x2b, 0x79, 0x4f, 0x7c, 0xcb, - 0xf4, 0xcc, 0x2f, 0x9d, 0xab, 0x35, 0x31, 0xf6, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, - 0x49, 0x8b, 0x51, 0x14, 0x09, 0x00, 0x00, + // 627 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x96, 0xdf, 0x4e, 0x13, 0x41, + 0x14, 0xc6, 0xf5, 0x42, 0xa2, 0x23, 0x0a, 0x8e, 0x17, 0xc6, 0x42, 0x4b, 0x5b, 0xc5, 0x04, 0x31, + 0xad, 0xc1, 0x27, 0x80, 0x8a, 0x95, 0x90, 0x10, 0xa5, 0x4d, 0x49, 0x48, 0xb8, 0x18, 0xb6, 0x07, + 0xba, 0x61, 0x77, 0x67, 0xd9, 0x99, 0xae, 0xf0, 0x14, 0xbe, 0x32, 0xe9, 0x4e, 0x67, 0x3a, 0x7f, + 0x0b, 0x57, 0xb0, 0xe7, 0xf7, 0x9d, 0xef, 0xcc, 0xce, 0x39, 0x33, 0x5d, 0x84, 0x4b, 0x1e, 0xf1, + 0x84, 0x41, 0x51, 0xc6, 0x11, 0x74, 0xf2, 0x82, 0x72, 0x8a, 0x57, 0xf5, 0x58, 0x6d, 0xad, 0x7a, + 0x1a, 0x13, 0x4e, 0x04, 0xde, 0xbb, 0x45, 0x2f, 0x46, 0xb3, 0x10, 0x9e, 0xa0, 0xf7, 0x87, 0x77, + 0x10, 0x4d, 0x39, 0x54, 0xcf, 0x3d, 0x9a, 0xa6, 0x24, 0x1b, 0xe3, 0xed, 0xce, 0x22, 0xc3, 0xc3, + 0x4f, 0xe1, 0x76, 0x0a, 0x8c, 0xd7, 0xbe, 0x3c, 0x26, 0x63, 0x39, 0xcd, 0x18, 0xb4, 0x9f, 0x7d, + 0x7f, 0xbe, 0xf7, 0xff, 0x1d, 0x5a, 0xa9, 0xe0, 0x18, 0x5f, 0xa0, 0xf5, 0xde, 0x84, 0x64, 0xd7, + 0x30, 0x24, 0x97, 0x09, 0xf0, 0xe1, 0x7d, 0x0e, 0xb8, 0xad, 0x59, 0xd9, 0x50, 0x96, 0xfb, 0xb4, + 0x54, 0x23, 0x6b, 0xe1, 0x33, 0xf4, 0xb6, 0x57, 0x00, 0xe1, 0x70, 0x0c, 0xf7, 0x2c, 0x27, 0x11, + 0xe0, 0xa6, 0x9e, 0x68, 0x20, 0x69, 0xdd, 0x5a, 0xa2, 0x50, 0xc6, 0x27, 0xe8, 0xb5, 0x60, 0x83, + 0x09, 0x29, 0xc6, 0xb8, 0xee, 0xe4, 0x54, 0x71, 0x69, 0xd9, 0x08, 0x61, 0x7d, 0xa1, 0x3f, 0x21, + 0x81, 0xc0, 0x42, 0x4d, 0xe4, 0x5b, 0xa8, 0xad, 0x50, 0xc6, 0x7f, 0xd1, 0xaa, 0x60, 0x55, 0x45, + 0x86, 0x1b, 0x4e, 0x92, 0x00, 0xd2, 0x74, 0x2b, 0xc8, 0x95, 0xe5, 0x10, 0xbd, 0x11, 0x44, 0x6c, + 0x39, 0xc3, 0x6e, 0xce, 0x9c, 0x48, 0xd3, 0x66, 0x58, 0xa0, 0x5c, 0x0b, 0xf4, 0xe1, 0x57, 0x9c, + 0x8d, 0xf7, 0x93, 0x44, 0x14, 0x3c, 0xca, 0xd4, 0x56, 0xec, 0x68, 0xe9, 0x01, 0x8d, 0xac, 0xf4, + 0xf5, 0x29, 0x52, 0x55, 0xf3, 0x18, 0xa1, 0x3e, 0xf0, 0x03, 0x12, 0xdd, 0x4c, 0x73, 0x86, 0x37, + 0xb5, 0xdc, 0x45, 0x58, 0x3a, 0xd7, 0x03, 0x54, 0x99, 0x5d, 0xa0, 0xf5, 0x3e, 0xf0, 0x1e, 0x24, + 0xc9, 0x51, 0x76, 0x45, 0x4f, 0x48, 0x0a, 0xcc, 0x18, 0x65, 0x1b, 0xfa, 0x46, 0xd9, 0xd5, 0xe8, + 0x13, 0xa7, 0x51, 0x5c, 0xf7, 0x67, 0xf9, 0x26, 0xce, 0xc0, 0xca, 0xef, 0x1c, 0xad, 0xcd, 0x01, + 0xdb, 0x4f, 0x62, 0xc2, 0x80, 0xe1, 0x96, 0x9b, 0x24, 0x99, 0xf4, 0x6d, 0x2f, 0x93, 0x58, 0x6b, + 0x55, 0xfd, 0xb3, 0xd6, 0x6a, 0xf7, 0xac, 0x11, 0xc2, 0xfa, 0x10, 0x6b, 0xc0, 0x1c, 0x62, 0x1d, + 0xf8, 0x86, 0xd8, 0xe4, 0xca, 0xf2, 0x37, 0x7a, 0xd5, 0x07, 0x3e, 0x88, 0x26, 0x90, 0x12, 0xbc, + 0x61, 0xea, 0x45, 0x54, 0x9a, 0x6d, 0xfa, 0xa1, 0x72, 0x3a, 0x44, 0x2f, 0x67, 0xe1, 0xea, 0x1e, + 0xa8, 0x59, 0x5a, 0xfd, 0x12, 0xd8, 0xf0, 0x32, 0xab, 0x1f, 0x83, 0xa2, 0x5c, 0xbc, 0xa6, 0xd5, + 0x0f, 0x9d, 0x05, 0xfa, 0x61, 0x4a, 0xf4, 0x13, 0x2b, 0xe0, 0x68, 0xfe, 0xc2, 0x5b, 0x4e, 0xda, + 0xc8, 0x7c, 0xe9, 0x66, 0x58, 0xa0, 0xdf, 0x59, 0x06, 0x62, 0x38, 0x98, 0xc5, 0x7c, 0x77, 0x96, + 0xad, 0xb0, 0x7a, 0x23, 0xae, 0x08, 0xbb, 0x37, 0x22, 0x1a, 0xe8, 0x8d, 0x84, 0xd6, 0x01, 0x97, + 0xf7, 0x94, 0x57, 0x1d, 0x3a, 0xe0, 0xee, 0x0d, 0x25, 0xcc, 0xe4, 0x16, 0x5a, 0x66, 0xd6, 0xfe, + 0xd5, 0x03, 0xd4, 0x1a, 0xe9, 0x33, 0x5a, 0xdc, 0x5c, 0x25, 0xf4, 0x9f, 0x33, 0xd2, 0x0a, 0x04, + 0x46, 0x5a, 0xe3, 0xca, 0x32, 0x42, 0xf8, 0x14, 0x52, 0x5a, 0xaa, 0x9f, 0x81, 0xd9, 0xe9, 0xc4, + 0x9f, 0xb5, 0x44, 0x17, 0x4b, 0xfb, 0xed, 0x47, 0x54, 0xfa, 0x98, 0x0a, 0x5e, 0xcd, 0x6f, 0x55, + 0xa1, 0xe5, 0xe4, 0x2a, 0xe6, 0x1b, 0x53, 0x47, 0xa2, 0xbc, 0xef, 0xd0, 0xc7, 0xf9, 0xa9, 0xc8, + 0x93, 0x38, 0x22, 0x3c, 0xa6, 0xd9, 0x1f, 0xca, 0xe2, 0xd9, 0x5f, 0x86, 0x77, 0x35, 0x8b, 0xa0, + 0x4a, 0xd6, 0xfb, 0xf6, 0x34, 0xb1, 0xac, 0x7c, 0xb0, 0x7b, 0xbe, 0x53, 0xc6, 0x1c, 0x18, 0xeb, + 0xc4, 0xb4, 0x2b, 0xfe, 0xeb, 0x5e, 0xd3, 0x6e, 0xc9, 0xbb, 0xd5, 0x47, 0x52, 0x57, 0xff, 0x84, + 0xba, 0x5c, 0xa9, 0x62, 0x3f, 0x1e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x87, 0x81, 0x55, 0x11, 0x6d, + 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -232,8 +233,11 @@ type VtctldClient interface { // GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more // cells. GetSrvKeyspaces(ctx context.Context, in *vtctldata.GetSrvKeyspacesRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvKeyspacesResponse, error) - // GetSrvVSchema returns a the SrvVSchema for a cell. + // GetSrvVSchema returns the SrvVSchema for a cell. GetSrvVSchema(ctx context.Context, in *vtctldata.GetSrvVSchemaRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemaResponse, error) + // GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells, + // optionally filtered by cell name. + GetSrvVSchemas(ctx context.Context, in *vtctldata.GetSrvVSchemasRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemasResponse, error) // GetTablet returns information about a tablet. GetTablet(ctx context.Context, in *vtctldata.GetTabletRequest, opts ...grpc.CallOption) (*vtctldata.GetTabletResponse, error) // GetTablets returns tablets, optionally filtered by keyspace and shard. @@ -413,6 +417,15 @@ func (c *vtctldClient) GetSrvVSchema(ctx context.Context, in *vtctldata.GetSrvVS return out, nil } +func (c *vtctldClient) GetSrvVSchemas(ctx context.Context, in *vtctldata.GetSrvVSchemasRequest, opts ...grpc.CallOption) (*vtctldata.GetSrvVSchemasResponse, error) { + out := new(vtctldata.GetSrvVSchemasResponse) + err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetSrvVSchemas", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *vtctldClient) GetTablet(ctx context.Context, in *vtctldata.GetTabletRequest, opts ...grpc.CallOption) (*vtctldata.GetTabletResponse, error) { out := new(vtctldata.GetTabletResponse) err := c.cc.Invoke(ctx, "/vtctlservice.Vtctld/GetTablet", in, out, opts...) @@ -527,8 +540,11 @@ type VtctldServer interface { // GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more // cells. GetSrvKeyspaces(context.Context, *vtctldata.GetSrvKeyspacesRequest) (*vtctldata.GetSrvKeyspacesResponse, error) - // GetSrvVSchema returns a the SrvVSchema for a cell. + // GetSrvVSchema returns the SrvVSchema for a cell. GetSrvVSchema(context.Context, *vtctldata.GetSrvVSchemaRequest) (*vtctldata.GetSrvVSchemaResponse, error) + // GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells, + // optionally filtered by cell name. + GetSrvVSchemas(context.Context, *vtctldata.GetSrvVSchemasRequest) (*vtctldata.GetSrvVSchemasResponse, error) // GetTablet returns information about a tablet. GetTablet(context.Context, *vtctldata.GetTabletRequest) (*vtctldata.GetTabletResponse, error) // GetTablets returns tablets, optionally filtered by keyspace and shard. @@ -602,6 +618,9 @@ func (*UnimplementedVtctldServer) GetSrvKeyspaces(ctx context.Context, req *vtct func (*UnimplementedVtctldServer) GetSrvVSchema(ctx context.Context, req *vtctldata.GetSrvVSchemaRequest) (*vtctldata.GetSrvVSchemaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSrvVSchema not implemented") } +func (*UnimplementedVtctldServer) GetSrvVSchemas(ctx context.Context, req *vtctldata.GetSrvVSchemasRequest) (*vtctldata.GetSrvVSchemasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSrvVSchemas not implemented") +} func (*UnimplementedVtctldServer) GetTablet(ctx context.Context, req *vtctldata.GetTabletRequest) (*vtctldata.GetTabletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTablet not implemented") } @@ -934,6 +953,24 @@ func _Vtctld_GetSrvVSchema_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Vtctld_GetSrvVSchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(vtctldata.GetSrvVSchemasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VtctldServer).GetSrvVSchemas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vtctlservice.Vtctld/GetSrvVSchemas", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VtctldServer).GetSrvVSchemas(ctx, req.(*vtctldata.GetSrvVSchemasRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Vtctld_GetTablet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(vtctldata.GetTabletRequest) if err := dec(in); err != nil { @@ -1132,6 +1169,10 @@ var _Vtctld_serviceDesc = grpc.ServiceDesc{ MethodName: "GetSrvVSchema", Handler: _Vtctld_GetSrvVSchema_Handler, }, + { + MethodName: "GetSrvVSchemas", + Handler: _Vtctld_GetSrvVSchemas_Handler, + }, { MethodName: "GetTablet", Handler: _Vtctld_GetTablet_Handler, diff --git a/go/vt/vtctl/grpcvtctldclient/client_gen.go b/go/vt/vtctl/grpcvtctldclient/client_gen.go index eae83d5bb6a..8e184e07eb5 100644 --- a/go/vt/vtctl/grpcvtctldclient/client_gen.go +++ b/go/vt/vtctl/grpcvtctldclient/client_gen.go @@ -181,6 +181,15 @@ func (client *gRPCVtctldClient) GetSrvVSchema(ctx context.Context, in *vtctldata return client.c.GetSrvVSchema(ctx, in, opts...) } +// GetSrvVSchemas is part of the vtctlservicepb.VtctldClient interface. +func (client *gRPCVtctldClient) GetSrvVSchemas(ctx context.Context, in *vtctldatapb.GetSrvVSchemasRequest, opts ...grpc.CallOption) (*vtctldatapb.GetSrvVSchemasResponse, error) { + if client.c == nil { + return nil, status.Error(codes.Unavailable, connClosedMsg) + } + + return client.c.GetSrvVSchemas(ctx, in, opts...) +} + // GetTablet is part of the vtctlservicepb.VtctldClient interface. func (client *gRPCVtctldClient) GetTablet(ctx context.Context, in *vtctldatapb.GetTabletRequest, opts ...grpc.CallOption) (*vtctldatapb.GetTabletResponse, error) { if client.c == nil { diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index fb11464cb91..091945b2ac8 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -25,6 +25,7 @@ import ( "time" "google.golang.org/grpc" + "k8s.io/apimachinery/pkg/util/sets" "vitess.io/vitess/go/trace" "vitess.io/vitess/go/vt/concurrency" @@ -517,7 +518,7 @@ func (s *VtctldServer) GetSrvKeyspaces(ctx context.Context, req *vtctldatapb.Get return nil, err } - log.Infof("no srvkeyspace for keyspace %s in cell %s", req.Keyspace, cell) + log.Warningf("no srvkeyspace for keyspace %s in cell %s", req.Keyspace, cell) srvKeyspace = nil } @@ -542,6 +543,45 @@ func (s *VtctldServer) GetSrvVSchema(ctx context.Context, req *vtctldatapb.GetSr }, nil } +// GetSrvVSchemas is part of the vtctlservicepb.VtctldServer interface. +func (s *VtctldServer) GetSrvVSchemas(ctx context.Context, req *vtctldatapb.GetSrvVSchemasRequest) (*vtctldatapb.GetSrvVSchemasResponse, error) { + allCells, err := s.ts.GetCellInfoNames(ctx) + if err != nil { + return nil, err + } + + cells := allCells + + // Omit any cell names in the request that don't map to existing cells + if len(req.Cells) > 0 { + s1 := sets.NewString(allCells...) + s2 := sets.NewString(req.Cells...) + + cells = s1.Intersection(s2).List() + } + + svs := make(map[string]*vschemapb.SrvVSchema, len(cells)) + + for _, cell := range cells { + sv, err := s.ts.GetSrvVSchema(ctx, cell) + + if err != nil { + if !topo.IsErrType(err, topo.NoNode) { + return nil, err + } + + log.Warningf("no SrvVSchema for cell %s", cell) + sv = nil + } + + svs[cell] = sv + } + + return &vtctldatapb.GetSrvVSchemasResponse{ + SrvVSchemas: svs, + }, nil +} + // GetTablet is part of the vtctlservicepb.VtctldServer interface. func (s *VtctldServer) GetTablet(ctx context.Context, req *vtctldatapb.GetTabletRequest) (*vtctldatapb.GetTabletResponse, error) { ti, err := s.ts.GetTablet(ctx, req.TabletAlias) diff --git a/proto/vtctldata.proto b/proto/vtctldata.proto index 8a308cff6e7..a823ec59c3a 100644 --- a/proto/vtctldata.proto +++ b/proto/vtctldata.proto @@ -393,6 +393,15 @@ message GetSrvVSchemaResponse { vschema.SrvVSchema srv_v_schema = 1; } +message GetSrvVSchemasRequest { + repeated string cells = 2; +} + +message GetSrvVSchemasResponse { + // SrvVSchemas is a mapping of cell name to SrvVSchema + map srv_v_schemas = 1; +} + message GetTabletRequest { topodata.TabletAlias tablet_alias = 1; } diff --git a/proto/vtctlservice.proto b/proto/vtctlservice.proto index fc157ca2ea6..e9232c63781 100644 --- a/proto/vtctlservice.proto +++ b/proto/vtctlservice.proto @@ -80,8 +80,11 @@ service Vtctld { // GetSrvKeyspaces returns the SrvKeyspaces for a keyspace in one or more // cells. rpc GetSrvKeyspaces (vtctldata.GetSrvKeyspacesRequest) returns (vtctldata.GetSrvKeyspacesResponse) {}; - // GetSrvVSchema returns a the SrvVSchema for a cell. + // GetSrvVSchema returns the SrvVSchema for a cell. rpc GetSrvVSchema(vtctldata.GetSrvVSchemaRequest) returns (vtctldata.GetSrvVSchemaResponse) {}; + // GetSrvVSchemas returns a mapping from cell name to SrvVSchema for all cells, + // optionally filtered by cell name. + rpc GetSrvVSchemas(vtctldata.GetSrvVSchemasRequest) returns (vtctldata.GetSrvVSchemasResponse) {}; // GetTablet returns information about a tablet. rpc GetTablet(vtctldata.GetTabletRequest) returns (vtctldata.GetTabletResponse) {}; // GetTablets returns tablets, optionally filtered by keyspace and shard. From f2d95dd968139486df04f500e5ac99a1f542757d Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Mon, 14 Jun 2021 18:08:27 -0400 Subject: [PATCH 5/9] Merge pull request #8321 from tinyspeck/am_additional_backup_info [vtctldserver] Add additional backup info fields Signed-off-by: Andrew Mason --- .../vtctldclient/internal/command/backups.go | 32 +- go/protoutil/time.go | 44 ++ go/protoutil/time_test.go | 52 +++ go/vt/mysqlctl/backup.go | 37 ++ go/vt/mysqlctl/mysqlctlproto/backup.go | 17 +- go/vt/mysqlctl/mysqlctlproto/backup_test.go | 114 +++++ go/vt/proto/mysqlctl/mysqlctl.pb.go | 165 ++++++-- go/vt/proto/vtctldata/vtctldata.pb.go | 393 ++++++++++-------- go/vt/vtctl/grpcvtctldserver/server.go | 44 +- go/vt/vtctl/grpcvtctldserver/server_test.go | 52 +++ proto/mysqlctl.proto | 35 ++ proto/vtctldata.proto | 14 + 12 files changed, 781 insertions(+), 218 deletions(-) create mode 100644 go/protoutil/time.go create mode 100644 go/protoutil/time_test.go create mode 100644 go/vt/mysqlctl/mysqlctlproto/backup_test.go diff --git a/go/cmd/vtctldclient/internal/command/backups.go b/go/cmd/vtctldclient/internal/command/backups.go index 21d5673ef34..02fca34b620 100644 --- a/go/cmd/vtctldclient/internal/command/backups.go +++ b/go/cmd/vtctldclient/internal/command/backups.go @@ -23,30 +23,50 @@ import ( "github.com/spf13/cobra" "vitess.io/vitess/go/cmd/vtctldclient/cli" + "vitess.io/vitess/go/vt/topo/topoproto" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" ) // GetBackups makes a GetBackups gRPC call to a vtctld. var GetBackups = &cobra.Command{ - Use: "GetBackups keyspace shard", - Args: cobra.ExactArgs(2), + Use: "GetBackups ", + Args: cobra.ExactArgs(1), RunE: commandGetBackups, } +var getBackupsOptions = struct { + Limit uint32 + OutputJSON bool +}{} + func commandGetBackups(cmd *cobra.Command, args []string) error { - cli.FinishedParsing(cmd) + keyspace, shard, err := topoproto.ParseKeyspaceShard(cmd.Flags().Arg(0)) + if err != nil { + return err + } - keyspace := cmd.Flags().Arg(0) - shard := cmd.Flags().Arg(1) + cli.FinishedParsing(cmd) resp, err := client.GetBackups(commandCtx, &vtctldatapb.GetBackupsRequest{ Keyspace: keyspace, Shard: shard, + Limit: getBackupsOptions.Limit, }) if err != nil { return err } + if getBackupsOptions.OutputJSON { + data, err := cli.MarshalJSON(resp) + if err != nil { + return err + } + + fmt.Printf("%s\n", data) + return nil + } + names := make([]string, len(resp.Backups)) for i, b := range resp.Backups { names[i] = b.Name @@ -58,5 +78,7 @@ func commandGetBackups(cmd *cobra.Command, args []string) error { } func init() { + GetBackups.Flags().Uint32VarP(&getBackupsOptions.Limit, "limit", "l", 0, "Retrieve only the most recent N backups") + GetBackups.Flags().BoolVarP(&getBackupsOptions.OutputJSON, "json", "j", false, "Output backup info in JSON format rather than a list of backups") Root.AddCommand(GetBackups) } diff --git a/go/protoutil/time.go b/go/protoutil/time.go new file mode 100644 index 00000000000..c226001d4b2 --- /dev/null +++ b/go/protoutil/time.go @@ -0,0 +1,44 @@ +/* +Copyright 2021 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package protoutil + +import ( + "time" + + "vitess.io/vitess/go/vt/proto/vttime" +) + +// TimeFromProto converts a vttime.Time proto message into a time.Time object. +func TimeFromProto(tpb *vttime.Time) time.Time { + if tpb == nil { + return time.Time{} + } + + return time.Unix(tpb.Seconds, int64(tpb.Nanoseconds)) +} + +// TimeToProto converts a time.Time object into a vttime.Time proto mesasge. +func TimeToProto(t time.Time) *vttime.Time { + secs, nanos := t.Unix(), t.UnixNano() + + nsecs := secs * 1e9 + extraNanos := nanos - nsecs + return &vttime.Time{ + Seconds: secs, + Nanoseconds: int32(extraNanos), + } +} diff --git a/go/protoutil/time_test.go b/go/protoutil/time_test.go new file mode 100644 index 00000000000..eb3ecb2f0a9 --- /dev/null +++ b/go/protoutil/time_test.go @@ -0,0 +1,52 @@ +/* +Copyright 2021 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package protoutil + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + + "vitess.io/vitess/go/test/utils" + "vitess.io/vitess/go/vt/proto/vttime" +) + +func TestTimeFromProto(t *testing.T) { + now := time.Date(2021, time.June, 12, 13, 14, 15, 0 /* nanos */, time.UTC) + vtt := TimeToProto(now) + + utils.MustMatch(t, now, TimeFromProto(vtt)) + + vtt.Nanoseconds = 100 + utils.MustMatch(t, now.Add(100*time.Nanosecond), TimeFromProto(vtt)) + + vtt.Nanoseconds = 1e9 + utils.MustMatch(t, now.Add(time.Second), TimeFromProto(vtt)) + + assert.True(t, TimeFromProto(nil).IsZero(), "expected Go time from nil vttime to be Zero") +} + +func TestTimeToProto(t *testing.T) { + now := time.Date(2021, time.June, 12, 13, 14, 15, 0 /* nanos */, time.UTC) + secs := now.Unix() + utils.MustMatch(t, &vttime.Time{Seconds: secs}, TimeToProto(now)) + + // Testing secs/nanos conversions + utils.MustMatch(t, &vttime.Time{Seconds: secs, Nanoseconds: 100}, TimeToProto(now.Add(100*time.Nanosecond))) + utils.MustMatch(t, &vttime.Time{Seconds: secs + 1}, TimeToProto(now.Add(1e9*time.Nanosecond))) // this should rollover to a full second +} diff --git a/go/vt/mysqlctl/backup.go b/go/vt/mysqlctl/backup.go index 7e15c50ea47..d0a54bb28c9 100644 --- a/go/vt/mysqlctl/backup.go +++ b/go/vt/mysqlctl/backup.go @@ -23,6 +23,7 @@ import ( "os" "path/filepath" "strings" + "time" "context" @@ -30,7 +31,10 @@ import ( "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/mysqlctl/backupstorage" "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vterrors" + + topodatapb "vitess.io/vitess/go/vt/proto/topodata" ) // This file handles the backup and restore related code @@ -132,6 +136,39 @@ func Backup(ctx context.Context, params BackupParams) error { return finishErr } +// ParseBackupName parses the backup name for a given dir/name, according to +// the format generated by mysqlctl.Backup. An error is returned only if the +// backup name does not have the expected number of parts; errors parsing the +// timestamp and tablet alias are logged, and a nil value is returned for those +// fields in case of error. +func ParseBackupName(dir string, name string) (backupTime *time.Time, alias *topodatapb.TabletAlias, err error) { + parts := strings.Split(name, ".") + if len(parts) != 3 { + return nil, nil, vterrors.Errorf(vtrpc.Code_INVALID_ARGUMENT, "cannot backup name %s, expected .