diff --git a/web/vtadmin/package-lock.json b/web/vtadmin/package-lock.json index 430fd8c89c0..bca6bead1d4 100644 --- a/web/vtadmin/package-lock.json +++ b/web/vtadmin/package-lock.json @@ -2379,6 +2379,21 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, + "@types/lodash": { + "version": "4.14.168", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz", + "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==", + "dev": true + }, + "@types/lodash-es": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.4.tgz", + "integrity": "sha512-BBz79DCJbD2CVYZH67MBeHZRX++HF+5p8Mo5MzjZi64Wac39S3diedJYHZtScbRVf4DjZyN6LzA0SB0zy+HSSQ==", + "dev": true, + "requires": { + "@types/lodash": "*" + } + }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -10213,6 +10228,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, + "lodash-es": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.20.tgz", + "integrity": "sha512-JD1COMZsq8maT6mnuz1UMV0jvYD0E0aUsSOdrr1/nAG3dhqQXwRRgeW0cSqH1U43INKcqxaiVIQNOUDld7gRDA==" + }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", diff --git a/web/vtadmin/package.json b/web/vtadmin/package.json index 178e0cfc192..9493a41d4b4 100644 --- a/web/vtadmin/package.json +++ b/web/vtadmin/package.json @@ -17,6 +17,7 @@ "@types/react-dom": "^16.9.10", "@types/react-router-dom": "^5.1.7", "classnames": "^2.2.6", + "lodash-es": "^4.17.20", "node-sass": "^4.14.1", "react": "^17.0.1", "react-dom": "^17.0.1", @@ -59,6 +60,7 @@ ] }, "devDependencies": { + "@types/lodash-es": "^4.17.4", "msw": "^0.24.4", "prettier": "^2.2.1", "protobufjs": "^6.10.2", diff --git a/web/vtadmin/src/api/http.test.ts b/web/vtadmin/src/api/http.test.ts index cf314605d4b..af46c15b26c 100644 --- a/web/vtadmin/src/api/http.test.ts +++ b/web/vtadmin/src/api/http.test.ts @@ -90,13 +90,22 @@ describe('api/http', () => { expect(result).toEqual(response); }); - it('parses and returns JSON, given an HttpErrorResponse response', async () => { + it('throws an error if response.ok is false', async () => { const endpoint = `/api/tablets`; const response = { ok: false }; mockServerJson(endpoint, response); - const result = await api.vtfetch(endpoint); - expect(result).toEqual(response); + expect.assertions(3); + + try { + await api.fetchTablets(); + } catch (e) { + /* eslint-disable jest/no-conditional-expect */ + expect(e.name).toEqual(HTTP_RESPONSE_NOT_OK_ERROR); + expect(e.message).toEqual(endpoint); + expect(e.response).toEqual(response); + /* eslint-enable jest/no-conditional-expect */ + } }); it('throws an error on malformed JSON', async () => { @@ -186,70 +195,22 @@ describe('api/http', () => { }); }); - describe('fetchTablets', () => { - it('returns a list of Tablets, given a successful response', async () => { - const t0 = pb.Tablet.create({ tablet: { hostname: 't0' } }); - const t1 = pb.Tablet.create({ tablet: { hostname: 't1' } }); - const t2 = pb.Tablet.create({ tablet: { hostname: 't2' } }); - const tablets = [t0, t1, t2]; - - mockServerJson(`/api/tablets`, { - ok: true, - result: { - tablets: tablets.map((t) => t.toJSON()), - }, - }); - - const result = await api.fetchTablets(); - expect(result).toEqual(tablets); - }); - - it('throws an error if response.ok is false', async () => { - const response = { ok: false }; - mockServerJson('/api/tablets', response); - - expect.assertions(3); - - try { - await api.fetchTablets(); - } catch (e) { - /* eslint-disable jest/no-conditional-expect */ - expect(e.name).toEqual(HTTP_RESPONSE_NOT_OK_ERROR); - expect(e.message).toEqual('/api/tablets'); - expect(e.response).toEqual(response); - /* eslint-enable jest/no-conditional-expect */ - } - }); - + describe('vtfetchEntities', () => { it('throws an error if result.tablets is not an array', async () => { - mockServerJson('/api/tablets', { ok: true, result: { tablets: null } }); - - expect.assertions(1); - - try { - await api.fetchTablets(); - } catch (e) { - /* eslint-disable jest/no-conditional-expect */ - expect(e.message).toMatch('expected tablets to be an array'); - /* eslint-enable jest/no-conditional-expect */ - } - }); - - it('throws an error if JSON cannot be unmarshalled into Tablet objects', async () => { - mockServerJson(`/api/tablets`, { - ok: true, - result: { - tablets: [{ cluster: 'this should be an object, not a string' }], - }, - }); + const endpoint = '/api/foos'; + mockServerJson(endpoint, { ok: true, result: { foos: null } }); expect.assertions(1); try { - await api.fetchTablets(); + await api.vtfetchEntities({ + endpoint, + extract: (res) => res.result.foos, + transform: (e) => null, // doesn't matter + }); } catch (e) { /* eslint-disable jest/no-conditional-expect */ - expect(e.message).toEqual('cluster.object expected'); + expect(e.message).toMatch('expected entities to be an array, got null'); /* eslint-enable jest/no-conditional-expect */ } }); diff --git a/web/vtadmin/src/api/http.ts b/web/vtadmin/src/api/http.ts index 93ca6a2505c..ee370e73462 100644 --- a/web/vtadmin/src/api/http.ts +++ b/web/vtadmin/src/api/http.ts @@ -81,21 +81,84 @@ export const vtfetchOpts = (): RequestInit => { return { credentials }; }; -export const fetchTablets = async () => { - const endpoint = '/api/tablets'; - const res = await vtfetch(endpoint); +// vtfetchEntities is a helper function for querying vtadmin-api endpoints +// that return a list of protobuf entities. +export const vtfetchEntities = async (opts: { + endpoint: string; + // Extract the list of entities from the response. We can't (strictly) + // guarantee type safety for API responses, hence the `any` return type. + extract: (res: HttpOkResponse) => any; + // Transform an individual entity in the array to its (proto)typed form. + // This will almost always be a `.verify` followed by a `.create`, + // but because of how protobufjs structures its generated types, + // writing this in a generic way is... unpleasant, and difficult to read. + transform: (e: object) => T; +}): Promise => { + const res = await vtfetch(opts.endpoint); // Throw "not ok" responses so that react-query correctly interprets them as errors. // See https://react-query.tanstack.com/guides/query-functions#handling-and-throwing-errors - if (!res.ok) throw new HttpResponseNotOkError(endpoint, res); + if (!res.ok) throw new HttpResponseNotOkError(opts.endpoint, res); - const tablets = res.result?.tablets; - if (!Array.isArray(tablets)) throw Error(`expected tablets to be an array, got ${tablets}`); + const entities = opts.extract(res); + if (!Array.isArray(entities)) { + throw Error(`expected entities to be an array, got ${entities}`); + } - return tablets.map((t: any) => { - const err = pb.Tablet.verify(t); - if (err) throw Error(err); + return entities.map(opts.transform); +}; - return pb.Tablet.create(t); +export const fetchClusters = async () => + vtfetchEntities({ + endpoint: '/api/clusters', + extract: (res) => res.result.clusters, + transform: (e) => { + const err = pb.Cluster.verify(e); + if (err) throw Error(err); + return pb.Cluster.create(e); + }, + }); + +export const fetchGates = async () => + vtfetchEntities({ + endpoint: '/api/gates', + extract: (res) => res.result.gates, + transform: (e) => { + const err = pb.VTGate.verify(e); + if (err) throw Error(err); + return pb.VTGate.create(e); + }, + }); + +export const fetchKeyspaces = async () => + vtfetchEntities({ + endpoint: '/api/keyspaces', + extract: (res) => res.result.keyspaces, + transform: (e) => { + const err = pb.Keyspace.verify(e); + if (err) throw Error(err); + return pb.Keyspace.create(e); + }, + }); + +export const fetchSchemas = async () => + vtfetchEntities({ + endpoint: '/api/schemas', + extract: (res) => res.result.schemas, + transform: (e) => { + const err = pb.Schema.verify(e); + if (err) throw Error(err); + return pb.Schema.create(e); + }, + }); + +export const fetchTablets = async () => + vtfetchEntities({ + endpoint: '/api/tablets', + extract: (res) => res.result.tablets, + transform: (e) => { + const err = pb.Tablet.verify(e); + if (err) throw Error(err); + return pb.Tablet.create(e); + }, }); -}; diff --git a/web/vtadmin/src/components/App.tsx b/web/vtadmin/src/components/App.tsx index f3ce702b369..c2141f9c2e8 100644 --- a/web/vtadmin/src/components/App.tsx +++ b/web/vtadmin/src/components/App.tsx @@ -21,6 +21,10 @@ import { Tablets } from './routes/Tablets'; import { Debug } from './routes/Debug'; import { NavRail } from './NavRail'; import { Error404 } from './routes/Error404'; +import { Clusters } from './routes/Clusters'; +import { Gates } from './routes/Gates'; +import { Keyspaces } from './routes/Keyspaces'; +import { Schemas } from './routes/Schemas'; export const App = () => { return ( @@ -32,6 +36,22 @@ export const App = () => {
+ + + + + + + + + + + + + + + + diff --git a/web/vtadmin/src/components/NavRail.tsx b/web/vtadmin/src/components/NavRail.tsx index 90a5ef58c7d..8fde2c0c92b 100644 --- a/web/vtadmin/src/components/NavRail.tsx +++ b/web/vtadmin/src/components/NavRail.tsx @@ -18,11 +18,15 @@ import { Link, NavLink } from 'react-router-dom'; import style from './NavRail.module.scss'; import logo from '../img/vitess-icon-color.svg'; -import { useTablets } from '../hooks/api'; +import { useClusters, useGates, useKeyspaces, useTableDefinitions, useTablets } from '../hooks/api'; import { Icon, Icons } from './Icon'; export const NavRail = () => { - const { data: tabletData } = useTablets(); + const { data: clusters = [] } = useClusters(); + const { data: keyspaces = [] } = useKeyspaces(); + const { data: gates = [] } = useGates(); + const { data: schemas = [] } = useTableDefinitions(); + const { data: tablets = [] } = useTablets(); return (
@@ -43,19 +47,19 @@ export const NavRail = () => {
  • {/* FIXME replace this with a C when we have one */} - +
  • - +
  • - +
  • - +
  • - +
diff --git a/web/vtadmin/src/components/TabletList.tsx b/web/vtadmin/src/components/TabletList.tsx deleted file mode 100644 index 67d92676321..00000000000 --- a/web/vtadmin/src/components/TabletList.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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. - */ -import { vtadmin as pb, topodata } from '../proto/vtadmin'; - -interface Props { - tablets: pb.Tablet[]; -} - -const SERVING_STATES = Object.keys(pb.Tablet.ServingState); -const TABLET_TYPES = Object.keys(topodata.TabletType); - -export const TabletList = ({ tablets }: Props) => { - return ( - - - - - - - - - - - {tablets.map((t, i) => ( - - - - - - - ))} - -
ClusterHostnameTypeState
{t.cluster?.name} - {t.tablet?.hostname} - {t.tablet?.type && TABLET_TYPES[t.tablet?.type]}{SERVING_STATES[t.state]}
- ); -}; diff --git a/web/vtadmin/src/components/routes/Clusters.tsx b/web/vtadmin/src/components/routes/Clusters.tsx new file mode 100644 index 00000000000..871eb395344 --- /dev/null +++ b/web/vtadmin/src/components/routes/Clusters.tsx @@ -0,0 +1,48 @@ +/** + * 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. + */ +import { orderBy } from 'lodash-es'; +import * as React from 'react'; +import { useClusters } from '../../hooks/api'; + +export const Clusters = () => { + const { data } = useClusters(); + + const rows = React.useMemo(() => { + return orderBy(data, ['name']); + }, [data]); + + return ( +
+

Clusters

+ + + + + + + + + {rows.map((cluster, idx) => ( + + + + + ))} + +
NameId
{cluster.name}{cluster.id}
+
+ ); +}; diff --git a/web/vtadmin/src/components/routes/Gates.tsx b/web/vtadmin/src/components/routes/Gates.tsx new file mode 100644 index 00000000000..c5dc7bf9019 --- /dev/null +++ b/web/vtadmin/src/components/routes/Gates.tsx @@ -0,0 +1,48 @@ +/** + * 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. + */ +import { orderBy } from 'lodash-es'; +import * as React from 'react'; +import { useGates } from '../../hooks/api'; + +export const Gates = () => { + const { data } = useGates(); + + const rows = React.useMemo(() => { + return orderBy(data, ['cluster.name', 'hostname']); + }, [data]); + + return ( +
+

Gates

+ + + + + + + + + {rows.map((gate, idx) => ( + + + + + ))} + +
ClusterHostname
{gate.cluster?.name}{gate.hostname}
+
+ ); +}; diff --git a/web/vtadmin/src/components/routes/Keyspaces.tsx b/web/vtadmin/src/components/routes/Keyspaces.tsx new file mode 100644 index 00000000000..c5e128f601b --- /dev/null +++ b/web/vtadmin/src/components/routes/Keyspaces.tsx @@ -0,0 +1,48 @@ +/** + * 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. + */ +import { orderBy } from 'lodash-es'; +import * as React from 'react'; +import { useKeyspaces } from '../../hooks/api'; + +export const Keyspaces = () => { + const { data } = useKeyspaces(); + + const rows = React.useMemo(() => { + return orderBy(data, ['cluster.name', 'keyspace.name']); + }, [data]); + + return ( +
+

Keyspaces

+ + + + + + + + + {rows.map((keyspace, idx) => ( + + + + + ))} + +
ClusterKeyspace
{keyspace.cluster?.name}{keyspace.keyspace?.name}
+
+ ); +}; diff --git a/web/vtadmin/src/components/routes/Schemas.tsx b/web/vtadmin/src/components/routes/Schemas.tsx new file mode 100644 index 00000000000..7b78443d295 --- /dev/null +++ b/web/vtadmin/src/components/routes/Schemas.tsx @@ -0,0 +1,50 @@ +/** + * 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. + */ +import { orderBy } from 'lodash-es'; +import * as React from 'react'; +import { useTableDefinitions } from '../../hooks/api'; + +export const Schemas = () => { + const { data = [] } = useTableDefinitions(); + + const rows = React.useMemo(() => { + return orderBy(data, ['cluster.name', 'keyspace', 'tableDefinition.name']); + }, [data]); + + return ( +
+

Schemas

+ + + + + + + + + + {rows.map((row, idx) => ( + + + + + + ))} + +
ClusterKeyspaceTable
{row.cluster?.name}{row.keyspace}{row.tableDefinition?.name}
+
+ ); +}; diff --git a/web/vtadmin/src/components/routes/Tablets.tsx b/web/vtadmin/src/components/routes/Tablets.tsx index 95cdc5706c0..4dbf661b38a 100644 --- a/web/vtadmin/src/components/routes/Tablets.tsx +++ b/web/vtadmin/src/components/routes/Tablets.tsx @@ -16,27 +16,56 @@ import * as React from 'react'; import { useTablets } from '../../hooks/api'; -import { TabletList } from '../TabletList'; +import { vtadmin as pb, topodata } from '../../proto/vtadmin'; +import { orderBy } from 'lodash-es'; export const Tablets = () => { - const { data, error, isError, isSuccess } = useTablets(); - - // Placeholder UI :D - let content =
Loading...
; - if (isError) { - content = ( -
- {error?.name}: {error?.message} -
- ); - } else if (isSuccess) { - content = ; - } + const { data = [] } = useTablets(); + + const rows = React.useMemo(() => { + return orderBy(data, ['cluster.name', 'tablet.keyspace', 'tablet.shard', 'tablet.type']); + }, [data]); return (

Tablets

- {content} + + + + + + + + + + + + + + + {rows.map((t, tdx) => ( + + + + + + + + + + ))} + +
ClusterKeyspaceShardAliasHostnameTypeState
{t.cluster?.name}{t.tablet?.keyspace}{t.tablet?.shard}{formatAlias(t)}{t.tablet?.hostname}{formatType(t)}{formatState(t)}
); }; + +const SERVING_STATES = Object.keys(pb.Tablet.ServingState); +const TABLET_TYPES = Object.keys(topodata.TabletType); + +const formatAlias = (t: pb.Tablet) => + t.tablet?.alias?.cell && t.tablet?.alias?.uid && `${t.tablet.alias.cell}-${t.tablet.alias.uid}`; + +const formatType = (t: pb.Tablet) => t.tablet?.type && TABLET_TYPES[t.tablet?.type]; + +const formatState = (t: pb.Tablet) => t.state && SERVING_STATES[t.state]; diff --git a/web/vtadmin/src/hooks/api.ts b/web/vtadmin/src/hooks/api.ts index c8c783ff439..34bc7a99f3b 100644 --- a/web/vtadmin/src/hooks/api.ts +++ b/web/vtadmin/src/hooks/api.ts @@ -1,9 +1,45 @@ import { useQuery } from 'react-query'; -import { fetchTablets } from '../api/http'; +import { fetchClusters, fetchGates, fetchKeyspaces, fetchSchemas, fetchTablets } from '../api/http'; import { vtadmin as pb } from '../proto/vtadmin'; -export const useTablets = () => { - return useQuery(['tablets'], async () => { - return await fetchTablets(); - }); +export const useClusters = () => useQuery(['clusters'], fetchClusters); +export const useGates = () => useQuery(['gates'], fetchGates); +export const useKeyspaces = () => useQuery(['keyspaces'], fetchKeyspaces); +export const useSchemas = () => useQuery(['schemas'], fetchSchemas); +export const useTablets = () => useQuery(['tablets'], fetchTablets); + +export interface TableDefinition { + cluster?: pb.Schema['cluster']; + keyspace?: pb.Schema['keyspace']; + // The [0] index is a typescript quirk to infer the type of + // an entry in an array, and therefore the type of ALL entries + // in the array (not just the first one). + tableDefinition?: pb.Schema['table_definitions'][0]; +} + +// useTableDefinitions is a helper hook for when a flattened list +// of table definitions (across all keyspaces and clusters) is required, +// instead of the default vtadmin-api/Vitess grouping of schemas by keyspace. +// +// Under the hood, this calls the useSchemas hook and therefore uses +// the same query cache. +export const useTableDefinitions = () => { + const { data, ...query } = useSchemas(); + + if (!Array.isArray(data)) { + return { data, ...query }; + } + + const tds = data.reduce((acc: TableDefinition[], schema: pb.Schema) => { + (schema.table_definitions || []).forEach((td) => { + acc.push({ + cluster: schema.cluster, + keyspace: schema.keyspace, + tableDefinition: td, + }); + }); + return acc; + }, []); + + return { ...query, data: tds }; }; diff --git a/web/vtadmin/src/index.css b/web/vtadmin/src/index.css index f5b2d443d3f..cc063bbd499 100644 --- a/web/vtadmin/src/index.css +++ b/web/vtadmin/src/index.css @@ -162,7 +162,9 @@ table { } table th { - padding: 8px; + font-size: var(--fontSizeSmall); + padding: 8px 12px; + text-align: left; } table tbody td { diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index f62cb0db746..eda23a886a6 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,21 @@ 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 GetClusters. + * @param request GetClustersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetClustersResponse + */ + public getClusters(request: vtadmin.IGetClustersRequest, callback: vtadmin.VTAdmin.GetClustersCallback): void; + + /** + * Calls GetClusters. + * @param request GetClustersRequest message or plain object + * @returns Promise + */ + public getClusters(request: vtadmin.IGetClustersRequest): Promise; /** * Calls GetGates. @@ -38,6 +50,34 @@ export namespace vtadmin { */ public getGates(request: vtadmin.IGetGatesRequest): Promise; + /** + * Calls GetKeyspaces. + * @param request GetKeyspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetKeyspacesResponse + */ + public getKeyspaces(request: vtadmin.IGetKeyspacesRequest, callback: vtadmin.VTAdmin.GetKeyspacesCallback): void; + + /** + * Calls GetKeyspaces. + * @param request GetKeyspacesRequest message or plain object + * @returns Promise + */ + public getKeyspaces(request: vtadmin.IGetKeyspacesRequest): Promise; + + /** + * Calls GetSchemas. + * @param request GetSchemasRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetSchemasResponse + */ + public getSchemas(request: vtadmin.IGetSchemasRequest, callback: vtadmin.VTAdmin.GetSchemasCallback): void; + + /** + * Calls GetSchemas. + * @param request GetSchemasRequest message or plain object + * @returns Promise + */ + public getSchemas(request: vtadmin.IGetSchemasRequest): Promise; + /** * Calls GetTablet. * @param request GetTabletRequest message or plain object @@ -68,39 +108,63 @@ export namespace vtadmin { } namespace VTAdmin { + + /** + * Callback as used by {@link vtadmin.VTAdmin#getClusters}. + * @param error Error, if any + * @param [response] GetClustersResponse + */ + type GetClustersCallback = (error: (Error|null), response?: vtadmin.GetClustersResponse) => void; + /** * 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#getKeyspaces}. + * @param error Error, if any + * @param [response] GetKeyspacesResponse + */ + type GetKeyspacesCallback = (error: (Error|null), response?: vtadmin.GetKeyspacesResponse) => void; + + /** + * Callback as used by {@link vtadmin.VTAdmin#getSchemas}. + * @param error Error, if any + * @param [response] GetSchemasResponse + */ + type GetSchemasCallback = (error: (Error|null), response?: vtadmin.GetSchemasResponse) => 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 +208,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 +217,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. @@ -184,20 +248,220 @@ export namespace vtadmin { public toJSON(): { [k: string]: any }; } + /** Properties of a Keyspace. */ + interface IKeyspace { + + /** Keyspace cluster */ + cluster?: (vtadmin.ICluster|null); + + /** Keyspace keyspace */ + keyspace?: (vtctldata.IKeyspace|null); + } + + /** Represents a Keyspace. */ + class Keyspace implements IKeyspace { + + /** + * Constructs a new Keyspace. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IKeyspace); + + /** Keyspace cluster. */ + public cluster?: (vtadmin.ICluster|null); + + /** Keyspace keyspace. */ + public keyspace?: (vtctldata.IKeyspace|null); + + /** + * Creates a new Keyspace instance using the specified properties. + * @param [properties] Properties to set + * @returns Keyspace instance + */ + public static create(properties?: vtadmin.IKeyspace): vtadmin.Keyspace; + + /** + * Encodes the specified Keyspace message. Does not implicitly {@link vtadmin.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: vtadmin.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtadmin.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: vtadmin.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): vtadmin.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)): vtadmin.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 }): vtadmin.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: vtadmin.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Keyspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema cluster */ + cluster?: (vtadmin.ICluster|null); + + /** Schema keyspace */ + keyspace?: (string|null); + + /** Schema table_definitions */ + table_definitions?: (tabletmanagerdata.ITableDefinition[]|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.ISchema); + + /** Schema cluster. */ + public cluster?: (vtadmin.ICluster|null); + + /** Schema keyspace. */ + public keyspace: string; + + /** Schema table_definitions. */ + public table_definitions: tabletmanagerdata.ITableDefinition[]; + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: vtadmin.ISchema): vtadmin.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link vtadmin.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link vtadmin.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @throws {Error} If the payload is 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.Schema; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @throws {Error} If the 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.Schema; + + /** + * Verifies a Schema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): vtadmin.Schema; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** 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 +469,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 +508,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 +517,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 +549,133 @@ export namespace vtadmin { } namespace Tablet { + /** ServingState enum. */ enum ServingState { UNKNOWN = 0, SERVING = 1, - NOT_SERVING = 2, + NOT_SERVING = 2 } } + /** Properties of a Vtctld. */ + interface IVtctld { + + /** Vtctld hostname */ + hostname?: (string|null); + + /** Vtctld cluster */ + cluster?: (vtadmin.ICluster|null); + } + + /** Represents a Vtctld. */ + class Vtctld implements IVtctld { + + /** + * Constructs a new Vtctld. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IVtctld); + + /** Vtctld hostname. */ + public hostname: string; + + /** Vtctld cluster. */ + public cluster?: (vtadmin.ICluster|null); + + /** + * Creates a new Vtctld instance using the specified properties. + * @param [properties] Properties to set + * @returns Vtctld instance + */ + public static create(properties?: vtadmin.IVtctld): vtadmin.Vtctld; + + /** + * Encodes the specified Vtctld message. Does not implicitly {@link vtadmin.Vtctld.verify|verify} messages. + * @param message Vtctld message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.IVtctld, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Vtctld message, length delimited. Does not implicitly {@link vtadmin.Vtctld.verify|verify} messages. + * @param message Vtctld message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.IVtctld, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Vtctld message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vtctld + * @throws {Error} If the payload is 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.Vtctld; + + /** + * Decodes a Vtctld message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vtctld + * @throws {Error} If the 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.Vtctld; + + /** + * Verifies a Vtctld message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Vtctld message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vtctld + */ + public static fromObject(object: { [k: string]: any }): vtadmin.Vtctld; + + /** + * Creates a plain object from a Vtctld message. Also converts values to other types if specified. + * @param message Vtctld + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.Vtctld, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Vtctld to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** 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 +692,7 @@ export namespace vtadmin { public cell: string; /** VTGate cluster. */ - public cluster: string; + public cluster?: (vtadmin.ICluster|null); /** VTGate keyspaces. */ public keyspaces: string[]; @@ -365,7 +728,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 +737,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. @@ -405,33 +768,209 @@ export namespace vtadmin { public toJSON(): { [k: string]: any }; } - /** Properties of a GetGatesRequest. */ - interface IGetGatesRequest { - /** GetGatesRequest cluster_ids */ - cluster_ids?: string[] | null; + /** Properties of a GetClustersRequest. */ + interface IGetClustersRequest { } - /** Represents a GetGatesRequest. */ - class GetGatesRequest implements IGetGatesRequest { + /** Represents a GetClustersRequest. */ + class GetClustersRequest implements IGetClustersRequest { + /** - * Constructs a new GetGatesRequest. + * Constructs a new GetClustersRequest. * @param [properties] Properties to set */ - constructor(properties?: vtadmin.IGetGatesRequest); - - /** GetGatesRequest cluster_ids. */ - public cluster_ids: string[]; + constructor(properties?: vtadmin.IGetClustersRequest); /** - * Creates a new GetGatesRequest instance using the specified properties. + * Creates a new GetClustersRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetGatesRequest instance + * @returns GetClustersRequest instance */ - public static create(properties?: vtadmin.IGetGatesRequest): vtadmin.GetGatesRequest; + public static create(properties?: vtadmin.IGetClustersRequest): vtadmin.GetClustersRequest; /** - * Encodes the specified GetGatesRequest message. Does not implicitly {@link vtadmin.GetGatesRequest.verify|verify} messages. - * @param message GetGatesRequest message or plain object to encode + * Encodes the specified GetClustersRequest message. Does not implicitly {@link vtadmin.GetClustersRequest.verify|verify} messages. + * @param message GetClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.IGetClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClustersRequest message, length delimited. Does not implicitly {@link vtadmin.GetClustersRequest.verify|verify} messages. + * @param message GetClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.IGetClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClustersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClustersRequest + * @throws {Error} If the payload is 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.GetClustersRequest; + + /** + * Decodes a GetClustersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClustersRequest + * @throws {Error} If the 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.GetClustersRequest; + + /** + * Verifies a GetClustersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClustersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClustersRequest + */ + public static fromObject(object: { [k: string]: any }): vtadmin.GetClustersRequest; + + /** + * Creates a plain object from a GetClustersRequest message. Also converts values to other types if specified. + * @param message GetClustersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.GetClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClustersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetClustersResponse. */ + interface IGetClustersResponse { + + /** GetClustersResponse clusters */ + clusters?: (vtadmin.ICluster[]|null); + } + + /** Represents a GetClustersResponse. */ + class GetClustersResponse implements IGetClustersResponse { + + /** + * Constructs a new GetClustersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IGetClustersResponse); + + /** GetClustersResponse clusters. */ + public clusters: vtadmin.ICluster[]; + + /** + * Creates a new GetClustersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetClustersResponse instance + */ + public static create(properties?: vtadmin.IGetClustersResponse): vtadmin.GetClustersResponse; + + /** + * Encodes the specified GetClustersResponse message. Does not implicitly {@link vtadmin.GetClustersResponse.verify|verify} messages. + * @param message GetClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: vtadmin.IGetClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClustersResponse message, length delimited. Does not implicitly {@link vtadmin.GetClustersResponse.verify|verify} messages. + * @param message GetClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: vtadmin.IGetClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClustersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClustersResponse + * @throws {Error} If the payload is 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.GetClustersResponse; + + /** + * Decodes a GetClustersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClustersResponse + * @throws {Error} If the 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.GetClustersResponse; + + /** + * Verifies a GetClustersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClustersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClustersResponse + */ + public static fromObject(object: { [k: string]: any }): vtadmin.GetClustersResponse; + + /** + * Creates a plain object from a GetClustersResponse message. Also converts values to other types if specified. + * @param message GetClustersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: vtadmin.GetClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClustersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetGatesRequest. */ + interface IGetGatesRequest { + + /** GetGatesRequest cluster_ids */ + cluster_ids?: (string[]|null); + } + + /** Represents a GetGatesRequest. */ + class GetGatesRequest implements IGetGatesRequest { + + /** + * Constructs a new GetGatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: vtadmin.IGetGatesRequest); + + /** GetGatesRequest cluster_ids. */ + public cluster_ids: string[]; + + /** + * Creates a new GetGatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGatesRequest instance + */ + public static create(properties?: vtadmin.IGetGatesRequest): vtadmin.GetGatesRequest; + + /** + * Encodes the specified GetGatesRequest message. Does not implicitly {@link vtadmin.GetGatesRequest.verify|verify} messages. + * @param message GetGatesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ @@ -453,7 +992,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 +1001,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 +1023,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 +1034,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 +1082,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 +1091,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 +1113,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. @@ -587,2357 +1122,23518 @@ export namespace vtadmin { public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletRequest. */ - interface IGetTabletRequest { - /** GetTabletRequest hostname */ - hostname?: string | null; + /** Properties of a GetKeyspacesRequest. */ + interface IGetKeyspacesRequest { - /** GetTabletRequest cluster_ids */ - cluster_ids?: string[] | null; + /** GetKeyspacesRequest cluster_ids */ + cluster_ids?: (string[]|null); } - /** Represents a GetTabletRequest. */ - class GetTabletRequest implements IGetTabletRequest { + /** Represents a GetKeyspacesRequest. */ + class GetKeyspacesRequest implements IGetKeyspacesRequest { + /** - * Constructs a new GetTabletRequest. + * Constructs a new GetKeyspacesRequest. * @param [properties] Properties to set */ - constructor(properties?: vtadmin.IGetTabletRequest); - - /** GetTabletRequest hostname. */ - public hostname: string; + constructor(properties?: vtadmin.IGetKeyspacesRequest); - /** GetTabletRequest cluster_ids. */ + /** GetKeyspacesRequest cluster_ids. */ public cluster_ids: string[]; /** - * Creates a new GetTabletRequest instance using the specified properties. + * Creates a new GetKeyspacesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletRequest instance + * @returns GetKeyspacesRequest instance */ - public static create(properties?: vtadmin.IGetTabletRequest): vtadmin.GetTabletRequest; + public static create(properties?: vtadmin.IGetKeyspacesRequest): vtadmin.GetKeyspacesRequest; /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. - * @param message GetTabletRequest message or plain object to encode + * 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.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetKeyspacesRequest, 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 + * 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.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetKeyspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletRequest message from the specified reader or buffer. + * 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 GetTabletRequest + * @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.GetTabletRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetKeyspacesRequest; /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletRequest + * @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.GetTabletRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetKeyspacesRequest; /** - * Verifies a GetTabletRequest message. + * 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; + 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. + * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletRequest + * @returns GetKeyspacesRequest */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletRequest; + public static fromObject(object: { [k: string]: any }): vtadmin.GetKeyspacesRequest; /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. - * @param message GetTabletRequest + * 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.GetTabletRequest, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetKeyspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletRequest to JSON. + * Converts this GetKeyspacesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletsRequest. */ - interface IGetTabletsRequest { - /** GetTabletsRequest cluster_ids */ - cluster_ids?: string[] | null; + /** Properties of a GetKeyspacesResponse. */ + interface IGetKeyspacesResponse { + + /** GetKeyspacesResponse keyspaces */ + keyspaces?: (vtadmin.IKeyspace[]|null); } - /** Represents a GetTabletsRequest. */ - class GetTabletsRequest implements IGetTabletsRequest { + /** Represents a GetKeyspacesResponse. */ + class GetKeyspacesResponse implements IGetKeyspacesResponse { + /** - * Constructs a new GetTabletsRequest. + * Constructs a new GetKeyspacesResponse. * @param [properties] Properties to set */ - constructor(properties?: vtadmin.IGetTabletsRequest); + constructor(properties?: vtadmin.IGetKeyspacesResponse); - /** GetTabletsRequest cluster_ids. */ - public cluster_ids: string[]; + /** GetKeyspacesResponse keyspaces. */ + public keyspaces: vtadmin.IKeyspace[]; /** - * Creates a new GetTabletsRequest instance using the specified properties. + * Creates a new GetKeyspacesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletsRequest instance + * @returns GetKeyspacesResponse instance */ - public static create(properties?: vtadmin.IGetTabletsRequest): vtadmin.GetTabletsRequest; + public static create(properties?: vtadmin.IGetKeyspacesResponse): vtadmin.GetKeyspacesResponse; /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. - * @param message GetTabletsRequest message or plain object to encode + * 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.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetKeyspacesResponse, 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 + * 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.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetKeyspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. + * 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 GetTabletsRequest + * @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.GetTabletsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetKeyspacesResponse; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletsRequest + * @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.GetTabletsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetKeyspacesResponse; /** - * Verifies a GetTabletsRequest message. + * 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; + 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. + * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletsRequest + * @returns GetKeyspacesResponse */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletsRequest; + public static fromObject(object: { [k: string]: any }): vtadmin.GetKeyspacesResponse; /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. - * @param message GetTabletsRequest + * 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.GetTabletsRequest, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetKeyspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletsRequest to JSON. + * Converts this GetKeyspacesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetTabletsResponse. */ - interface IGetTabletsResponse { - /** GetTabletsResponse tablets */ - tablets?: vtadmin.ITablet[] | null; + /** Properties of a GetSchemasRequest. */ + interface IGetSchemasRequest { + + /** GetSchemasRequest cluster_ids */ + cluster_ids?: (string[]|null); } - /** Represents a GetTabletsResponse. */ - class GetTabletsResponse implements IGetTabletsResponse { + /** Represents a GetSchemasRequest. */ + class GetSchemasRequest implements IGetSchemasRequest { + /** - * Constructs a new GetTabletsResponse. + * Constructs a new GetSchemasRequest. * @param [properties] Properties to set */ - constructor(properties?: vtadmin.IGetTabletsResponse); + constructor(properties?: vtadmin.IGetSchemasRequest); - /** GetTabletsResponse tablets. */ - public tablets: vtadmin.ITablet[]; + /** GetSchemasRequest cluster_ids. */ + public cluster_ids: string[]; /** - * Creates a new GetTabletsResponse instance using the specified properties. + * Creates a new GetSchemasRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetTabletsResponse instance + * @returns GetSchemasRequest instance */ - public static create(properties?: vtadmin.IGetTabletsResponse): vtadmin.GetTabletsResponse; + public static create(properties?: vtadmin.IGetSchemasRequest): vtadmin.GetSchemasRequest; /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtadmin.GetTabletsResponse.verify|verify} messages. - * @param message GetTabletsResponse message or plain object to encode + * 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.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetSchemasRequest, 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 + * 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.IGetTabletsResponse, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. + * 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 GetTabletsResponse + * @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.GetTabletsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetSchemasRequest; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSchemasRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetTabletsResponse + * @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.GetTabletsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetSchemasRequest; /** - * Verifies a GetTabletsResponse message. + * 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; + 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. + * Creates a GetSchemasRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetTabletsResponse + * @returns GetSchemasRequest */ - public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletsResponse; + public static fromObject(object: { [k: string]: any }): vtadmin.GetSchemasRequest; /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. - * @param message GetTabletsResponse + * 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.GetTabletsResponse, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetTabletsResponse to JSON. + * Converts this GetSchemasRequest 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; + /** Properties of a GetSchemasResponse. */ + interface IGetSchemasResponse { - /** KeyRange end */ - end?: Uint8Array | null; + /** GetSchemasResponse schemas */ + schemas?: (vtadmin.ISchema[]|null); } - /** Represents a KeyRange. */ - class KeyRange implements IKeyRange { + /** Represents a GetSchemasResponse. */ + class GetSchemasResponse implements IGetSchemasResponse { + /** - * Constructs a new KeyRange. + * Constructs a new GetSchemasResponse. * @param [properties] Properties to set */ - constructor(properties?: topodata.IKeyRange); - - /** KeyRange start. */ - public start: Uint8Array; + constructor(properties?: vtadmin.IGetSchemasResponse); - /** KeyRange end. */ - public end: Uint8Array; + /** GetSchemasResponse schemas. */ + public schemas: vtadmin.ISchema[]; /** - * Creates a new KeyRange instance using the specified properties. + * Creates a new GetSchemasResponse instance using the specified properties. * @param [properties] Properties to set - * @returns KeyRange instance + * @returns GetSchemasResponse instance */ - public static create(properties?: topodata.IKeyRange): topodata.KeyRange; + public static create(properties?: vtadmin.IGetSchemasResponse): vtadmin.GetSchemasResponse; /** - * Encodes the specified KeyRange message. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. - * @param message KeyRange message or plain object to encode + * 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: topodata.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetSchemasResponse, 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 + * 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: topodata.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KeyRange message from the specified reader or buffer. + * 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 KeyRange + * @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): topodata.KeyRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetSchemasResponse; /** - * Decodes a KeyRange message from the specified reader or buffer, length delimited. + * Decodes a GetSchemasResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KeyRange + * @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): topodata.KeyRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetSchemasResponse; /** - * Verifies a KeyRange message. + * 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; + 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. + * Creates a GetSchemasResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KeyRange + * @returns GetSchemasResponse */ - public static fromObject(object: { [k: string]: any }): topodata.KeyRange; + public static fromObject(object: { [k: string]: any }): vtadmin.GetSchemasResponse; /** - * Creates a plain object from a KeyRange message. Also converts values to other types if specified. - * @param message KeyRange + * 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: topodata.KeyRange, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KeyRange to JSON. + * Converts this GetSchemasResponse 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 GetTabletRequest. */ + interface IGetTabletRequest { - /** Properties of a TabletAlias. */ - interface ITabletAlias { - /** TabletAlias cell */ - cell?: string | null; + /** GetTabletRequest hostname */ + hostname?: (string|null); - /** TabletAlias uid */ - uid?: number | null; + /** GetTabletRequest cluster_ids */ + cluster_ids?: (string[]|null); } - /** Represents a TabletAlias. */ - class TabletAlias implements ITabletAlias { + /** Represents a GetTabletRequest. */ + class GetTabletRequest implements IGetTabletRequest { + /** - * Constructs a new TabletAlias. + * Constructs a new GetTabletRequest. * @param [properties] Properties to set */ - constructor(properties?: topodata.ITabletAlias); + constructor(properties?: vtadmin.IGetTabletRequest); - /** TabletAlias cell. */ - public cell: string; + /** GetTabletRequest hostname. */ + public hostname: string; - /** TabletAlias uid. */ - public uid: number; + /** GetTabletRequest cluster_ids. */ + public cluster_ids: string[]; /** - * Creates a new TabletAlias instance using the specified properties. + * Creates a new GetTabletRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TabletAlias instance + * @returns GetTabletRequest instance */ - public static create(properties?: topodata.ITabletAlias): topodata.TabletAlias; + public static create(properties?: vtadmin.IGetTabletRequest): vtadmin.GetTabletRequest; /** - * Encodes the specified TabletAlias message. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. - * @param message TabletAlias message or plain object to encode + * 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: topodata.ITabletAlias, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetTabletRequest, 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 + * 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: topodata.ITabletAlias, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetTabletRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TabletAlias message from the specified reader or buffer. + * 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 TabletAlias + * @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): topodata.TabletAlias; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletRequest; /** - * Decodes a TabletAlias message from the specified reader or buffer, length delimited. + * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TabletAlias + * @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): topodata.TabletAlias; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletRequest; /** - * Verifies a TabletAlias message. + * 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 TabletAlias message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TabletAlias + * @returns GetTabletRequest */ - public static fromObject(object: { [k: string]: any }): topodata.TabletAlias; + public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletRequest; /** - * Creates a plain object from a TabletAlias message. Also converts values to other types if specified. - * @param message TabletAlias + * 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: topodata.TabletAlias, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vtadmin.GetTabletRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TabletAlias to JSON. + * Converts this GetTabletRequest 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; + /** Properties of a GetTabletsRequest. */ + interface IGetTabletsRequest { - /** Tablet master_term_start_time */ - master_term_start_time?: vttime.ITime | null; + /** GetTabletsRequest cluster_ids */ + cluster_ids?: (string[]|null); } - /** Represents a Tablet. */ - class Tablet implements ITablet { + /** Represents a GetTabletsRequest. */ + class GetTabletsRequest implements IGetTabletsRequest { + /** - * Constructs a new Tablet. + * Constructs a new GetTabletsRequest. * @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; + constructor(properties?: vtadmin.IGetTabletsRequest); - /** Tablet master_term_start_time. */ - public master_term_start_time?: vttime.ITime | null; + /** GetTabletsRequest cluster_ids. */ + public cluster_ids: string[]; /** - * Creates a new Tablet instance using the specified properties. + * Creates a new GetTabletsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Tablet instance + * @returns GetTabletsRequest instance */ - public static create(properties?: topodata.ITablet): topodata.Tablet; + public static create(properties?: vtadmin.IGetTabletsRequest): vtadmin.GetTabletsRequest; /** - * Encodes the specified Tablet message. Does not implicitly {@link topodata.Tablet.verify|verify} messages. - * @param message Tablet message or plain object to encode + * 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: topodata.ITablet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetTabletsRequest, 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 + * 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: topodata.ITablet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetTabletsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Tablet message from the specified reader or buffer. + * 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 Tablet + * @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): topodata.Tablet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletsRequest; /** - * Decodes a Tablet message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Tablet + * @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): topodata.Tablet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletsRequest; /** - * Verifies a Tablet message. + * 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 Tablet message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Tablet + * @returns GetTabletsRequest */ - public static fromObject(object: { [k: string]: any }): topodata.Tablet; + public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletsRequest; /** - * Creates a plain object from a Tablet message. Also converts values to other types if specified. - * @param message Tablet + * 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: topodata.Tablet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtadmin.GetTabletsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Tablet to JSON. + * Converts this GetTabletsRequest 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; + /** Properties of a GetTabletsResponse. */ + interface IGetTabletsResponse { - /** Shard is_master_serving */ - is_master_serving?: boolean | null; + /** GetTabletsResponse tablets */ + tablets?: (vtadmin.ITablet[]|null); } - /** Represents a Shard. */ - class Shard implements IShard { + /** Represents a GetTabletsResponse. */ + class GetTabletsResponse implements IGetTabletsResponse { + /** - * Constructs a new Shard. + * Constructs a new GetTabletsResponse. * @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[]; + constructor(properties?: vtadmin.IGetTabletsResponse); - /** Shard is_master_serving. */ - public is_master_serving: boolean; + /** GetTabletsResponse tablets. */ + public tablets: vtadmin.ITablet[]; /** - * Creates a new Shard instance using the specified properties. + * Creates a new GetTabletsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Shard instance + * @returns GetTabletsResponse instance */ - public static create(properties?: topodata.IShard): topodata.Shard; + public static create(properties?: vtadmin.IGetTabletsResponse): vtadmin.GetTabletsResponse; /** - * Encodes the specified Shard message. Does not implicitly {@link topodata.Shard.verify|verify} messages. - * @param message Shard message or plain object to encode + * 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: topodata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vtadmin.IGetTabletsResponse, 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 + * 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: topodata.IShard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vtadmin.IGetTabletsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Shard message from the specified reader or buffer. + * 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 Shard + * @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): topodata.Shard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vtadmin.GetTabletsResponse; /** - * Decodes a Shard message from the specified reader or buffer, length delimited. + * Decodes a GetTabletsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Shard + * @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): topodata.Shard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vtadmin.GetTabletsResponse; /** - * Verifies a Shard message. + * 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 Shard message from a plain object. Also converts values to their respective internal types. + * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Shard + * @returns GetTabletsResponse */ - public static fromObject(object: { [k: string]: any }): topodata.Shard; + public static fromObject(object: { [k: string]: any }): vtadmin.GetTabletsResponse; /** - * Creates a plain object from a Shard message. Also converts values to other types if specified. - * @param message Shard + * 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: topodata.Shard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vtadmin.GetTabletsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Shard to JSON. + * Converts this GetTabletsResponse 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; - } +/** Namespace tabletmanagerdata. */ +export namespace tabletmanagerdata { - /** Represents a ServedType. */ - class ServedType implements IServedType { - /** - * Constructs a new ServedType. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Shard.IServedType); + /** Properties of a TableDefinition. */ + interface ITableDefinition { - /** ServedType tablet_type. */ - public tablet_type: topodata.TabletType; + /** TableDefinition name */ + name?: (string|null); - /** ServedType cells. */ - public cells: string[]; + /** TableDefinition schema */ + schema?: (string|null); - /** - * 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; + /** TableDefinition columns */ + columns?: (string[]|null); - /** - * 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; + /** TableDefinition primary_key_columns */ + primary_key_columns?: (string[]|null); - /** - * 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; + /** TableDefinition type */ + type?: (string|null); - /** - * 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; + /** TableDefinition data_length */ + data_length?: (number|Long|null); - /** - * 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; + /** TableDefinition row_count */ + row_count?: (number|Long|null); - /** - * 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; + /** TableDefinition fields */ + fields?: (query.IField[]|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; + /** Represents a TableDefinition. */ + class TableDefinition implements ITableDefinition { - /** - * 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 }; + /** + * Constructs a new TableDefinition. + * @param [properties] Properties to set + */ + constructor(properties?: tabletmanagerdata.ITableDefinition); - /** - * Converts this ServedType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** TableDefinition name. */ + public name: string; - /** Properties of a SourceShard. */ - interface ISourceShard { - /** SourceShard uid */ - uid?: number | null; + /** TableDefinition schema. */ + public schema: string; - /** SourceShard keyspace */ - keyspace?: string | null; + /** TableDefinition columns. */ + public columns: string[]; - /** SourceShard shard */ - shard?: string | null; + /** TableDefinition primary_key_columns. */ + public primary_key_columns: string[]; - /** SourceShard key_range */ - key_range?: topodata.IKeyRange | null; + /** TableDefinition type. */ + public type: string; - /** SourceShard tables */ - tables?: string[] | null; - } + /** TableDefinition data_length. */ + public data_length: (number|Long); - /** Represents a SourceShard. */ - class SourceShard implements ISourceShard { - /** - * Constructs a new SourceShard. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Shard.ISourceShard); + /** TableDefinition row_count. */ + public row_count: (number|Long); - /** SourceShard uid. */ - public uid: number; + /** TableDefinition fields. */ + public fields: query.IField[]; - /** SourceShard keyspace. */ - public keyspace: string; + /** + * 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; - /** SourceShard shard. */ - public shard: string; + /** + * 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; - /** SourceShard key_range. */ - public key_range?: topodata.IKeyRange | null; + /** + * 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; - /** SourceShard tables. */ - public tables: string[]; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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); - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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 }; - /** - * 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; + /** + * Converts this TableDefinition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a SchemaDefinition. */ + interface ISchemaDefinition { - /** - * 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; + /** SchemaDefinition database_schema */ + database_schema?: (string|null); - /** - * 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 }; + /** SchemaDefinition table_definitions */ + table_definitions?: (tabletmanagerdata.ITableDefinition[]|null); - /** - * Converts this SourceShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** SchemaDefinition version */ + version?: (string|null); + } - /** Properties of a TabletControl. */ - interface ITabletControl { - /** TabletControl tablet_type */ - tablet_type?: topodata.TabletType | null; + /** Represents a SchemaDefinition. */ + class SchemaDefinition implements ISchemaDefinition { - /** TabletControl cells */ - cells?: string[] | null; + /** + * Constructs a new SchemaDefinition. + * @param [properties] Properties to set + */ + constructor(properties?: tabletmanagerdata.ISchemaDefinition); - /** TabletControl blacklisted_tables */ - blacklisted_tables?: string[] | null; + /** SchemaDefinition database_schema. */ + public database_schema: string; - /** TabletControl frozen */ - frozen?: boolean | null; - } + /** SchemaDefinition table_definitions. */ + public table_definitions: tabletmanagerdata.ITableDefinition[]; - /** Represents a TabletControl. */ - class TabletControl implements ITabletControl { - /** - * Constructs a new TabletControl. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Shard.ITabletControl); + /** SchemaDefinition version. */ + public version: string; - /** TabletControl tablet_type. */ - public tablet_type: topodata.TabletType; + /** + * 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; - /** TabletControl cells. */ + /** + * 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); + } + + /** 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; + + /** + * 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[]; - /** TabletControl blacklisted_tables. */ - public blacklisted_tables: 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 }; + } +} + +/** 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 }; + } +} + +/** 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 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 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 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); + } + + /** 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[]; + + /** + * 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 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?: (google.protobuf.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?: (google.protobuf.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 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 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 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 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); + } + + /** 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; + + /** + * 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 }; + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** 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?: google.protobuf.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?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.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: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.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: google.protobuf.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): google.protobuf.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)): google.protobuf.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 }): google.protobuf.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: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} + +/** Namespace mysqlctl. */ +export namespace mysqlctl { + + /** Properties of a StartRequest. */ + interface IStartRequest { + + /** StartRequest mysqld_args */ + mysqld_args?: (string[]|null); + } + + /** Represents a StartRequest. */ + class StartRequest implements IStartRequest { + + /** + * Constructs a new StartRequest. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IStartRequest); + + /** StartRequest mysqld_args. */ + public mysqld_args: string[]; + + /** + * Creates a new StartRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartRequest instance + */ + public static create(properties?: mysqlctl.IStartRequest): mysqlctl.StartRequest; + + /** + * Encodes the specified StartRequest message. Does not implicitly {@link mysqlctl.StartRequest.verify|verify} messages. + * @param message StartRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IStartRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartRequest message, length delimited. Does not implicitly {@link mysqlctl.StartRequest.verify|verify} messages. + * @param message StartRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IStartRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.StartRequest; + + /** + * Decodes a StartRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.StartRequest; + + /** + * Verifies a StartRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartRequest + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.StartRequest; + + /** + * Creates a plain object from a StartRequest message. Also converts values to other types if specified. + * @param message StartRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.StartRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StartResponse. */ + interface IStartResponse { + } + + /** Represents a StartResponse. */ + class StartResponse implements IStartResponse { + + /** + * Constructs a new StartResponse. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IStartResponse); + + /** + * Creates a new StartResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StartResponse instance + */ + public static create(properties?: mysqlctl.IStartResponse): mysqlctl.StartResponse; + + /** + * Encodes the specified StartResponse message. Does not implicitly {@link mysqlctl.StartResponse.verify|verify} messages. + * @param message StartResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IStartResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartResponse message, length delimited. Does not implicitly {@link mysqlctl.StartResponse.verify|verify} messages. + * @param message StartResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IStartResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.StartResponse; + + /** + * Decodes a StartResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.StartResponse; + + /** + * Verifies a StartResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StartResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartResponse + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.StartResponse; + + /** + * Creates a plain object from a StartResponse message. Also converts values to other types if specified. + * @param message StartResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.StartResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ShutdownRequest. */ + interface IShutdownRequest { + + /** ShutdownRequest wait_for_mysqld */ + wait_for_mysqld?: (boolean|null); + } + + /** Represents a ShutdownRequest. */ + class ShutdownRequest implements IShutdownRequest { + + /** + * Constructs a new ShutdownRequest. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IShutdownRequest); + + /** ShutdownRequest wait_for_mysqld. */ + public wait_for_mysqld: boolean; + + /** + * Creates a new ShutdownRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ShutdownRequest instance + */ + public static create(properties?: mysqlctl.IShutdownRequest): mysqlctl.ShutdownRequest; + + /** + * Encodes the specified ShutdownRequest message. Does not implicitly {@link mysqlctl.ShutdownRequest.verify|verify} messages. + * @param message ShutdownRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IShutdownRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShutdownRequest message, length delimited. Does not implicitly {@link mysqlctl.ShutdownRequest.verify|verify} messages. + * @param message ShutdownRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IShutdownRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShutdownRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShutdownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.ShutdownRequest; + + /** + * Decodes a ShutdownRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShutdownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.ShutdownRequest; + + /** + * Verifies a ShutdownRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShutdownRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShutdownRequest + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.ShutdownRequest; + + /** + * Creates a plain object from a ShutdownRequest message. Also converts values to other types if specified. + * @param message ShutdownRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.ShutdownRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShutdownRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ShutdownResponse. */ + interface IShutdownResponse { + } + + /** Represents a ShutdownResponse. */ + class ShutdownResponse implements IShutdownResponse { + + /** + * Constructs a new ShutdownResponse. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IShutdownResponse); + + /** + * Creates a new ShutdownResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ShutdownResponse instance + */ + public static create(properties?: mysqlctl.IShutdownResponse): mysqlctl.ShutdownResponse; + + /** + * Encodes the specified ShutdownResponse message. Does not implicitly {@link mysqlctl.ShutdownResponse.verify|verify} messages. + * @param message ShutdownResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IShutdownResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShutdownResponse message, length delimited. Does not implicitly {@link mysqlctl.ShutdownResponse.verify|verify} messages. + * @param message ShutdownResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IShutdownResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShutdownResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShutdownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.ShutdownResponse; + + /** + * Decodes a ShutdownResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShutdownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.ShutdownResponse; + + /** + * Verifies a ShutdownResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ShutdownResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShutdownResponse + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.ShutdownResponse; + + /** + * Creates a plain object from a ShutdownResponse message. Also converts values to other types if specified. + * @param message ShutdownResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.ShutdownResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShutdownResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RunMysqlUpgradeRequest. */ + interface IRunMysqlUpgradeRequest { + } + + /** Represents a RunMysqlUpgradeRequest. */ + class RunMysqlUpgradeRequest implements IRunMysqlUpgradeRequest { + + /** + * Constructs a new RunMysqlUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IRunMysqlUpgradeRequest); + + /** + * Creates a new RunMysqlUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunMysqlUpgradeRequest instance + */ + public static create(properties?: mysqlctl.IRunMysqlUpgradeRequest): mysqlctl.RunMysqlUpgradeRequest; + + /** + * Encodes the specified RunMysqlUpgradeRequest message. Does not implicitly {@link mysqlctl.RunMysqlUpgradeRequest.verify|verify} messages. + * @param message RunMysqlUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IRunMysqlUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunMysqlUpgradeRequest message, length delimited. Does not implicitly {@link mysqlctl.RunMysqlUpgradeRequest.verify|verify} messages. + * @param message RunMysqlUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IRunMysqlUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunMysqlUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunMysqlUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.RunMysqlUpgradeRequest; + + /** + * Decodes a RunMysqlUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunMysqlUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.RunMysqlUpgradeRequest; + + /** + * Verifies a RunMysqlUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunMysqlUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunMysqlUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.RunMysqlUpgradeRequest; + + /** + * Creates a plain object from a RunMysqlUpgradeRequest message. Also converts values to other types if specified. + * @param message RunMysqlUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.RunMysqlUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunMysqlUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RunMysqlUpgradeResponse. */ + interface IRunMysqlUpgradeResponse { + } + + /** Represents a RunMysqlUpgradeResponse. */ + class RunMysqlUpgradeResponse implements IRunMysqlUpgradeResponse { + + /** + * Constructs a new RunMysqlUpgradeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IRunMysqlUpgradeResponse); + + /** + * Creates a new RunMysqlUpgradeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunMysqlUpgradeResponse instance + */ + public static create(properties?: mysqlctl.IRunMysqlUpgradeResponse): mysqlctl.RunMysqlUpgradeResponse; + + /** + * Encodes the specified RunMysqlUpgradeResponse message. Does not implicitly {@link mysqlctl.RunMysqlUpgradeResponse.verify|verify} messages. + * @param message RunMysqlUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IRunMysqlUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunMysqlUpgradeResponse message, length delimited. Does not implicitly {@link mysqlctl.RunMysqlUpgradeResponse.verify|verify} messages. + * @param message RunMysqlUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IRunMysqlUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunMysqlUpgradeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunMysqlUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.RunMysqlUpgradeResponse; + + /** + * Decodes a RunMysqlUpgradeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunMysqlUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.RunMysqlUpgradeResponse; + + /** + * Verifies a RunMysqlUpgradeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** TabletControl frozen. */ - public frozen: boolean; + /** + * Creates a RunMysqlUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunMysqlUpgradeResponse + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.RunMysqlUpgradeResponse; - /** - * 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; + /** + * Creates a plain object from a RunMysqlUpgradeResponse message. Also converts values to other types if specified. + * @param message RunMysqlUpgradeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.RunMysqlUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this RunMysqlUpgradeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ReinitConfigRequest. */ + interface IReinitConfigRequest { + } - /** - * 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; + /** Represents a ReinitConfigRequest. */ + class ReinitConfigRequest implements IReinitConfigRequest { - /** - * 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; + /** + * Constructs a new ReinitConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IReinitConfigRequest); - /** - * 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 new ReinitConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReinitConfigRequest instance + */ + public static create(properties?: mysqlctl.IReinitConfigRequest): mysqlctl.ReinitConfigRequest; - /** - * 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; + /** + * Encodes the specified ReinitConfigRequest message. Does not implicitly {@link mysqlctl.ReinitConfigRequest.verify|verify} messages. + * @param message ReinitConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IReinitConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified ReinitConfigRequest message, length delimited. Does not implicitly {@link mysqlctl.ReinitConfigRequest.verify|verify} messages. + * @param message ReinitConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IReinitConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this TabletControl to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ReinitConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReinitConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.ReinitConfigRequest; + + /** + * Decodes a ReinitConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReinitConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.ReinitConfigRequest; + + /** + * Verifies a ReinitConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReinitConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReinitConfigRequest + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.ReinitConfigRequest; + + /** + * Creates a plain object from a ReinitConfigRequest message. Also converts values to other types if specified. + * @param message ReinitConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.ReinitConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReinitConfigRequest 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; + /** Properties of a ReinitConfigResponse. */ + interface IReinitConfigResponse { + } - /** Keyspace sharding_column_type */ - sharding_column_type?: topodata.KeyspaceIdType | null; + /** Represents a ReinitConfigResponse. */ + class ReinitConfigResponse implements IReinitConfigResponse { - /** Keyspace served_froms */ - served_froms?: topodata.Keyspace.IServedFrom[] | null; + /** + * Constructs a new ReinitConfigResponse. + * @param [properties] Properties to set + */ + constructor(properties?: mysqlctl.IReinitConfigResponse); - /** Keyspace keyspace_type */ - keyspace_type?: topodata.KeyspaceType | null; + /** + * Creates a new ReinitConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReinitConfigResponse instance + */ + public static create(properties?: mysqlctl.IReinitConfigResponse): mysqlctl.ReinitConfigResponse; - /** Keyspace base_keyspace */ - base_keyspace?: string | null; + /** + * Encodes the specified ReinitConfigResponse message. Does not implicitly {@link mysqlctl.ReinitConfigResponse.verify|verify} messages. + * @param message ReinitConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IReinitConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Keyspace snapshot_time */ - snapshot_time?: vttime.ITime | null; + /** + * Encodes the specified ReinitConfigResponse message, length delimited. Does not implicitly {@link mysqlctl.ReinitConfigResponse.verify|verify} messages. + * @param message ReinitConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IReinitConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReinitConfigResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReinitConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.ReinitConfigResponse; + + /** + * Decodes a ReinitConfigResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReinitConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.ReinitConfigResponse; + + /** + * Verifies a ReinitConfigResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReinitConfigResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReinitConfigResponse + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.ReinitConfigResponse; + + /** + * Creates a plain object from a ReinitConfigResponse message. Also converts values to other types if specified. + * @param message ReinitConfigResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.ReinitConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReinitConfigResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Represents a Keyspace. */ - class Keyspace implements IKeyspace { + /** Properties of a RefreshConfigRequest. */ + interface IRefreshConfigRequest { + } + + /** Represents a RefreshConfigRequest. */ + class RefreshConfigRequest implements IRefreshConfigRequest { + /** - * Constructs a new Keyspace. + * Constructs a new RefreshConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: topodata.IKeyspace); + constructor(properties?: mysqlctl.IRefreshConfigRequest); - /** Keyspace sharding_column_name. */ - public sharding_column_name: string; + /** + * Creates a new RefreshConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RefreshConfigRequest instance + */ + public static create(properties?: mysqlctl.IRefreshConfigRequest): mysqlctl.RefreshConfigRequest; - /** Keyspace sharding_column_type. */ - public sharding_column_type: topodata.KeyspaceIdType; + /** + * Encodes the specified RefreshConfigRequest message. Does not implicitly {@link mysqlctl.RefreshConfigRequest.verify|verify} messages. + * @param message RefreshConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: mysqlctl.IRefreshConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Keyspace served_froms. */ - public served_froms: topodata.Keyspace.IServedFrom[]; + /** + * Encodes the specified RefreshConfigRequest message, length delimited. Does not implicitly {@link mysqlctl.RefreshConfigRequest.verify|verify} messages. + * @param message RefreshConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: mysqlctl.IRefreshConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Keyspace keyspace_type. */ - public keyspace_type: topodata.KeyspaceType; + /** + * Decodes a RefreshConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RefreshConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): mysqlctl.RefreshConfigRequest; - /** Keyspace base_keyspace. */ - public base_keyspace: string; + /** + * Decodes a RefreshConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RefreshConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): mysqlctl.RefreshConfigRequest; - /** Keyspace snapshot_time. */ - public snapshot_time?: vttime.ITime | null; + /** + * Verifies a RefreshConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a new Keyspace instance using the specified properties. + * Creates a RefreshConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RefreshConfigRequest + */ + public static fromObject(object: { [k: string]: any }): mysqlctl.RefreshConfigRequest; + + /** + * Creates a plain object from a RefreshConfigRequest message. Also converts values to other types if specified. + * @param message RefreshConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: mysqlctl.RefreshConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RefreshConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RefreshConfigResponse. */ + interface IRefreshConfigResponse { + } + + /** Represents a RefreshConfigResponse. */ + class RefreshConfigResponse implements IRefreshConfigResponse { + + /** + * Constructs a new RefreshConfigResponse. * @param [properties] Properties to set - * @returns Keyspace instance */ - public static create(properties?: topodata.IKeyspace): topodata.Keyspace; + constructor(properties?: mysqlctl.IRefreshConfigResponse); /** - * Encodes the specified Keyspace message. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. - * @param message Keyspace message or plain object to encode + * Creates a new RefreshConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RefreshConfigResponse instance + */ + public static create(properties?: mysqlctl.IRefreshConfigResponse): mysqlctl.RefreshConfigResponse; + + /** + * Encodes the specified RefreshConfigResponse message. Does not implicitly {@link mysqlctl.RefreshConfigResponse.verify|verify} messages. + * @param message RefreshConfigResponse 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; + public static encode(message: mysqlctl.IRefreshConfigResponse, 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 + * Encodes the specified RefreshConfigResponse message, length delimited. Does not implicitly {@link mysqlctl.RefreshConfigResponse.verify|verify} messages. + * @param message RefreshConfigResponse 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; + public static encodeDelimited(message: mysqlctl.IRefreshConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Keyspace message from the specified reader or buffer. + * Decodes a RefreshConfigResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Keyspace + * @returns RefreshConfigResponse * @throws {Error} If the payload is 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): mysqlctl.RefreshConfigResponse; /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. + * Decodes a RefreshConfigResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Keyspace + * @returns RefreshConfigResponse * @throws {Error} If the 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)): mysqlctl.RefreshConfigResponse; /** - * Verifies a Keyspace message. + * Verifies a RefreshConfigResponse message. * @param message 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. + * Creates a RefreshConfigResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Keyspace + * @returns RefreshConfigResponse */ - public static fromObject(object: { [k: string]: any }): topodata.Keyspace; + public static fromObject(object: { [k: string]: any }): mysqlctl.RefreshConfigResponse; /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. - * @param message Keyspace + * Creates a plain object from a RefreshConfigResponse message. Also converts values to other types if specified. + * @param message RefreshConfigResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.Keyspace, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: mysqlctl.RefreshConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Keyspace to JSON. + * Converts this RefreshConfigResponse 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; + /** Represents a MysqlCtl */ + class MysqlCtl extends $protobuf.rpc.Service { - /** ServedFrom cells */ - cells?: string[] | null; + /** + * Constructs a new MysqlCtl service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** ServedFrom keyspace */ - keyspace?: string | null; - } + /** + * Creates new MysqlCtl service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @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): MysqlCtl; - /** Represents a ServedFrom. */ - class ServedFrom implements IServedFrom { - /** - * Constructs a new ServedFrom. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.Keyspace.IServedFrom); + /** + * Calls Start. + * @param request StartRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StartResponse + */ + public start(request: mysqlctl.IStartRequest, callback: mysqlctl.MysqlCtl.StartCallback): void; - /** ServedFrom tablet_type. */ - public tablet_type: topodata.TabletType; + /** + * Calls Start. + * @param request StartRequest message or plain object + * @returns Promise + */ + public start(request: mysqlctl.IStartRequest): Promise; - /** ServedFrom cells. */ - public cells: string[]; + /** + * Calls Shutdown. + * @param request ShutdownRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ShutdownResponse + */ + public shutdown(request: mysqlctl.IShutdownRequest, callback: mysqlctl.MysqlCtl.ShutdownCallback): void; - /** ServedFrom keyspace. */ - public keyspace: string; + /** + * Calls Shutdown. + * @param request ShutdownRequest message or plain object + * @returns Promise + */ + public shutdown(request: mysqlctl.IShutdownRequest): Promise; - /** - * 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; + /** + * Calls RunMysqlUpgrade. + * @param request RunMysqlUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunMysqlUpgradeResponse + */ + public runMysqlUpgrade(request: mysqlctl.IRunMysqlUpgradeRequest, callback: mysqlctl.MysqlCtl.RunMysqlUpgradeCallback): void; - /** - * 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; + /** + * Calls RunMysqlUpgrade. + * @param request RunMysqlUpgradeRequest message or plain object + * @returns Promise + */ + public runMysqlUpgrade(request: mysqlctl.IRunMysqlUpgradeRequest): Promise; - /** - * 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; + /** + * Calls ReinitConfig. + * @param request ReinitConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReinitConfigResponse + */ + public reinitConfig(request: mysqlctl.IReinitConfigRequest, callback: mysqlctl.MysqlCtl.ReinitConfigCallback): void; - /** - * 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; + /** + * Calls ReinitConfig. + * @param request ReinitConfigRequest message or plain object + * @returns Promise + */ + public reinitConfig(request: mysqlctl.IReinitConfigRequest): Promise; - /** - * 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; + /** + * Calls RefreshConfig. + * @param request RefreshConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RefreshConfigResponse + */ + public refreshConfig(request: mysqlctl.IRefreshConfigRequest, callback: mysqlctl.MysqlCtl.RefreshConfigCallback): void; - /** - * 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; + /** + * Calls RefreshConfig. + * @param request RefreshConfigRequest message or plain object + * @returns Promise + */ + public refreshConfig(request: mysqlctl.IRefreshConfigRequest): Promise; + } - /** - * 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; + namespace MysqlCtl { - /** - * 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 }; + /** + * Callback as used by {@link mysqlctl.MysqlCtl#start}. + * @param error Error, if any + * @param [response] StartResponse + */ + type StartCallback = (error: (Error|null), response?: mysqlctl.StartResponse) => void; - /** - * Converts this ServedFrom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Callback as used by {@link mysqlctl.MysqlCtl#shutdown}. + * @param error Error, if any + * @param [response] ShutdownResponse + */ + type ShutdownCallback = (error: (Error|null), response?: mysqlctl.ShutdownResponse) => void; + + /** + * Callback as used by {@link mysqlctl.MysqlCtl#runMysqlUpgrade}. + * @param error Error, if any + * @param [response] RunMysqlUpgradeResponse + */ + type RunMysqlUpgradeCallback = (error: (Error|null), response?: mysqlctl.RunMysqlUpgradeResponse) => void; + + /** + * Callback as used by {@link mysqlctl.MysqlCtl#reinitConfig}. + * @param error Error, if any + * @param [response] ReinitConfigResponse + */ + type ReinitConfigCallback = (error: (Error|null), response?: mysqlctl.ReinitConfigResponse) => void; + + /** + * Callback as used by {@link mysqlctl.MysqlCtl#refreshConfig}. + * @param error Error, if any + * @param [response] RefreshConfigResponse + */ + type RefreshConfigCallback = (error: (Error|null), response?: mysqlctl.RefreshConfigResponse) => void; } - /** Properties of a ShardReplication. */ - interface IShardReplication { - /** ShardReplication nodes */ - nodes?: topodata.ShardReplication.INode[] | null; + /** Properties of a BackupInfo. */ + interface IBackupInfo { + + /** BackupInfo name */ + name?: (string|null); + + /** BackupInfo directory */ + directory?: (string|null); } - /** Represents a ShardReplication. */ - class ShardReplication implements IShardReplication { + /** Represents a BackupInfo. */ + class BackupInfo implements IBackupInfo { + /** - * Constructs a new ShardReplication. + * Constructs a new BackupInfo. * @param [properties] Properties to set */ - constructor(properties?: topodata.IShardReplication); + constructor(properties?: mysqlctl.IBackupInfo); - /** ShardReplication nodes. */ - public nodes: topodata.ShardReplication.INode[]; + /** BackupInfo name. */ + public name: string; + + /** BackupInfo directory. */ + public directory: string; /** - * Creates a new ShardReplication instance using the specified properties. + * Creates a new BackupInfo instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReplication instance + * @returns BackupInfo instance */ - public static create(properties?: topodata.IShardReplication): topodata.ShardReplication; + public static create(properties?: mysqlctl.IBackupInfo): mysqlctl.BackupInfo; /** - * Encodes the specified ShardReplication message. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. - * @param message ShardReplication message or plain object to encode + * Encodes the specified BackupInfo message. Does not implicitly {@link mysqlctl.BackupInfo.verify|verify} messages. + * @param message BackupInfo 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; + public static encode(message: mysqlctl.IBackupInfo, 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 + * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link mysqlctl.BackupInfo.verify|verify} messages. + * @param message BackupInfo 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; + public static encodeDelimited(message: mysqlctl.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReplication message from the specified reader or buffer. + * Decodes a BackupInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ShardReplication + * @returns BackupInfo * @throws {Error} If the payload is 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): mysqlctl.BackupInfo; /** - * Decodes a ShardReplication message from the specified reader or buffer, length delimited. + * Decodes a BackupInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReplication + * @returns BackupInfo * @throws {Error} If the 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)): mysqlctl.BackupInfo; /** - * Verifies a ShardReplication message. + * Verifies a BackupInfo message. * @param message 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. + * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReplication + * @returns BackupInfo */ - public static fromObject(object: { [k: string]: any }): topodata.ShardReplication; + public static fromObject(object: { [k: string]: any }): mysqlctl.BackupInfo; /** - * Creates a plain object from a ShardReplication message. Also converts values to other types if specified. - * @param message ShardReplication + * Creates a plain object from a BackupInfo message. Also converts values to other types if specified. + * @param message BackupInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject( - message: topodata.ShardReplication, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: mysqlctl.BackupInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReplication to JSON. + * Converts this BackupInfo 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; - } +/** Namespace vschema. */ +export namespace vschema { - /** Represents a Node. */ - class Node implements INode { - /** - * Constructs a new Node. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.ShardReplication.INode); + /** Properties of a RoutingRules. */ + interface IRoutingRules { - /** Node tablet_alias. */ - public tablet_alias?: topodata.ITabletAlias | null; + /** RoutingRules rules */ + rules?: (vschema.IRoutingRule[]|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; + /** Represents a RoutingRules. */ + class RoutingRules implements IRoutingRules { - /** - * 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; + /** + * Constructs a new RoutingRules. + * @param [properties] Properties to set + */ + constructor(properties?: vschema.IRoutingRules); - /** - * 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; + /** RoutingRules rules. */ + public rules: vschema.IRoutingRule[]; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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 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 }; + /** + * 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; - /** - * Converts this Node to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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 ShardReference. */ - interface IShardReference { - /** ShardReference name */ - name?: string | null; + /** Properties of a RoutingRule. */ + interface IRoutingRule { - /** ShardReference key_range */ - key_range?: topodata.IKeyRange | null; + /** RoutingRule from_table */ + from_table?: (string|null); + + /** RoutingRule to_tables */ + to_tables?: (string[]|null); } - /** Represents a ShardReference. */ - class ShardReference implements IShardReference { + /** Represents a RoutingRule. */ + class RoutingRule implements IRoutingRule { + /** - * Constructs a new ShardReference. + * Constructs a new RoutingRule. * @param [properties] Properties to set */ - constructor(properties?: topodata.IShardReference); + constructor(properties?: vschema.IRoutingRule); - /** ShardReference name. */ - public name: string; + /** RoutingRule from_table. */ + public from_table: string; - /** ShardReference key_range. */ - public key_range?: topodata.IKeyRange | null; + /** RoutingRule to_tables. */ + public to_tables: string[]; /** - * Creates a new ShardReference instance using the specified properties. + * Creates a new RoutingRule instance using the specified properties. * @param [properties] Properties to set - * @returns ShardReference instance + * @returns RoutingRule instance */ - public static create(properties?: topodata.IShardReference): topodata.ShardReference; + public static create(properties?: vschema.IRoutingRule): vschema.RoutingRule; /** - * Encodes the specified ShardReference message. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. - * @param message ShardReference message or plain object to encode + * 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: topodata.IShardReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IRoutingRule, 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 + * 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: topodata.IShardReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IRoutingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardReference message from the specified reader or buffer. + * 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 ShardReference + * @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): topodata.ShardReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.RoutingRule; /** - * Decodes a ShardReference message from the specified reader or buffer, length delimited. + * Decodes a RoutingRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardReference + * @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): topodata.ShardReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.RoutingRule; /** - * Verifies a ShardReference message. + * 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; + 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. + * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardReference + * @returns RoutingRule */ - public static fromObject(object: { [k: string]: any }): topodata.ShardReference; + public static fromObject(object: { [k: string]: any }): vschema.RoutingRule; /** - * Creates a plain object from a ShardReference message. Also converts values to other types if specified. - * @param message ShardReference + * 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: topodata.ShardReference, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vschema.RoutingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardReference to JSON. + * Converts this RoutingRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ShardTabletControl. */ - interface IShardTabletControl { - /** ShardTabletControl name */ - name?: string | null; + /** Properties of a Keyspace. */ + interface IKeyspace { - /** ShardTabletControl key_range */ - key_range?: topodata.IKeyRange | null; + /** Keyspace sharded */ + sharded?: (boolean|null); - /** ShardTabletControl query_service_disabled */ - query_service_disabled?: 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 ShardTabletControl. */ - class ShardTabletControl implements IShardTabletControl { + /** Represents a Keyspace. */ + class Keyspace implements IKeyspace { + /** - * Constructs a new ShardTabletControl. + * Constructs a new Keyspace. * @param [properties] Properties to set */ - constructor(properties?: topodata.IShardTabletControl); + constructor(properties?: vschema.IKeyspace); - /** ShardTabletControl name. */ - public name: string; + /** Keyspace sharded. */ + public sharded: boolean; - /** ShardTabletControl key_range. */ - public key_range?: topodata.IKeyRange | null; + /** Keyspace vindexes. */ + public vindexes: { [k: string]: vschema.IVindex }; - /** ShardTabletControl query_service_disabled. */ - public query_service_disabled: boolean; + /** Keyspace tables. */ + public tables: { [k: string]: vschema.ITable }; + + /** Keyspace require_explicit_routing. */ + public require_explicit_routing: boolean; /** - * Creates a new ShardTabletControl instance using the specified properties. + * Creates a new Keyspace instance using the specified properties. * @param [properties] Properties to set - * @returns ShardTabletControl instance + * @returns Keyspace instance */ - public static create(properties?: topodata.IShardTabletControl): topodata.ShardTabletControl; + public static create(properties?: vschema.IKeyspace): vschema.Keyspace; /** - * Encodes the specified ShardTabletControl message. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. - * @param message ShardTabletControl message or plain object to encode + * 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: topodata.IShardTabletControl, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IKeyspace, 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 + * 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: topodata.IShardTabletControl, - writer?: $protobuf.Writer - ): $protobuf.Writer; + public static encodeDelimited(message: vschema.IKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ShardTabletControl message from the specified reader or buffer. + * 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 ShardTabletControl + * @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.ShardTabletControl; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Keyspace; /** - * Decodes a ShardTabletControl message from the specified reader or buffer, length delimited. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ShardTabletControl + * @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.ShardTabletControl; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Keyspace; /** - * Verifies a ShardTabletControl message. + * 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 ShardTabletControl message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ShardTabletControl + * @returns Keyspace */ - public static fromObject(object: { [k: string]: any }): topodata.ShardTabletControl; + public static fromObject(object: { [k: string]: any }): vschema.Keyspace; /** - * Creates a plain object from a ShardTabletControl message. Also converts values to other types if specified. - * @param message ShardTabletControl + * 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.ShardTabletControl, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vschema.Keyspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ShardTabletControl to JSON. + * Converts this Keyspace to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SrvKeyspace. */ - interface ISrvKeyspace { - /** SrvKeyspace partitions */ - partitions?: topodata.SrvKeyspace.IKeyspacePartition[] | null; + /** Properties of a Vindex. */ + interface IVindex { - /** SrvKeyspace sharding_column_name */ - sharding_column_name?: string | null; + /** Vindex type */ + type?: (string|null); - /** SrvKeyspace sharding_column_type */ - sharding_column_type?: topodata.KeyspaceIdType | null; + /** Vindex params */ + params?: ({ [k: string]: string }|null); - /** SrvKeyspace served_from */ - served_from?: topodata.SrvKeyspace.IServedFrom[] | null; + /** Vindex owner */ + owner?: (string|null); } - /** Represents a SrvKeyspace. */ - class SrvKeyspace implements ISrvKeyspace { + /** Represents a Vindex. */ + class Vindex implements IVindex { + /** - * Constructs a new SrvKeyspace. + * Constructs a new Vindex. * @param [properties] Properties to set */ - constructor(properties?: topodata.ISrvKeyspace); - - /** SrvKeyspace partitions. */ - public partitions: topodata.SrvKeyspace.IKeyspacePartition[]; + constructor(properties?: vschema.IVindex); - /** SrvKeyspace sharding_column_name. */ - public sharding_column_name: string; + /** Vindex type. */ + public type: string; - /** SrvKeyspace sharding_column_type. */ - public sharding_column_type: topodata.KeyspaceIdType; + /** Vindex params. */ + public params: { [k: string]: string }; - /** SrvKeyspace served_from. */ - public served_from: topodata.SrvKeyspace.IServedFrom[]; + /** Vindex owner. */ + public owner: string; /** - * Creates a new SrvKeyspace instance using the specified properties. + * Creates a new Vindex instance using the specified properties. * @param [properties] Properties to set - * @returns SrvKeyspace instance + * @returns Vindex instance */ - public static create(properties?: topodata.ISrvKeyspace): topodata.SrvKeyspace; + public static create(properties?: vschema.IVindex): vschema.Vindex; /** - * Encodes the specified SrvKeyspace message. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. - * @param message SrvKeyspace message or plain object to encode + * 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: topodata.ISrvKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IVindex, 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 + * 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: topodata.ISrvKeyspace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IVindex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SrvKeyspace message from the specified reader or buffer. + * 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 SrvKeyspace + * @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): topodata.SrvKeyspace; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Vindex; /** - * Decodes a SrvKeyspace message from the specified reader or buffer, length delimited. + * Decodes a Vindex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SrvKeyspace + * @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): topodata.SrvKeyspace; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Vindex; /** - * Verifies a SrvKeyspace message. + * 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; + 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. + * Creates a Vindex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SrvKeyspace + * @returns Vindex */ - public static fromObject(object: { [k: string]: any }): topodata.SrvKeyspace; + public static fromObject(object: { [k: string]: any }): vschema.Vindex; /** - * Creates a plain object from a SrvKeyspace message. Also converts values to other types if specified. - * @param message SrvKeyspace + * 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: topodata.SrvKeyspace, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vschema.Vindex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SrvKeyspace to JSON. + * Converts this Vindex 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; + /** Properties of a Table. */ + interface ITable { - /** KeyspacePartition shard_references */ - shard_references?: topodata.IShardReference[] | null; + /** Table type */ + type?: (string|null); - /** KeyspacePartition shard_tablet_controls */ - shard_tablet_controls?: topodata.IShardTabletControl[] | null; - } + /** Table column_vindexes */ + column_vindexes?: (vschema.IColumnVindex[]|null); - /** Represents a KeyspacePartition. */ - class KeyspacePartition implements IKeyspacePartition { - /** - * Constructs a new KeyspacePartition. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.SrvKeyspace.IKeyspacePartition); + /** Table auto_increment */ + auto_increment?: (vschema.IAutoIncrement|null); - /** KeyspacePartition served_type. */ - public served_type: topodata.TabletType; + /** Table columns */ + columns?: (vschema.IColumn[]|null); - /** KeyspacePartition shard_references. */ - public shard_references: topodata.IShardReference[]; + /** Table pinned */ + pinned?: (string|null); - /** KeyspacePartition shard_tablet_controls. */ - public shard_tablet_controls: topodata.IShardTabletControl[]; + /** Table column_list_authoritative */ + column_list_authoritative?: (boolean|null); + } - /** - * 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; + /** Represents a Table. */ + class Table implements ITable { - /** - * 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; + /** + * Constructs a new Table. + * @param [properties] Properties to set + */ + constructor(properties?: vschema.ITable); - /** - * 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; + /** Table type. */ + public type: string; - /** - * 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; + /** 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 }; - /** - * 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; + /** + * Converts this Table to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + /** Properties of a ColumnVindex. */ + interface IColumnVindex { - /** - * 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; + /** ColumnVindex column */ + column?: (string|null); - /** - * 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 }; + /** ColumnVindex name */ + name?: (string|null); - /** - * Converts this KeyspacePartition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ColumnVindex columns */ + columns?: (string[]|null); + } - /** Properties of a ServedFrom. */ - interface IServedFrom { - /** ServedFrom tablet_type */ - tablet_type?: topodata.TabletType | null; + /** Represents a ColumnVindex. */ + class ColumnVindex implements IColumnVindex { - /** ServedFrom keyspace */ - keyspace?: string | null; - } + /** + * Constructs a new ColumnVindex. + * @param [properties] Properties to set + */ + constructor(properties?: vschema.IColumnVindex); - /** Represents a ServedFrom. */ - class ServedFrom implements IServedFrom { - /** - * Constructs a new ServedFrom. - * @param [properties] Properties to set - */ - constructor(properties?: topodata.SrvKeyspace.IServedFrom); + /** ColumnVindex column. */ + public column: string; - /** ServedFrom tablet_type. */ - public tablet_type: topodata.TabletType; + /** ColumnVindex name. */ + public name: string; - /** ServedFrom keyspace. */ - public keyspace: string; + /** ColumnVindex columns. */ + public columns: 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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; + /** + * 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 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 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 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 }; + /** + * 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 ServedFrom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ColumnVindex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a CellInfo. */ - interface ICellInfo { - /** CellInfo server_address */ - server_address?: string | null; + /** Properties of an AutoIncrement. */ + interface IAutoIncrement { - /** CellInfo root */ - root?: string | null; + /** AutoIncrement column */ + column?: (string|null); + + /** AutoIncrement sequence */ + sequence?: (string|null); } - /** Represents a CellInfo. */ - class CellInfo implements ICellInfo { + /** Represents an AutoIncrement. */ + class AutoIncrement implements IAutoIncrement { + /** - * Constructs a new CellInfo. + * Constructs a new AutoIncrement. * @param [properties] Properties to set */ - constructor(properties?: topodata.ICellInfo); + constructor(properties?: vschema.IAutoIncrement); - /** CellInfo server_address. */ - public server_address: string; + /** AutoIncrement column. */ + public column: string; - /** CellInfo root. */ - public root: string; + /** AutoIncrement sequence. */ + public sequence: string; /** - * Creates a new CellInfo instance using the specified properties. + * Creates a new AutoIncrement instance using the specified properties. * @param [properties] Properties to set - * @returns CellInfo instance + * @returns AutoIncrement instance */ - public static create(properties?: topodata.ICellInfo): topodata.CellInfo; + public static create(properties?: vschema.IAutoIncrement): vschema.AutoIncrement; /** - * Encodes the specified CellInfo message. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. - * @param message CellInfo message or plain object to encode + * 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: topodata.ICellInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IAutoIncrement, 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 + * 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: topodata.ICellInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IAutoIncrement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CellInfo message from the specified reader or buffer. + * 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 CellInfo + * @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): topodata.CellInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.AutoIncrement; /** - * Decodes a CellInfo message from the specified reader or buffer, length delimited. + * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CellInfo + * @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): topodata.CellInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.AutoIncrement; /** - * Verifies a CellInfo message. + * 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; + 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. + * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CellInfo + * @returns AutoIncrement */ - public static fromObject(object: { [k: string]: any }): topodata.CellInfo; + public static fromObject(object: { [k: string]: any }): vschema.AutoIncrement; /** - * Creates a plain object from a CellInfo message. Also converts values to other types if specified. - * @param message CellInfo + * 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: topodata.CellInfo, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vschema.AutoIncrement, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CellInfo to JSON. + * Converts this AutoIncrement to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CellsAlias. */ - interface ICellsAlias { - /** CellsAlias cells */ - cells?: string[] | null; + /** Properties of a Column. */ + interface IColumn { + + /** Column name */ + name?: (string|null); + + /** Column type */ + type?: (query.Type|null); } - /** Represents a CellsAlias. */ - class CellsAlias implements ICellsAlias { + /** Represents a Column. */ + class Column implements IColumn { + /** - * Constructs a new CellsAlias. + * Constructs a new Column. * @param [properties] Properties to set */ - constructor(properties?: topodata.ICellsAlias); + constructor(properties?: vschema.IColumn); - /** CellsAlias cells. */ - public cells: string[]; + /** Column name. */ + public name: string; + + /** Column type. */ + public type: query.Type; /** - * Creates a new CellsAlias instance using the specified properties. + * Creates a new Column instance using the specified properties. * @param [properties] Properties to set - * @returns CellsAlias instance + * @returns Column instance */ - public static create(properties?: topodata.ICellsAlias): topodata.CellsAlias; + public static create(properties?: vschema.IColumn): vschema.Column; /** - * Encodes the specified CellsAlias message. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. - * @param message CellsAlias message or plain object to encode + * 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: topodata.ICellsAlias, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.IColumn, 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 + * 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: topodata.ICellsAlias, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.IColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CellsAlias message from the specified reader or buffer. + * 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 CellsAlias + * @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): topodata.CellsAlias; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.Column; /** - * Decodes a CellsAlias message from the specified reader or buffer, length delimited. + * Decodes a Column message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CellsAlias + * @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): topodata.CellsAlias; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.Column; /** - * Verifies a CellsAlias message. + * 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; + 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. + * Creates a Column message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CellsAlias + * @returns Column */ - public static fromObject(object: { [k: string]: any }): topodata.CellsAlias; + public static fromObject(object: { [k: string]: any }): vschema.Column; /** - * Creates a plain object from a CellsAlias message. Also converts values to other types if specified. - * @param message CellsAlias + * 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: topodata.CellsAlias, - options?: $protobuf.IConversionOptions - ): { [k: string]: any }; + public static toObject(message: vschema.Column, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CellsAlias to JSON. + * Converts this Column 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; + /** Properties of a SrvVSchema. */ + interface ISrvVSchema { - /** Time nanoseconds */ - nanoseconds?: number | null; + /** SrvVSchema keyspaces */ + keyspaces?: ({ [k: string]: vschema.IKeyspace }|null); + + /** SrvVSchema routing_rules */ + routing_rules?: (vschema.IRoutingRules|null); } - /** Represents a Time. */ - class Time implements ITime { + /** Represents a SrvVSchema. */ + class SrvVSchema implements ISrvVSchema { + /** - * Constructs a new Time. + * Constructs a new SrvVSchema. * @param [properties] Properties to set */ - constructor(properties?: vttime.ITime); + constructor(properties?: vschema.ISrvVSchema); - /** Time seconds. */ - public seconds: number | Long; + /** SrvVSchema keyspaces. */ + public keyspaces: { [k: string]: vschema.IKeyspace }; - /** Time nanoseconds. */ - public nanoseconds: number; + /** SrvVSchema routing_rules. */ + public routing_rules?: (vschema.IRoutingRules|null); /** - * Creates a new Time instance using the specified properties. + * Creates a new SrvVSchema instance using the specified properties. * @param [properties] Properties to set - * @returns Time instance + * @returns SrvVSchema instance */ - public static create(properties?: vttime.ITime): vttime.Time; + public static create(properties?: vschema.ISrvVSchema): vschema.SrvVSchema; /** - * Encodes the specified Time message. Does not implicitly {@link vttime.Time.verify|verify} messages. - * @param message Time message or plain object to encode + * 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: vttime.ITime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: vschema.ISrvVSchema, 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 + * 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: vttime.ITime, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: vschema.ISrvVSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Time message from the specified reader or buffer. + * 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 Time + * @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): vttime.Time; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): vschema.SrvVSchema; /** - * Decodes a Time message from the specified reader or buffer, length delimited. + * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Time + * @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): vttime.Time; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): vschema.SrvVSchema; /** - * Verifies a Time message. + * 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; + 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. + * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Time + * @returns SrvVSchema */ - public static fromObject(object: { [k: string]: any }): vttime.Time; + public static fromObject(object: { [k: string]: any }): vschema.SrvVSchema; /** - * Creates a plain object from a Time message. Also converts values to other types if specified. - * @param message Time + * 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: vttime.Time, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: vschema.SrvVSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Time to JSON. + * Converts this SrvVSchema 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 99c723939f1..bd090ff0d50 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 @@ -50,6 +50,39 @@ $root.vtadmin = (function () { return new this(rpcImpl, requestDelimited, responseDelimited); }; + /** + * Callback as used by {@link vtadmin.VTAdmin#getClusters}. + * @memberof vtadmin.VTAdmin + * @typedef GetClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {vtadmin.GetClustersResponse} [response] GetClustersResponse + */ + + /** + * Calls GetClusters. + * @function getClusters + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetClustersRequest} request GetClustersRequest message or plain object + * @param {vtadmin.VTAdmin.GetClustersCallback} callback Node-style callback called with the error, if any, and GetClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VTAdmin.prototype.getClusters = function getClusters(request, callback) { + return this.rpcCall(getClusters, $root.vtadmin.GetClustersRequest, $root.vtadmin.GetClustersResponse, request, callback); + }, "name", { value: "GetClusters" }); + + /** + * Calls GetClusters. + * @function getClusters + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetClustersRequest} request GetClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link vtadmin.VTAdmin#getGates}. * @memberof vtadmin.VTAdmin @@ -69,19 +102,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. @@ -93,6 +116,72 @@ $root.vtadmin = (function () { * @variation 2 */ + /** + * Callback as used by {@link vtadmin.VTAdmin#getKeyspaces}. + * @memberof vtadmin.VTAdmin + * @typedef GetKeyspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {vtadmin.GetKeyspacesResponse} [response] GetKeyspacesResponse + */ + + /** + * Calls GetKeyspaces. + * @function getKeyspaces + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetKeyspacesRequest} request GetKeyspacesRequest message or plain object + * @param {vtadmin.VTAdmin.GetKeyspacesCallback} callback Node-style callback called with the error, if any, and GetKeyspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VTAdmin.prototype.getKeyspaces = function getKeyspaces(request, callback) { + return this.rpcCall(getKeyspaces, $root.vtadmin.GetKeyspacesRequest, $root.vtadmin.GetKeyspacesResponse, request, callback); + }, "name", { value: "GetKeyspaces" }); + + /** + * Calls GetKeyspaces. + * @function getKeyspaces + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetKeyspacesRequest} request GetKeyspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link vtadmin.VTAdmin#getSchemas}. + * @memberof vtadmin.VTAdmin + * @typedef GetSchemasCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {vtadmin.GetSchemasResponse} [response] GetSchemasResponse + */ + + /** + * Calls GetSchemas. + * @function getSchemas + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetSchemasRequest} request GetSchemasRequest message or plain object + * @param {vtadmin.VTAdmin.GetSchemasCallback} callback Node-style callback called with the error, if any, and GetSchemasResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VTAdmin.prototype.getSchemas = function getSchemas(request, callback) { + return this.rpcCall(getSchemas, $root.vtadmin.GetSchemasRequest, $root.vtadmin.GetSchemasResponse, request, callback); + }, "name", { value: "GetSchemas" }); + + /** + * Calls GetSchemas. + * @function getSchemas + * @memberof vtadmin.VTAdmin + * @instance + * @param {vtadmin.IGetSchemasRequest} request GetSchemasRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link vtadmin.VTAdmin#getTablet}. * @memberof vtadmin.VTAdmin @@ -112,13 +201,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 +234,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 +251,8 @@ $root.vtadmin = (function () { return VTAdmin; })(); - vtadmin.Cluster = (function () { + vtadmin.Cluster = (function() { + /** * Properties of a Cluster. * @memberof vtadmin @@ -196,7 +272,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 +282,7 @@ $root.vtadmin = (function () { * @memberof vtadmin.Cluster * @instance */ - Cluster.prototype.id = ''; + Cluster.prototype.id = ""; /** * Cluster name. @@ -213,7 +290,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 +314,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 +348,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 +379,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 +393,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 +413,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 +433,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,6874 +461,57860 @@ $root.vtadmin = (function () { return Cluster; })(); - vtadmin.Tablet = (function () { + vtadmin.Keyspace = (function() { + /** - * Properties of a Tablet. + * Properties of a Keyspace. * @memberof vtadmin - * @interface ITablet - * @property {vtadmin.ICluster|null} [cluster] Tablet cluster - * @property {topodata.ITablet|null} [tablet] Tablet tablet - * @property {vtadmin.Tablet.ServingState|null} [state] Tablet state + * @interface IKeyspace + * @property {vtadmin.ICluster|null} [cluster] Keyspace cluster + * @property {vtctldata.IKeyspace|null} [keyspace] Keyspace keyspace */ /** - * Constructs a new Tablet. + * Constructs a new Keyspace. * @memberof vtadmin - * @classdesc Represents a Tablet. - * @implements ITablet + * @classdesc Represents a Keyspace. + * @implements IKeyspace * @constructor - * @param {vtadmin.ITablet=} [properties] Properties to set + * @param {vtadmin.IKeyspace=} [properties] Properties to set */ - function Tablet(properties) { + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * Tablet cluster. + * Keyspace cluster. * @member {vtadmin.ICluster|null|undefined} cluster - * @memberof vtadmin.Tablet - * @instance - */ - Tablet.prototype.cluster = null; - - /** - * Tablet tablet. - * @member {topodata.ITablet|null|undefined} tablet - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @instance */ - Tablet.prototype.tablet = null; + Keyspace.prototype.cluster = null; /** - * Tablet state. - * @member {vtadmin.Tablet.ServingState} state - * @memberof vtadmin.Tablet + * Keyspace keyspace. + * @member {vtctldata.IKeyspace|null|undefined} keyspace + * @memberof vtadmin.Keyspace * @instance */ - Tablet.prototype.state = 0; + Keyspace.prototype.keyspace = null; /** - * Creates a new Tablet instance using the specified properties. + * Creates a new Keyspace instance using the specified properties. * @function create - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static - * @param {vtadmin.ITablet=} [properties] Properties to set - * @returns {vtadmin.Tablet} Tablet instance + * @param {vtadmin.IKeyspace=} [properties] Properties to set + * @returns {vtadmin.Keyspace} Keyspace instance */ - Tablet.create = function create(properties) { - return new Tablet(properties); + Keyspace.create = function create(properties) { + return new Keyspace(properties); }; /** - * Encodes the specified Tablet message. Does not implicitly {@link vtadmin.Tablet.verify|verify} messages. + * Encodes the specified Keyspace message. Does not implicitly {@link vtadmin.Keyspace.verify|verify} messages. * @function encode - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static - * @param {vtadmin.ITablet} message Tablet message or plain object to encode + * @param {vtadmin.IKeyspace} message Keyspace 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.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); + Keyspace.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.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + $root.vtctldata.Keyspace.encode(message.keyspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Tablet message, length delimited. Does not implicitly {@link vtadmin.Tablet.verify|verify} messages. + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vtadmin.Keyspace.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static - * @param {vtadmin.ITablet} message Tablet message or plain object to encode + * @param {vtadmin.IKeyspace} message Keyspace message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tablet.encodeDelimited = function encodeDelimited(message, writer) { + Keyspace.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Tablet message from the specified reader or buffer. + * Decodes a Keyspace message from the specified reader or buffer. * @function decode - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.Tablet} Tablet + * @returns {vtadmin.Keyspace} Keyspace * @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.vtadmin.Tablet(); + 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.vtadmin.Keyspace(); 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.keyspace = $root.vtctldata.Keyspace.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. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.Tablet} Tablet + * @returns {vtadmin.Keyspace} Keyspace * @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); + Keyspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Tablet message. + * Verifies a Keyspace message. * @function verify - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @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.cluster != null && message.hasOwnProperty('cluster')) { + Keyspace.verify = function verify(message) { + 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')) { - var error = $root.topodata.Tablet.verify(message.tablet); - if (error) return 'tablet.' + error; + if (message.keyspace != null && message.hasOwnProperty("keyspace")) { + var error = $root.vtctldata.Keyspace.verify(message.keyspace); + if (error) + return "keyspace." + error; } - if (message.state != null && message.hasOwnProperty('state')) - switch (message.state) { - default: - return 'state: enum value expected'; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a Tablet message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static * @param {Object.} object Plain object - * @returns {vtadmin.Tablet} Tablet + * @returns {vtadmin.Keyspace} Keyspace */ - Tablet.fromObject = function fromObject(object) { - if (object instanceof $root.vtadmin.Tablet) return object; - var message = new $root.vtadmin.Tablet(); + Keyspace.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.Keyspace) + return object; + var message = new $root.vtadmin.Keyspace(); if (object.cluster != null) { - if (typeof object.cluster !== 'object') throw TypeError('.vtadmin.Tablet.cluster: object expected'); + if (typeof object.cluster !== "object") + throw TypeError(".vtadmin.Keyspace.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'); - 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; + if (object.keyspace != null) { + if (typeof object.keyspace !== "object") + throw TypeError(".vtadmin.Keyspace.keyspace: object expected"); + message.keyspace = $root.vtctldata.Keyspace.fromObject(object.keyspace); } return message; }; /** - * Creates a plain object from a Tablet message. Also converts values to other types if specified. + * Creates a plain object from a Keyspace message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @static - * @param {vtadmin.Tablet} message Tablet + * @param {vtadmin.Keyspace} message Keyspace * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Tablet.toObject = function toObject(message, options) { - if (!options) options = {}; + Keyspace.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; if (options.defaults) { object.cluster = null; - object.tablet = null; - object.state = options.enums === String ? 'UNKNOWN' : 0; + object.keyspace = null; } - 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')) - 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.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = $root.vtctldata.Keyspace.toObject(message.keyspace, options); return object; }; /** - * Converts this Tablet to JSON. + * Converts this Keyspace to JSON. * @function toJSON - * @memberof vtadmin.Tablet + * @memberof vtadmin.Keyspace * @instance * @returns {Object.} JSON object */ - Tablet.prototype.toJSON = function toJSON() { + Keyspace.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * ServingState enum. - * @name vtadmin.Tablet.ServingState - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @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; - return values; - })(); - - return Tablet; + return Keyspace; })(); - vtadmin.VTGate = (function () { + vtadmin.Schema = (function() { + /** - * Properties of a VTGate. + * Properties of a Schema. * @memberof vtadmin - * @interface IVTGate - * @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 {Array.|null} [keyspaces] VTGate keyspaces + * @interface ISchema + * @property {vtadmin.ICluster|null} [cluster] Schema cluster + * @property {string|null} [keyspace] Schema keyspace + * @property {Array.|null} [table_definitions] Schema table_definitions */ /** - * Constructs a new VTGate. + * Constructs a new Schema. * @memberof vtadmin - * @classdesc Represents a VTGate. - * @implements IVTGate + * @classdesc Represents a Schema. + * @implements ISchema * @constructor - * @param {vtadmin.IVTGate=} [properties] Properties to set + * @param {vtadmin.ISchema=} [properties] Properties to set */ - function VTGate(properties) { - this.keyspaces = []; + function Schema(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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * VTGate hostname. - * @member {string} hostname - * @memberof vtadmin.VTGate - * @instance - */ - VTGate.prototype.hostname = ''; - - /** - * VTGate pool. - * @member {string} pool - * @memberof vtadmin.VTGate - * @instance - */ - VTGate.prototype.pool = ''; - - /** - * VTGate cell. - * @member {string} cell - * @memberof vtadmin.VTGate + * Schema cluster. + * @member {vtadmin.ICluster|null|undefined} cluster + * @memberof vtadmin.Schema * @instance */ - VTGate.prototype.cell = ''; + Schema.prototype.cluster = null; /** - * VTGate cluster. - * @member {string} cluster - * @memberof vtadmin.VTGate + * Schema keyspace. + * @member {string} keyspace + * @memberof vtadmin.Schema * @instance */ - VTGate.prototype.cluster = ''; + Schema.prototype.keyspace = ""; /** - * VTGate keyspaces. - * @member {Array.} keyspaces - * @memberof vtadmin.VTGate + * Schema table_definitions. + * @member {Array.} table_definitions + * @memberof vtadmin.Schema * @instance */ - VTGate.prototype.keyspaces = $util.emptyArray; + Schema.prototype.table_definitions = $util.emptyArray; /** - * Creates a new VTGate instance using the specified properties. + * Creates a new Schema instance using the specified properties. * @function create - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static - * @param {vtadmin.IVTGate=} [properties] Properties to set - * @returns {vtadmin.VTGate} VTGate instance + * @param {vtadmin.ISchema=} [properties] Properties to set + * @returns {vtadmin.Schema} Schema instance */ - VTGate.create = function create(properties) { - return new VTGate(properties); + Schema.create = function create(properties) { + return new Schema(properties); }; /** - * Encodes the specified VTGate message. Does not implicitly {@link vtadmin.VTGate.verify|verify} messages. + * Encodes the specified Schema message. Does not implicitly {@link vtadmin.Schema.verify|verify} messages. * @function encode - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static - * @param {vtadmin.IVTGate} message VTGate message or plain object to encode + * @param {vtadmin.ISchema} message Schema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @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 (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]); + Schema.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.keyspace != null && Object.hasOwnProperty.call(message, "keyspace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyspace); + 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 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified VTGate message, length delimited. Does not implicitly {@link vtadmin.VTGate.verify|verify} messages. + * Encodes the specified Schema message, length delimited. Does not implicitly {@link vtadmin.Schema.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static - * @param {vtadmin.IVTGate} message VTGate message or plain object to encode + * @param {vtadmin.ISchema} message Schema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VTGate.encodeDelimited = function encodeDelimited(message, writer) { + Schema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VTGate message from the specified reader or buffer. + * Decodes a Schema message from the specified reader or buffer. * @function decode - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.VTGate} VTGate + * @returns {vtadmin.Schema} Schema * @throws {Error} If the payload is not a reader or valid buffer * @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(); + Schema.decode = 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.Schema(); 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.cluster = $root.vtadmin.Cluster.decode(reader, reader.uint32()); + break; + case 2: + message.keyspace = reader.string(); + break; + case 3: + if (!(message.table_definitions && message.table_definitions.length)) + message.table_definitions = []; + message.table_definitions.push($root.tabletmanagerdata.TableDefinition.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a VTGate message from the specified reader or buffer, length delimited. + * Decodes a Schema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.VTGate} VTGate + * @returns {vtadmin.Schema} Schema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VTGate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VTGate message. + * Verifies a Schema message. * @function verify - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static * @param {Object.} message Plain object to verify * @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'; - for (var i = 0; i < message.keyspaces.length; ++i) - if (!$util.isString(message.keyspaces[i])) return 'keyspaces: string[] expected'; + Schema.verify = function verify(message) { + 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 (message.keyspace != null && message.hasOwnProperty("keyspace")) + if (!$util.isString(message.keyspace)) + return "keyspace: 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; + } } return null; }; /** - * Creates a VTGate message from a plain object. Also converts values to their respective internal types. + * Creates a Schema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static * @param {Object.} object Plain object - * @returns {vtadmin.VTGate} VTGate + * @returns {vtadmin.Schema} Schema */ - VTGate.fromObject = function fromObject(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.keyspaces) { - 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]); + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.Schema) + return object; + var message = new $root.vtadmin.Schema(); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".vtadmin.Schema.cluster: object expected"); + message.cluster = $root.vtadmin.Cluster.fromObject(object.cluster); + } + if (object.keyspace != null) + message.keyspace = String(object.keyspace); + if (object.table_definitions) { + if (!Array.isArray(object.table_definitions)) + throw TypeError(".vtadmin.Schema.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(".vtadmin.Schema.table_definitions: object expected"); + message.table_definitions[i] = $root.tabletmanagerdata.TableDefinition.fromObject(object.table_definitions[i]); + } } return message; }; /** - * Creates a plain object from a VTGate message. Also converts values to other types if specified. + * Creates a plain object from a Schema message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @static - * @param {vtadmin.VTGate} message VTGate + * @param {vtadmin.Schema} message Schema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VTGate.toObject = function toObject(message, options) { - if (!options) options = {}; + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.keyspaces = []; + if (options.arrays || options.defaults) + object.table_definitions = []; if (options.defaults) { - object.hostname = ''; - object.pool = ''; - object.cell = ''; - object.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 = message.cluster; - if (message.keyspaces && message.keyspaces.length) { - object.keyspaces = []; - for (var j = 0; j < message.keyspaces.length; ++j) object.keyspaces[j] = message.keyspaces[j]; + object.cluster = null; + object.keyspace = ""; + } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.vtadmin.Cluster.toObject(message.cluster, options); + if (message.keyspace != null && message.hasOwnProperty("keyspace")) + object.keyspace = message.keyspace; + 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); } return object; }; /** - * Converts this VTGate to JSON. + * Converts this Schema to JSON. * @function toJSON - * @memberof vtadmin.VTGate + * @memberof vtadmin.Schema * @instance * @returns {Object.} JSON object */ - VTGate.prototype.toJSON = function toJSON() { + Schema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VTGate; + return Schema; })(); - vtadmin.GetGatesRequest = (function () { + vtadmin.Tablet = (function() { + /** - * Properties of a GetGatesRequest. + * Properties of a Tablet. * @memberof vtadmin - * @interface IGetGatesRequest - * @property {Array.|null} [cluster_ids] GetGatesRequest cluster_ids + * @interface ITablet + * @property {vtadmin.ICluster|null} [cluster] Tablet cluster + * @property {topodata.ITablet|null} [tablet] Tablet tablet + * @property {vtadmin.Tablet.ServingState|null} [state] Tablet state */ /** - * Constructs a new GetGatesRequest. + * Constructs a new Tablet. * @memberof vtadmin - * @classdesc Represents a GetGatesRequest. - * @implements IGetGatesRequest + * @classdesc Represents a Tablet. + * @implements ITablet * @constructor - * @param {vtadmin.IGetGatesRequest=} [properties] Properties to set + * @param {vtadmin.ITablet=} [properties] Properties to set */ - function GetGatesRequest(properties) { - this.cluster_ids = []; + 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]]; } /** - * GetGatesRequest cluster_ids. - * @member {Array.} cluster_ids - * @memberof vtadmin.GetGatesRequest + * Tablet cluster. + * @member {vtadmin.ICluster|null|undefined} cluster + * @memberof vtadmin.Tablet * @instance */ - GetGatesRequest.prototype.cluster_ids = $util.emptyArray; + Tablet.prototype.cluster = null; /** - * Creates a new GetGatesRequest instance using the specified properties. + * Tablet tablet. + * @member {topodata.ITablet|null|undefined} tablet + * @memberof vtadmin.Tablet + * @instance + */ + Tablet.prototype.tablet = null; + + /** + * Tablet state. + * @member {vtadmin.Tablet.ServingState} state + * @memberof vtadmin.Tablet + * @instance + */ + Tablet.prototype.state = 0; + + /** + * Creates a new Tablet instance using the specified properties. * @function create - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static - * @param {vtadmin.IGetGatesRequest=} [properties] Properties to set - * @returns {vtadmin.GetGatesRequest} GetGatesRequest instance + * @param {vtadmin.ITablet=} [properties] Properties to set + * @returns {vtadmin.Tablet} Tablet instance */ - GetGatesRequest.create = function create(properties) { - return new GetGatesRequest(properties); + Tablet.create = function create(properties) { + return new Tablet(properties); }; /** - * Encodes the specified GetGatesRequest message. Does not implicitly {@link vtadmin.GetGatesRequest.verify|verify} messages. + * Encodes the specified Tablet message. Does not implicitly {@link vtadmin.Tablet.verify|verify} messages. * @function encode - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static - * @param {vtadmin.IGetGatesRequest} message GetGatesRequest message or plain object to encode + * @param {vtadmin.ITablet} message Tablet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGatesRequest.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]); + 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); return writer; }; /** - * Encodes the specified GetGatesRequest message, length delimited. Does not implicitly {@link vtadmin.GetGatesRequest.verify|verify} messages. + * Encodes the specified Tablet message, length delimited. Does not implicitly {@link vtadmin.Tablet.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static - * @param {vtadmin.IGetGatesRequest} message GetGatesRequest message or plain object to encode + * @param {vtadmin.ITablet} message Tablet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Tablet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetGatesRequest message from the specified reader or buffer. + * Decodes a Tablet message from the specified reader or buffer. * @function decode - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetGatesRequest} GetGatesRequest + * @returns {vtadmin.Tablet} Tablet * @throws {Error} If the payload is not a reader or valid buffer * @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(); + 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(); 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: + 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; }; /** - * Decodes a GetGatesRequest message from the specified reader or buffer, length delimited. + * Decodes a Tablet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetGatesRequest} GetGatesRequest + * @returns {vtadmin.Tablet} Tablet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Tablet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetGatesRequest message. + * Verifies a Tablet message. * @function verify - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static * @param {Object.} message Plain object to verify * @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'; - for (var i = 0; i < message.cluster_ids.length; ++i) - if (!$util.isString(message.cluster_ids[i])) return 'cluster_ids: string[] expected'; + Tablet.verify = function verify(message) { + 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 (message.tablet != null && message.hasOwnProperty("tablet")) { + var error = $root.topodata.Tablet.verify(message.tablet); + if (error) + return "tablet." + error; } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a GetGatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Tablet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static * @param {Object.} object Plain object - * @returns {vtadmin.GetGatesRequest} GetGatesRequest + * @returns {vtadmin.Tablet} Tablet */ - GetGatesRequest.fromObject = function fromObject(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'); - message.cluster_ids = []; - for (var i = 0; i < object.cluster_ids.length; ++i) - message.cluster_ids[i] = String(object.cluster_ids[i]); + Tablet.fromObject = function fromObject(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"); + message.cluster = $root.vtadmin.Cluster.fromObject(object.cluster); + } + if (object.tablet != null) { + 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; } return message; }; /** - * Creates a plain object from a GetGatesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Tablet message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @static - * @param {vtadmin.GetGatesRequest} message GetGatesRequest + * @param {vtadmin.Tablet} message Tablet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetGatesRequest.toObject = function toObject(message, options) { - if (!options) options = {}; + Tablet.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]; + if (options.defaults) { + object.cluster = null; + object.tablet = null; + object.state = options.enums === String ? "UNKNOWN" : 0; } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.vtadmin.Cluster.toObject(message.cluster, options); + 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; return object; }; /** - * Converts this GetGatesRequest to JSON. + * Converts this Tablet to JSON. * @function toJSON - * @memberof vtadmin.GetGatesRequest + * @memberof vtadmin.Tablet * @instance * @returns {Object.} JSON object */ - GetGatesRequest.prototype.toJSON = function toJSON() { + Tablet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetGatesRequest; + /** + * ServingState enum. + * @name vtadmin.Tablet.ServingState + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @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; + return values; + })(); + + return Tablet; })(); - vtadmin.GetGatesResponse = (function () { + vtadmin.Vtctld = (function() { + /** - * Properties of a GetGatesResponse. + * Properties of a Vtctld. * @memberof vtadmin - * @interface IGetGatesResponse - * @property {Array.|null} [gates] GetGatesResponse gates + * @interface IVtctld + * @property {string|null} [hostname] Vtctld hostname + * @property {vtadmin.ICluster|null} [cluster] Vtctld cluster */ /** - * Constructs a new GetGatesResponse. + * Constructs a new Vtctld. * @memberof vtadmin - * @classdesc Represents a GetGatesResponse. - * @implements IGetGatesResponse + * @classdesc Represents a Vtctld. + * @implements IVtctld * @constructor - * @param {vtadmin.IGetGatesResponse=} [properties] Properties to set + * @param {vtadmin.IVtctld=} [properties] Properties to set */ - function GetGatesResponse(properties) { - this.gates = []; + function Vtctld(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]]; } /** - * GetGatesResponse gates. - * @member {Array.} gates - * @memberof vtadmin.GetGatesResponse + * Vtctld hostname. + * @member {string} hostname + * @memberof vtadmin.Vtctld * @instance */ - GetGatesResponse.prototype.gates = $util.emptyArray; + Vtctld.prototype.hostname = ""; /** - * Creates a new GetGatesResponse instance using the specified properties. + * Vtctld cluster. + * @member {vtadmin.ICluster|null|undefined} cluster + * @memberof vtadmin.Vtctld + * @instance + */ + Vtctld.prototype.cluster = null; + + /** + * Creates a new Vtctld instance using the specified properties. * @function create - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static - * @param {vtadmin.IGetGatesResponse=} [properties] Properties to set - * @returns {vtadmin.GetGatesResponse} GetGatesResponse instance + * @param {vtadmin.IVtctld=} [properties] Properties to set + * @returns {vtadmin.Vtctld} Vtctld instance */ - GetGatesResponse.create = function create(properties) { - return new GetGatesResponse(properties); + Vtctld.create = function create(properties) { + return new Vtctld(properties); }; /** - * Encodes the specified GetGatesResponse message. Does not implicitly {@link vtadmin.GetGatesResponse.verify|verify} messages. + * Encodes the specified Vtctld message. Does not implicitly {@link vtadmin.Vtctld.verify|verify} messages. * @function encode - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static - * @param {vtadmin.IGetGatesResponse} message GetGatesResponse message or plain object to encode + * @param {vtadmin.IVtctld} message Vtctld message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGatesResponse.encode = function encode(message, writer) { - 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(); + Vtctld.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 != null && Object.hasOwnProperty.call(message, "cluster")) + $root.vtadmin.Cluster.encode(message.cluster, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetGatesResponse message, length delimited. Does not implicitly {@link vtadmin.GetGatesResponse.verify|verify} messages. + * Encodes the specified Vtctld message, length delimited. Does not implicitly {@link vtadmin.Vtctld.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static - * @param {vtadmin.IGetGatesResponse} message GetGatesResponse message or plain object to encode + * @param {vtadmin.IVtctld} message Vtctld message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + Vtctld.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetGatesResponse message from the specified reader or buffer. + * Decodes a Vtctld message from the specified reader or buffer. * @function decode - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetGatesResponse} GetGatesResponse + * @returns {vtadmin.Vtctld} Vtctld * @throws {Error} If the payload is not a reader or valid buffer * @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(); + Vtctld.decode = 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.Vtctld(); 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: + message.hostname = reader.string(); + break; + case 2: + message.cluster = $root.vtadmin.Cluster.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a GetGatesResponse message from the specified reader or buffer, length delimited. + * Decodes a Vtctld message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetGatesResponse} GetGatesResponse + * @returns {vtadmin.Vtctld} Vtctld * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Vtctld.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetGatesResponse message. + * Verifies a Vtctld message. * @function verify - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static * @param {Object.} message Plain object to verify * @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'; - for (var i = 0; i < message.gates.length; ++i) { - var error = $root.vtadmin.VTGate.verify(message.gates[i]); - if (error) return 'gates.' + error; - } + Vtctld.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 != null && message.hasOwnProperty("cluster")) { + var error = $root.vtadmin.Cluster.verify(message.cluster); + if (error) + return "cluster." + error; } return null; }; /** - * Creates a GetGatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Vtctld message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static * @param {Object.} object Plain object - * @returns {vtadmin.GetGatesResponse} GetGatesResponse + * @returns {vtadmin.Vtctld} Vtctld */ - GetGatesResponse.fromObject = function fromObject(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'); - message.gates = []; - for (var i = 0; i < object.gates.length; ++i) { - if (typeof object.gates[i] !== 'object') - throw TypeError('.vtadmin.GetGatesResponse.gates: object expected'); - message.gates[i] = $root.vtadmin.VTGate.fromObject(object.gates[i]); - } + Vtctld.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.Vtctld) + return object; + var message = new $root.vtadmin.Vtctld(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".vtadmin.Vtctld.cluster: object expected"); + message.cluster = $root.vtadmin.Cluster.fromObject(object.cluster); } return message; }; /** - * Creates a plain object from a GetGatesResponse message. Also converts values to other types if specified. + * Creates a plain object from a Vtctld message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @static - * @param {vtadmin.GetGatesResponse} message GetGatesResponse + * @param {vtadmin.Vtctld} message Vtctld * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetGatesResponse.toObject = function toObject(message, options) { - if (!options) options = {}; + Vtctld.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) object.gates = []; - if (message.gates && message.gates.length) { - object.gates = []; - for (var j = 0; j < message.gates.length; ++j) - object.gates[j] = $root.vtadmin.VTGate.toObject(message.gates[j], options); + if (options.defaults) { + object.hostname = ""; + object.cluster = null; } + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.vtadmin.Cluster.toObject(message.cluster, options); return object; }; /** - * Converts this GetGatesResponse to JSON. + * Converts this Vtctld to JSON. * @function toJSON - * @memberof vtadmin.GetGatesResponse + * @memberof vtadmin.Vtctld * @instance * @returns {Object.} JSON object */ - GetGatesResponse.prototype.toJSON = function toJSON() { + Vtctld.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetGatesResponse; + return Vtctld; })(); - vtadmin.GetTabletRequest = (function () { + vtadmin.VTGate = (function() { + /** - * Properties of a GetTabletRequest. + * Properties of a VTGate. * @memberof vtadmin - * @interface IGetTabletRequest - * @property {string|null} [hostname] GetTabletRequest hostname - * @property {Array.|null} [cluster_ids] GetTabletRequest cluster_ids + * @interface IVTGate + * @property {string|null} [hostname] VTGate hostname + * @property {string|null} [pool] VTGate pool + * @property {string|null} [cell] VTGate cell + * @property {vtadmin.ICluster|null} [cluster] VTGate cluster + * @property {Array.|null} [keyspaces] VTGate keyspaces */ /** - * Constructs a new GetTabletRequest. + * Constructs a new VTGate. * @memberof vtadmin - * @classdesc Represents a GetTabletRequest. - * @implements IGetTabletRequest + * @classdesc Represents a VTGate. + * @implements IVTGate * @constructor - * @param {vtadmin.IGetTabletRequest=} [properties] Properties to set + * @param {vtadmin.IVTGate=} [properties] Properties to set */ - function GetTabletRequest(properties) { - this.cluster_ids = []; + function VTGate(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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * GetTabletRequest hostname. + * VTGate hostname. * @member {string} hostname - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @instance */ - GetTabletRequest.prototype.hostname = ''; + VTGate.prototype.hostname = ""; /** - * GetTabletRequest cluster_ids. - * @member {Array.} cluster_ids - * @memberof vtadmin.GetTabletRequest + * VTGate pool. + * @member {string} pool + * @memberof vtadmin.VTGate * @instance */ - GetTabletRequest.prototype.cluster_ids = $util.emptyArray; + VTGate.prototype.pool = ""; /** - * Creates a new GetTabletRequest instance using the specified properties. + * VTGate cell. + * @member {string} cell + * @memberof vtadmin.VTGate + * @instance + */ + VTGate.prototype.cell = ""; + + /** + * VTGate cluster. + * @member {vtadmin.ICluster|null|undefined} cluster + * @memberof vtadmin.VTGate + * @instance + */ + VTGate.prototype.cluster = null; + + /** + * VTGate keyspaces. + * @member {Array.} keyspaces + * @memberof vtadmin.VTGate + * @instance + */ + VTGate.prototype.keyspaces = $util.emptyArray; + + /** + * Creates a new VTGate instance using the specified properties. * @function create - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static - * @param {vtadmin.IGetTabletRequest=} [properties] Properties to set - * @returns {vtadmin.GetTabletRequest} GetTabletRequest instance + * @param {vtadmin.IVTGate=} [properties] Properties to set + * @returns {vtadmin.VTGate} VTGate instance */ - GetTabletRequest.create = function create(properties) { - return new GetTabletRequest(properties); + VTGate.create = function create(properties) { + return new VTGate(properties); }; /** - * Encodes the specified GetTabletRequest message. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. + * Encodes the specified VTGate message. Does not implicitly {@link vtadmin.VTGate.verify|verify} messages. * @function encode - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static - * @param {vtadmin.IGetTabletRequest} message GetTabletRequest message or plain object to encode + * @param {vtadmin.IVTGate} message VTGate 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]); + 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")) + $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]); return writer; }; /** - * Encodes the specified GetTabletRequest message, length delimited. Does not implicitly {@link vtadmin.GetTabletRequest.verify|verify} messages. + * Encodes the specified VTGate message, length delimited. Does not implicitly {@link vtadmin.VTGate.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static - * @param {vtadmin.IGetTabletRequest} message GetTabletRequest message or plain object to encode + * @param {vtadmin.IVTGate} message VTGate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletRequest.encodeDelimited = function encodeDelimited(message, writer) { + VTGate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletRequest message from the specified reader or buffer. + * Decodes a VTGate message from the specified reader or buffer. * @function decode - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetTabletRequest} GetTabletRequest + * @returns {vtadmin.VTGate} VTGate * @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(); + 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(); 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: + 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; }; /** - * Decodes a GetTabletRequest message from the specified reader or buffer, length delimited. + * Decodes a VTGate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetTabletRequest} GetTabletRequest + * @returns {vtadmin.VTGate} VTGate * @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); + VTGate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletRequest message. + * Verifies a VTGate message. * @function verify - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @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'; + 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")) { + 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"; } return null; }; /** - * Creates a GetTabletRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VTGate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static * @param {Object.} object Plain object - * @returns {vtadmin.GetTabletRequest} GetTabletRequest + * @returns {vtadmin.VTGate} VTGate */ - 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]); + VTGate.fromObject = function fromObject(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) { + 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"); + message.keyspaces = []; + for (var i = 0; i < object.keyspaces.length; ++i) + message.keyspaces[i] = String(object.keyspaces[i]); } return message; }; /** - * Creates a plain object from a GetTabletRequest message. Also converts values to other types if specified. + * Creates a plain object from a VTGate message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @static - * @param {vtadmin.GetTabletRequest} message GetTabletRequest + * @param {vtadmin.VTGate} message VTGate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletRequest.toObject = function toObject(message, options) { - if (!options) options = {}; + VTGate.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]; + if (options.arrays || options.defaults) + object.keyspaces = []; + if (options.defaults) { + 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 = $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]; } return object; }; /** - * Converts this GetTabletRequest to JSON. + * Converts this VTGate to JSON. * @function toJSON - * @memberof vtadmin.GetTabletRequest + * @memberof vtadmin.VTGate * @instance * @returns {Object.} JSON object */ - GetTabletRequest.prototype.toJSON = function toJSON() { + VTGate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletRequest; + return VTGate; })(); - vtadmin.GetTabletsRequest = (function () { + vtadmin.GetClustersRequest = (function() { + /** - * Properties of a GetTabletsRequest. + * Properties of a GetClustersRequest. * @memberof vtadmin - * @interface IGetTabletsRequest - * @property {Array.|null} [cluster_ids] GetTabletsRequest cluster_ids + * @interface IGetClustersRequest */ /** - * Constructs a new GetTabletsRequest. + * Constructs a new GetClustersRequest. * @memberof vtadmin - * @classdesc Represents a GetTabletsRequest. - * @implements IGetTabletsRequest + * @classdesc Represents a GetClustersRequest. + * @implements IGetClustersRequest * @constructor - * @param {vtadmin.IGetTabletsRequest=} [properties] Properties to set + * @param {vtadmin.IGetClustersRequest=} [properties] Properties to set */ - function GetTabletsRequest(properties) { - this.cluster_ids = []; + function GetClustersRequest(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]]; } /** - * 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. + * Creates a new GetClustersRequest instance using the specified properties. * @function create - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static - * @param {vtadmin.IGetTabletsRequest=} [properties] Properties to set - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest instance + * @param {vtadmin.IGetClustersRequest=} [properties] Properties to set + * @returns {vtadmin.GetClustersRequest} GetClustersRequest instance */ - GetTabletsRequest.create = function create(properties) { - return new GetTabletsRequest(properties); + GetClustersRequest.create = function create(properties) { + return new GetClustersRequest(properties); }; /** - * Encodes the specified GetTabletsRequest message. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. + * Encodes the specified GetClustersRequest message. Does not implicitly {@link vtadmin.GetClustersRequest.verify|verify} messages. * @function encode - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static - * @param {vtadmin.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode + * @param {vtadmin.IGetClustersRequest} message GetClustersRequest 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]); + GetClustersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); return writer; }; /** - * Encodes the specified GetTabletsRequest message, length delimited. Does not implicitly {@link vtadmin.GetTabletsRequest.verify|verify} messages. + * Encodes the specified GetClustersRequest message, length delimited. Does not implicitly {@link vtadmin.GetClustersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static - * @param {vtadmin.IGetTabletsRequest} message GetTabletsRequest message or plain object to encode + * @param {vtadmin.IGetClustersRequest} message GetClustersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer. + * Decodes a GetClustersRequest message from the specified reader or buffer. * @function decode - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest + * @returns {vtadmin.GetClustersRequest} GetClustersRequest * @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(); + GetClustersRequest.decode = 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.GetClustersRequest(); 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; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a GetTabletsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetClustersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest + * @returns {vtadmin.GetClustersRequest} GetClustersRequest * @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); + GetClustersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletsRequest message. + * Verifies a GetClustersRequest message. * @function verify - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @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'; - } + GetClustersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; return null; }; /** - * Creates a GetTabletsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetClustersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static * @param {Object.} object Plain object - * @returns {vtadmin.GetTabletsRequest} GetTabletsRequest + * @returns {vtadmin.GetClustersRequest} GetClustersRequest */ - 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; + GetClustersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.GetClustersRequest) + return object; + return new $root.vtadmin.GetClustersRequest(); }; /** - * Creates a plain object from a GetTabletsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetClustersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @static - * @param {vtadmin.GetTabletsRequest} message GetTabletsRequest + * @param {vtadmin.GetClustersRequest} message GetClustersRequest * @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; + GetClustersRequest.toObject = function toObject() { + return {}; }; /** - * Converts this GetTabletsRequest to JSON. + * Converts this GetClustersRequest to JSON. * @function toJSON - * @memberof vtadmin.GetTabletsRequest + * @memberof vtadmin.GetClustersRequest * @instance * @returns {Object.} JSON object */ - GetTabletsRequest.prototype.toJSON = function toJSON() { + GetClustersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletsRequest; + return GetClustersRequest; })(); - vtadmin.GetTabletsResponse = (function () { + vtadmin.GetClustersResponse = (function() { + /** - * Properties of a GetTabletsResponse. + * Properties of a GetClustersResponse. * @memberof vtadmin - * @interface IGetTabletsResponse - * @property {Array.|null} [tablets] GetTabletsResponse tablets + * @interface IGetClustersResponse + * @property {Array.|null} [clusters] GetClustersResponse clusters */ /** - * Constructs a new GetTabletsResponse. + * Constructs a new GetClustersResponse. * @memberof vtadmin - * @classdesc Represents a GetTabletsResponse. - * @implements IGetTabletsResponse + * @classdesc Represents a GetClustersResponse. + * @implements IGetClustersResponse * @constructor - * @param {vtadmin.IGetTabletsResponse=} [properties] Properties to set + * @param {vtadmin.IGetClustersResponse=} [properties] Properties to set */ - function GetTabletsResponse(properties) { - this.tablets = []; + function GetClustersResponse(properties) { + this.clusters = []; if (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]]; } /** - * GetTabletsResponse tablets. - * @member {Array.} tablets - * @memberof vtadmin.GetTabletsResponse + * GetClustersResponse clusters. + * @member {Array.} clusters + * @memberof vtadmin.GetClustersResponse * @instance */ - GetTabletsResponse.prototype.tablets = $util.emptyArray; + GetClustersResponse.prototype.clusters = $util.emptyArray; /** - * Creates a new GetTabletsResponse instance using the specified properties. + * Creates a new GetClustersResponse instance using the specified properties. * @function create - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static - * @param {vtadmin.IGetTabletsResponse=} [properties] Properties to set - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse instance + * @param {vtadmin.IGetClustersResponse=} [properties] Properties to set + * @returns {vtadmin.GetClustersResponse} GetClustersResponse instance */ - GetTabletsResponse.create = function create(properties) { - return new GetTabletsResponse(properties); + GetClustersResponse.create = function create(properties) { + return new GetClustersResponse(properties); }; /** - * Encodes the specified GetTabletsResponse message. Does not implicitly {@link vtadmin.GetTabletsResponse.verify|verify} messages. + * Encodes the specified GetClustersResponse message. Does not implicitly {@link vtadmin.GetClustersResponse.verify|verify} messages. * @function encode - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static - * @param {vtadmin.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {vtadmin.IGetClustersResponse} message GetClustersResponse 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(); + GetClustersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusters != null && message.clusters.length) + for (var i = 0; i < message.clusters.length; ++i) + $root.vtadmin.Cluster.encode(message.clusters[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. + * Encodes the specified GetClustersResponse message, length delimited. Does not implicitly {@link vtadmin.GetClustersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static - * @param {vtadmin.IGetTabletsResponse} message GetTabletsResponse message or plain object to encode + * @param {vtadmin.IGetClustersResponse} message GetClustersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTabletsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTabletsResponse message from the specified reader or buffer. + * Decodes a GetClustersResponse message from the specified reader or buffer. * @function decode - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse + * @returns {vtadmin.GetClustersResponse} GetClustersResponse * @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(); + GetClustersResponse.decode = 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.GetClustersResponse(); 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.clusters && message.clusters.length)) + message.clusters = []; + message.clusters.push($root.vtadmin.Cluster.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. + * Decodes a GetClustersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse + * @returns {vtadmin.GetClustersResponse} GetClustersResponse * @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); + GetClustersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTabletsResponse message. + * Verifies a GetClustersResponse message. * @function verify - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @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; + GetClustersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusters != null && message.hasOwnProperty("clusters")) { + if (!Array.isArray(message.clusters)) + return "clusters: array expected"; + for (var i = 0; i < message.clusters.length; ++i) { + var error = $root.vtadmin.Cluster.verify(message.clusters[i]); + if (error) + return "clusters." + error; } } return null; }; /** - * Creates a GetTabletsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetClustersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static * @param {Object.} object Plain object - * @returns {vtadmin.GetTabletsResponse} GetTabletsResponse + * @returns {vtadmin.GetClustersResponse} GetClustersResponse */ - 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]); + GetClustersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.GetClustersResponse) + return object; + var message = new $root.vtadmin.GetClustersResponse(); + if (object.clusters) { + if (!Array.isArray(object.clusters)) + throw TypeError(".vtadmin.GetClustersResponse.clusters: array expected"); + message.clusters = []; + for (var i = 0; i < object.clusters.length; ++i) { + if (typeof object.clusters[i] !== "object") + throw TypeError(".vtadmin.GetClustersResponse.clusters: object expected"); + message.clusters[i] = $root.vtadmin.Cluster.fromObject(object.clusters[i]); } } return message; }; /** - * Creates a plain object from a GetTabletsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetClustersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @static - * @param {vtadmin.GetTabletsResponse} message GetTabletsResponse + * @param {vtadmin.GetClustersResponse} message GetClustersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTabletsResponse.toObject = function toObject(message, options) { - if (!options) options = {}; + GetClustersResponse.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); + if (options.arrays || options.defaults) + object.clusters = []; + if (message.clusters && message.clusters.length) { + object.clusters = []; + for (var j = 0; j < message.clusters.length; ++j) + object.clusters[j] = $root.vtadmin.Cluster.toObject(message.clusters[j], options); } return object; }; /** - * Converts this GetTabletsResponse to JSON. + * Converts this GetClustersResponse to JSON. * @function toJSON - * @memberof vtadmin.GetTabletsResponse + * @memberof vtadmin.GetClustersResponse * @instance * @returns {Object.} JSON object */ - GetTabletsResponse.prototype.toJSON = function toJSON() { + GetClustersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetTabletsResponse; + return GetClustersResponse; })(); - return vtadmin; -})(); - -$root.topodata = (function () { - /** - * Namespace topodata. - * @exports topodata - * @namespace - */ - var topodata = {}; + vtadmin.GetGatesRequest = (function() { - topodata.KeyRange = (function () { /** - * Properties of a KeyRange. - * @memberof topodata - * @interface IKeyRange - * @property {Uint8Array|null} [start] KeyRange start - * @property {Uint8Array|null} [end] KeyRange end + * Properties of a GetGatesRequest. + * @memberof vtadmin + * @interface IGetGatesRequest + * @property {Array.|null} [cluster_ids] GetGatesRequest cluster_ids */ /** - * Constructs a new KeyRange. - * @memberof topodata - * @classdesc Represents a KeyRange. - * @implements IKeyRange + * Constructs a new GetGatesRequest. + * @memberof vtadmin + * @classdesc Represents a GetGatesRequest. + * @implements IGetGatesRequest * @constructor - * @param {topodata.IKeyRange=} [properties] Properties to set + * @param {vtadmin.IGetGatesRequest=} [properties] Properties to set */ - function KeyRange(properties) { + function GetGatesRequest(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]]; + 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 + * GetGatesRequest cluster_ids. + * @member {Array.} cluster_ids + * @memberof vtadmin.GetGatesRequest * @instance */ - KeyRange.prototype.end = $util.newBuffer([]); + GetGatesRequest.prototype.cluster_ids = $util.emptyArray; /** - * Creates a new KeyRange instance using the specified properties. + * Creates a new GetGatesRequest instance using the specified properties. * @function create - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static - * @param {topodata.IKeyRange=} [properties] Properties to set - * @returns {topodata.KeyRange} KeyRange instance + * @param {vtadmin.IGetGatesRequest=} [properties] Properties to set + * @returns {vtadmin.GetGatesRequest} GetGatesRequest instance */ - KeyRange.create = function create(properties) { - return new KeyRange(properties); + GetGatesRequest.create = function create(properties) { + return new GetGatesRequest(properties); }; /** - * Encodes the specified KeyRange message. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. + * Encodes the specified GetGatesRequest message. Does not implicitly {@link vtadmin.GetGatesRequest.verify|verify} messages. * @function encode - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static - * @param {topodata.IKeyRange} message KeyRange message or plain object to encode + * @param {vtadmin.IGetGatesRequest} message GetGatesRequest 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); + GetGatesRequest.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 KeyRange message, length delimited. Does not implicitly {@link topodata.KeyRange.verify|verify} messages. + * Encodes the specified GetGatesRequest message, length delimited. Does not implicitly {@link vtadmin.GetGatesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static - * @param {topodata.IKeyRange} message KeyRange message or plain object to encode + * @param {vtadmin.IGetGatesRequest} message GetGatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyRange.encodeDelimited = function encodeDelimited(message, writer) { + GetGatesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KeyRange message from the specified reader or buffer. + * Decodes a GetGatesRequest message from the specified reader or buffer. * @function decode - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.KeyRange} KeyRange + * @returns {vtadmin.GetGatesRequest} GetGatesRequest * @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(); + 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(); 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: + 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 KeyRange message from the specified reader or buffer, length delimited. + * Decodes a GetGatesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.KeyRange} KeyRange + * @returns {vtadmin.GetGatesRequest} GetGatesRequest * @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); + GetGatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KeyRange message. + * Verifies a GetGatesRequest message. * @function verify - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @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'; + 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"; + 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 KeyRange message from a plain object. Also converts values to their respective internal types. + * Creates a GetGatesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static * @param {Object.} object Plain object - * @returns {topodata.KeyRange} KeyRange + * @returns {vtadmin.GetGatesRequest} GetGatesRequest */ - 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; + GetGatesRequest.fromObject = function fromObject(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"); + 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 KeyRange message. Also converts values to other types if specified. + * Creates a plain object from a GetGatesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @static - * @param {topodata.KeyRange} message KeyRange + * @param {vtadmin.GetGatesRequest} message GetGatesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyRange.toObject = function toObject(message, options) { - if (!options) options = {}; + GetGatesRequest.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 (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]; } - 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. + * Converts this GetGatesRequest to JSON. * @function toJSON - * @memberof topodata.KeyRange + * @memberof vtadmin.GetGatesRequest * @instance * @returns {Object.} JSON object */ - KeyRange.prototype.toJSON = function toJSON() { + GetGatesRequest.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; + return GetGatesRequest; })(); - /** - * 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; - })(); + vtadmin.GetGatesResponse = (function() { - topodata.TabletAlias = (function () { /** - * Properties of a TabletAlias. - * @memberof topodata - * @interface ITabletAlias - * @property {string|null} [cell] TabletAlias cell - * @property {number|null} [uid] TabletAlias uid + * Properties of a GetGatesResponse. + * @memberof vtadmin + * @interface IGetGatesResponse + * @property {Array.|null} [gates] GetGatesResponse gates */ /** - * Constructs a new TabletAlias. - * @memberof topodata - * @classdesc Represents a TabletAlias. - * @implements ITabletAlias + * Constructs a new GetGatesResponse. + * @memberof vtadmin + * @classdesc Represents a GetGatesResponse. + * @implements IGetGatesResponse * @constructor - * @param {topodata.ITabletAlias=} [properties] Properties to set + * @param {vtadmin.IGetGatesResponse=} [properties] Properties to set */ - function TabletAlias(properties) { + function GetGatesResponse(properties) { + 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]]; } /** - * TabletAlias cell. - * @member {string} cell - * @memberof topodata.TabletAlias - * @instance - */ - TabletAlias.prototype.cell = ''; - - /** - * TabletAlias uid. - * @member {number} uid - * @memberof topodata.TabletAlias + * GetGatesResponse gates. + * @member {Array.} gates + * @memberof vtadmin.GetGatesResponse * @instance */ - TabletAlias.prototype.uid = 0; + GetGatesResponse.prototype.gates = $util.emptyArray; /** - * Creates a new TabletAlias instance using the specified properties. + * Creates a new GetGatesResponse instance using the specified properties. * @function create - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static - * @param {topodata.ITabletAlias=} [properties] Properties to set - * @returns {topodata.TabletAlias} TabletAlias instance + * @param {vtadmin.IGetGatesResponse=} [properties] Properties to set + * @returns {vtadmin.GetGatesResponse} GetGatesResponse instance */ - TabletAlias.create = function create(properties) { - return new TabletAlias(properties); + GetGatesResponse.create = function create(properties) { + return new GetGatesResponse(properties); }; /** - * Encodes the specified TabletAlias message. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. + * Encodes the specified GetGatesResponse message. Does not implicitly {@link vtadmin.GetGatesResponse.verify|verify} messages. * @function encode - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static - * @param {topodata.ITabletAlias} message TabletAlias message or plain object to encode + * @param {vtadmin.IGetGatesResponse} message GetGatesResponse 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); + GetGatesResponse.encode = function encode(message, writer) { + 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(); return writer; }; /** - * Encodes the specified TabletAlias message, length delimited. Does not implicitly {@link topodata.TabletAlias.verify|verify} messages. + * Encodes the specified GetGatesResponse message, length delimited. Does not implicitly {@link vtadmin.GetGatesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static - * @param {topodata.ITabletAlias} message TabletAlias message or plain object to encode + * @param {vtadmin.IGetGatesResponse} message GetGatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TabletAlias.encodeDelimited = function encodeDelimited(message, writer) { + GetGatesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TabletAlias message from the specified reader or buffer. + * Decodes a GetGatesResponse message from the specified reader or buffer. * @function decode - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.TabletAlias} TabletAlias + * @returns {vtadmin.GetGatesResponse} GetGatesResponse * @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(); + 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(); 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: + 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; }; /** - * Decodes a TabletAlias message from the specified reader or buffer, length delimited. + * Decodes a GetGatesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.TabletAlias} TabletAlias + * @returns {vtadmin.GetGatesResponse} GetGatesResponse * @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); + GetGatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TabletAlias message. + * Verifies a GetGatesResponse message. * @function verify - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @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'; + 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"; + for (var i = 0; i < message.gates.length; ++i) { + var error = $root.vtadmin.VTGate.verify(message.gates[i]); + if (error) + return "gates." + error; + } + } return null; }; /** - * Creates a TabletAlias message from a plain object. Also converts values to their respective internal types. + * Creates a GetGatesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static * @param {Object.} object Plain object - * @returns {topodata.TabletAlias} TabletAlias + * @returns {vtadmin.GetGatesResponse} GetGatesResponse */ - 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; + GetGatesResponse.fromObject = function fromObject(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"); + message.gates = []; + for (var i = 0; i < object.gates.length; ++i) { + if (typeof object.gates[i] !== "object") + throw TypeError(".vtadmin.GetGatesResponse.gates: object expected"); + message.gates[i] = $root.vtadmin.VTGate.fromObject(object.gates[i]); + } + } return message; }; /** - * Creates a plain object from a TabletAlias message. Also converts values to other types if specified. + * Creates a plain object from a GetGatesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @static - * @param {topodata.TabletAlias} message TabletAlias + * @param {vtadmin.GetGatesResponse} message GetGatesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TabletAlias.toObject = function toObject(message, options) { - if (!options) options = {}; + GetGatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.defaults) { - object.cell = ''; - object.uid = 0; + if (options.arrays || options.defaults) + object.gates = []; + if (message.gates && message.gates.length) { + object.gates = []; + for (var j = 0; j < message.gates.length; ++j) + object.gates[j] = $root.vtadmin.VTGate.toObject(message.gates[j], options); } - 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. + * Converts this GetGatesResponse to JSON. * @function toJSON - * @memberof topodata.TabletAlias + * @memberof vtadmin.GetGatesResponse * @instance * @returns {Object.} JSON object */ - TabletAlias.prototype.toJSON = function toJSON() { + GetGatesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TabletAlias; + return GetGatesResponse; })(); - /** - * 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; - })(); + vtadmin.GetKeyspacesRequest = (function() { - 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 + * Properties of a GetKeyspacesRequest. + * @memberof vtadmin + * @interface IGetKeyspacesRequest + * @property {Array.|null} [cluster_ids] GetKeyspacesRequest cluster_ids */ /** - * Constructs a new Tablet. - * @memberof topodata - * @classdesc Represents a Tablet. - * @implements ITablet + * Constructs a new GetKeyspacesRequest. + * @memberof vtadmin + * @classdesc Represents a GetKeyspacesRequest. + * @implements IGetKeyspacesRequest * @constructor - * @param {topodata.ITablet=} [properties] Properties to set + * @param {vtadmin.IGetKeyspacesRequest=} [properties] Properties to set */ - function Tablet(properties) { - this.port_map = {}; - this.tags = {}; + function GetKeyspacesRequest(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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * Tablet alias. - * @member {topodata.ITabletAlias|null|undefined} alias - * @memberof topodata.Tablet + * GetKeyspacesRequest cluster_ids. + * @member {Array.} cluster_ids + * @memberof vtadmin.GetKeyspacesRequest * @instance */ - Tablet.prototype.alias = null; + GetKeyspacesRequest.prototype.cluster_ids = $util.emptyArray; /** - * Tablet hostname. - * @member {string} hostname - * @memberof topodata.Tablet - * @instance + * Creates a new GetKeyspacesRequest instance using the specified properties. + * @function create + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {vtadmin.IGetKeyspacesRequest=} [properties] Properties to set + * @returns {vtadmin.GetKeyspacesRequest} GetKeyspacesRequest instance */ - Tablet.prototype.hostname = ''; + GetKeyspacesRequest.create = function create(properties) { + return new GetKeyspacesRequest(properties); + }; /** - * Tablet port_map. - * @member {Object.} port_map - * @memberof topodata.Tablet - * @instance + * Encodes the specified GetKeyspacesRequest message. Does not implicitly {@link vtadmin.GetKeyspacesRequest.verify|verify} messages. + * @function encode + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {vtadmin.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Tablet.prototype.port_map = $util.emptyObject; + GetKeyspacesRequest.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; + }; /** - * Tablet keyspace. - * @member {string} keyspace - * @memberof topodata.Tablet - * @instance + * Encodes the specified GetKeyspacesRequest message, length delimited. Does not implicitly {@link vtadmin.GetKeyspacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {vtadmin.IGetKeyspacesRequest} message GetKeyspacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Tablet.prototype.keyspace = ''; + GetKeyspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Tablet shard. - * @member {string} shard - * @memberof topodata.Tablet - * @instance + * Decodes a GetKeyspacesRequest message from the specified reader or buffer. + * @function decode + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {vtadmin.GetKeyspacesRequest} GetKeyspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Tablet.prototype.shard = ''; + 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.vtadmin.GetKeyspacesRequest(); + 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; + }; /** - * Tablet key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.Tablet - * @instance + * Decodes a GetKeyspacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {vtadmin.GetKeyspacesRequest} GetKeyspacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Tablet.prototype.key_range = null; + GetKeyspacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Tablet type. - * @member {topodata.TabletType} type - * @memberof topodata.Tablet - * @instance + * Verifies a GetKeyspacesRequest message. + * @function verify + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Tablet.prototype.type = 0; + GetKeyspacesRequest.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; + }; /** - * Tablet db_name_override. - * @member {string} db_name_override - * @memberof topodata.Tablet - * @instance + * Creates a GetKeyspacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {Object.} object Plain object + * @returns {vtadmin.GetKeyspacesRequest} GetKeyspacesRequest */ - Tablet.prototype.db_name_override = ''; + GetKeyspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.GetKeyspacesRequest) + return object; + var message = new $root.vtadmin.GetKeyspacesRequest(); + if (object.cluster_ids) { + if (!Array.isArray(object.cluster_ids)) + throw TypeError(".vtadmin.GetKeyspacesRequest.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; + }; /** - * Tablet tags. - * @member {Object.} tags - * @memberof topodata.Tablet - * @instance + * Creates a plain object from a GetKeyspacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof vtadmin.GetKeyspacesRequest + * @static + * @param {vtadmin.GetKeyspacesRequest} message GetKeyspacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Tablet.prototype.tags = $util.emptyObject; + GetKeyspacesRequest.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; + }; /** - * Tablet mysql_hostname. - * @member {string} mysql_hostname - * @memberof topodata.Tablet + * Converts this GetKeyspacesRequest to JSON. + * @function toJSON + * @memberof vtadmin.GetKeyspacesRequest * @instance + * @returns {Object.} JSON object */ - Tablet.prototype.mysql_hostname = ''; + GetKeyspacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetKeyspacesRequest; + })(); + + vtadmin.GetKeyspacesResponse = (function() { /** - * Tablet mysql_port. - * @member {number} mysql_port - * @memberof topodata.Tablet - * @instance + * Properties of a GetKeyspacesResponse. + * @memberof vtadmin + * @interface IGetKeyspacesResponse + * @property {Array.|null} [keyspaces] GetKeyspacesResponse keyspaces */ - Tablet.prototype.mysql_port = 0; /** - * Tablet master_term_start_time. - * @member {vttime.ITime|null|undefined} master_term_start_time - * @memberof topodata.Tablet + * Constructs a new GetKeyspacesResponse. + * @memberof vtadmin + * @classdesc Represents a GetKeyspacesResponse. + * @implements IGetKeyspacesResponse + * @constructor + * @param {vtadmin.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 vtadmin.GetKeyspacesResponse * @instance */ - Tablet.prototype.master_term_start_time = null; + GetKeyspacesResponse.prototype.keyspaces = $util.emptyArray; /** - * Creates a new Tablet instance using the specified properties. + * Creates a new GetKeyspacesResponse instance using the specified properties. * @function create - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @static - * @param {topodata.ITablet=} [properties] Properties to set - * @returns {topodata.Tablet} Tablet instance + * @param {vtadmin.IGetKeyspacesResponse=} [properties] Properties to set + * @returns {vtadmin.GetKeyspacesResponse} GetKeyspacesResponse instance */ - Tablet.create = function create(properties) { - return new Tablet(properties); + GetKeyspacesResponse.create = function create(properties) { + return new GetKeyspacesResponse(properties); }; /** - * Encodes the specified Tablet message. Does not implicitly {@link topodata.Tablet.verify|verify} messages. + * Encodes the specified GetKeyspacesResponse message. Does not implicitly {@link vtadmin.GetKeyspacesResponse.verify|verify} messages. * @function encode - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @static - * @param {topodata.ITablet} message Tablet message or plain object to encode + * @param {vtadmin.IGetKeyspacesResponse} message GetKeyspacesResponse 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(); + 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.vtadmin.Keyspace.encode(message.keyspaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Tablet message, length delimited. Does not implicitly {@link topodata.Tablet.verify|verify} messages. + * Encodes the specified GetKeyspacesResponse message, length delimited. Does not implicitly {@link vtadmin.GetKeyspacesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @static - * @param {topodata.ITablet} message Tablet message or plain object to encode + * @param {vtadmin.IGetKeyspacesResponse} message GetKeyspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tablet.encodeDelimited = function encodeDelimited(message, writer) { + GetKeyspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Tablet message from the specified reader or buffer. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer. * @function decode - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.Tablet} Tablet + * @returns {vtadmin.GetKeyspacesResponse} GetKeyspacesResponse * @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; + 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.vtadmin.GetKeyspacesResponse(); 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; + case 1: + if (!(message.keyspaces && message.keyspaces.length)) + message.keyspaces = []; + message.keyspaces.push($root.vtadmin.Keyspace.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. + * Decodes a GetKeyspacesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Tablet} Tablet + * @returns {vtadmin.GetKeyspacesResponse} GetKeyspacesResponse * @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); + GetKeyspacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Tablet message. + * Verifies a GetKeyspacesResponse message. * @function verify - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @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; + 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.vtadmin.Keyspace.verify(message.keyspaces[i]); + if (error) + return "keyspaces." + error; } - 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. + * Creates a GetKeyspacesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @static * @param {Object.} object Plain object - * @returns {topodata.Tablet} Tablet + * @returns {vtadmin.GetKeyspacesResponse} GetKeyspacesResponse */ - 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; + GetKeyspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.vtadmin.GetKeyspacesResponse) + return object; + var message = new $root.vtadmin.GetKeyspacesResponse(); + if (object.keyspaces) { + if (!Array.isArray(object.keyspaces)) + throw TypeError(".vtadmin.GetKeyspacesResponse.keyspaces: array expected"); + message.keyspaces = []; + for (var i = 0; i < object.keyspaces.length; ++i) { + if (typeof object.keyspaces[i] !== "object") + throw TypeError(".vtadmin.GetKeyspacesResponse.keyspaces: object expected"); + message.keyspaces[i] = $root.vtadmin.Keyspace.fromObject(object.keyspaces[i]); + } } - 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); + return message; + }; + + /** + * Creates a plain object from a GetKeyspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof vtadmin.GetKeyspacesResponse + * @static + * @param {vtadmin.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.vtadmin.Keyspace.toObject(message.keyspaces[j], options); } - 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. + * Converts this GetKeyspacesResponse to JSON. * @function toJSON - * @memberof topodata.Tablet + * @memberof vtadmin.GetKeyspacesResponse * @instance * @returns {Object.} JSON object */ - Tablet.prototype.toJSON = function toJSON() { + GetKeyspacesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Tablet; + return GetKeyspacesResponse; })(); - topodata.Shard = (function () { + vtadmin.GetSchemasRequest = (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 + * Properties of a GetSchemasRequest. + * @memberof vtadmin + * @interface IGetSchemasRequest + * @property {Array.|null} [cluster_ids] GetSchemasRequest cluster_ids */ /** - * Constructs a new Shard. - * @memberof topodata - * @classdesc Represents a Shard. - * @implements IShard + * Constructs a new GetSchemasRequest. + * @memberof vtadmin + * @classdesc Represents a GetSchemasRequest. + * @implements IGetSchemasRequest * @constructor - * @param {topodata.IShard=} [properties] Properties to set + * @param {vtadmin.IGetSchemasRequest=} [properties] Properties to set */ - function Shard(properties) { - this.served_types = []; - this.source_shards = []; - this.tablet_controls = []; + 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]]; + 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 + * GetSchemasRequest cluster_ids. + * @member {Array.} cluster_ids + * @memberof vtadmin.GetSchemasRequest * @instance */ - Shard.prototype.is_master_serving = false; + GetSchemasRequest.prototype.cluster_ids = $util.emptyArray; /** - * Creates a new Shard instance using the specified properties. + * Creates a new GetSchemasRequest instance using the specified properties. * @function create - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @static - * @param {topodata.IShard=} [properties] Properties to set - * @returns {topodata.Shard} Shard instance + * @param {vtadmin.IGetSchemasRequest=} [properties] Properties to set + * @returns {vtadmin.GetSchemasRequest} GetSchemasRequest instance */ - Shard.create = function create(properties) { - return new Shard(properties); + GetSchemasRequest.create = function create(properties) { + return new GetSchemasRequest(properties); }; /** - * Encodes the specified Shard message. Does not implicitly {@link topodata.Shard.verify|verify} messages. + * Encodes the specified GetSchemasRequest message. Does not implicitly {@link vtadmin.GetSchemasRequest.verify|verify} messages. * @function encode - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @static - * @param {topodata.IShard} message Shard message or plain object to encode + * @param {vtadmin.IGetSchemasRequest} message GetSchemasRequest 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(); + 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 Shard message, length delimited. Does not implicitly {@link topodata.Shard.verify|verify} messages. + * Encodes the specified GetSchemasRequest message, length delimited. Does not implicitly {@link vtadmin.GetSchemasRequest.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @static - * @param {topodata.IShard} message Shard message or plain object to encode + * @param {vtadmin.IGetSchemasRequest} message GetSchemasRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Shard.encodeDelimited = function encodeDelimited(message, writer) { + GetSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Shard message from the specified reader or buffer. + * Decodes a GetSchemasRequest message from the specified reader or buffer. * @function decode - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.Shard} Shard + * @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 */ - 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(); + 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: - 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: + 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 Shard message from the specified reader or buffer, length delimited. + * Decodes a GetSchemasRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Shard} Shard + * @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 */ - Shard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + GetSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Shard message. + * Verifies a GetSchemasRequest message. * @function verify - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @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; - } + 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"; } - 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. + * Creates a GetSchemasRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasRequest * @static * @param {Object.} object Plain object - * @returns {topodata.Shard} Shard + * @returns {vtadmin.GetSchemasRequest} GetSchemasRequest */ - 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); + 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]); } - 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); + 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]; } - 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]); + 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; } } - 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]); + 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; } } - 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] - ); + 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]); } } - 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. + * Creates a plain object from a GetSchemasResponse message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasResponse * @static - * @param {topodata.Shard} message Shard + * @param {vtadmin.GetSchemasResponse} message GetSchemasResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Shard.toObject = function toObject(message, options) { - if (!options) options = {}; + GetSchemasResponse.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 (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); } - 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. + * Converts this GetSchemasResponse to JSON. * @function toJSON - * @memberof topodata.Shard + * @memberof vtadmin.GetSchemasResponse * @instance * @returns {Object.} JSON object */ - Shard.prototype.toJSON = function toJSON() { + GetSchemasResponse.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 - */ + return GetSchemasResponse; + })(); - /** - * 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]]; - } + vtadmin.GetTabletRequest = (function() { - /** - * ServedType tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.Shard.ServedType - * @instance - */ - ServedType.prototype.tablet_type = 0; + /** + * Properties of a GetTabletRequest. + * @memberof vtadmin + * @interface IGetTabletRequest + * @property {string|null} [hostname] GetTabletRequest hostname + * @property {Array.|null} [cluster_ids] GetTabletRequest cluster_ids + */ - /** - * ServedType cells. - * @member {Array.} cells - * @memberof topodata.Shard.ServedType - * @instance - */ - ServedType.prototype.cells = $util.emptyArray; + /** + * 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]]; + } - /** - * 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); - }; + /** + * GetTabletRequest hostname. + * @member {string} hostname + * @memberof vtadmin.GetTabletRequest + * @instance + */ + GetTabletRequest.prototype.hostname = ""; - /** - * 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; - }; + /** + * GetTabletRequest cluster_ids. + * @member {Array.} cluster_ids + * @memberof vtadmin.GetTabletRequest + * @instance + */ + GetTabletRequest.prototype.cluster_ids = $util.emptyArray; - /** - * 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(); - }; + /** + * 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; + })(); + + 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 + */ + + /** + * 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; + + /** + * 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); + 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; + 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; + } + 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; + } + 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; + } + 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; + 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 + * @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; + })(); + + 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; + })(); + + 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.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.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.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 + */ + + /** + * 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 = []; + if (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; + + /** + * 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]); + 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; + 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"; + } + 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]); + } + 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 = []; + 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; + 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 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.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 {google.protobuf.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 {google.protobuf.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.google.protobuf.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.google.protobuf.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.google.protobuf.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.google.protobuf.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.google.protobuf.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.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.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.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.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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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; + 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"; + 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); + 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 = ""; + } + 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; + 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; + })(); + + return vtctldata; +})(); + +$root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.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 google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.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 google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.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 google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.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.google.protobuf.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 google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.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 google.protobuf.Duration * @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 + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - 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; - } + 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 google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.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 google.protobuf.Duration + * @static + * @param {google.protobuf.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 google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + return protobuf; + })(); + + return google; +})(); + +$root.mysqlctl = (function() { + + /** + * Namespace mysqlctl. + * @exports mysqlctl + * @namespace + */ + var mysqlctl = {}; + + mysqlctl.StartRequest = (function() { + + /** + * Properties of a StartRequest. + * @memberof mysqlctl + * @interface IStartRequest + * @property {Array.|null} [mysqld_args] StartRequest mysqld_args + */ + + /** + * Constructs a new StartRequest. + * @memberof mysqlctl + * @classdesc Represents a StartRequest. + * @implements IStartRequest + * @constructor + * @param {mysqlctl.IStartRequest=} [properties] Properties to set + */ + function StartRequest(properties) { + this.mysqld_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]]; + } + + /** + * StartRequest mysqld_args. + * @member {Array.} mysqld_args + * @memberof mysqlctl.StartRequest + * @instance + */ + StartRequest.prototype.mysqld_args = $util.emptyArray; + + /** + * Creates a new StartRequest instance using the specified properties. + * @function create + * @memberof mysqlctl.StartRequest + * @static + * @param {mysqlctl.IStartRequest=} [properties] Properties to set + * @returns {mysqlctl.StartRequest} StartRequest instance + */ + StartRequest.create = function create(properties) { + return new StartRequest(properties); + }; + + /** + * Encodes the specified StartRequest message. Does not implicitly {@link mysqlctl.StartRequest.verify|verify} messages. + * @function encode + * @memberof mysqlctl.StartRequest + * @static + * @param {mysqlctl.IStartRequest} message StartRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mysqld_args != null && message.mysqld_args.length) + for (var i = 0; i < message.mysqld_args.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mysqld_args[i]); + return writer; + }; + + /** + * Encodes the specified StartRequest message, length delimited. Does not implicitly {@link mysqlctl.StartRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.StartRequest + * @static + * @param {mysqlctl.IStartRequest} message StartRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartRequest message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.StartRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.StartRequest} StartRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.StartRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.mysqld_args && message.mysqld_args.length)) + message.mysqld_args = []; + message.mysqld_args.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.StartRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.StartRequest} StartRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartRequest message. + * @function verify + * @memberof mysqlctl.StartRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mysqld_args != null && message.hasOwnProperty("mysqld_args")) { + if (!Array.isArray(message.mysqld_args)) + return "mysqld_args: array expected"; + for (var i = 0; i < message.mysqld_args.length; ++i) + if (!$util.isString(message.mysqld_args[i])) + return "mysqld_args: string[] expected"; + } + return null; + }; + + /** + * Creates a StartRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.StartRequest + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.StartRequest} StartRequest + */ + StartRequest.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.StartRequest) + return object; + var message = new $root.mysqlctl.StartRequest(); + if (object.mysqld_args) { + if (!Array.isArray(object.mysqld_args)) + throw TypeError(".mysqlctl.StartRequest.mysqld_args: array expected"); + message.mysqld_args = []; + for (var i = 0; i < object.mysqld_args.length; ++i) + message.mysqld_args[i] = String(object.mysqld_args[i]); + } + return message; + }; + + /** + * Creates a plain object from a StartRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.StartRequest + * @static + * @param {mysqlctl.StartRequest} message StartRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mysqld_args = []; + if (message.mysqld_args && message.mysqld_args.length) { + object.mysqld_args = []; + for (var j = 0; j < message.mysqld_args.length; ++j) + object.mysqld_args[j] = message.mysqld_args[j]; + } + return object; + }; + + /** + * Converts this StartRequest to JSON. + * @function toJSON + * @memberof mysqlctl.StartRequest + * @instance + * @returns {Object.} JSON object + */ + StartRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartRequest; + })(); + + mysqlctl.StartResponse = (function() { + + /** + * Properties of a StartResponse. + * @memberof mysqlctl + * @interface IStartResponse + */ + + /** + * Constructs a new StartResponse. + * @memberof mysqlctl + * @classdesc Represents a StartResponse. + * @implements IStartResponse + * @constructor + * @param {mysqlctl.IStartResponse=} [properties] Properties to set + */ + function StartResponse(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 StartResponse instance using the specified properties. + * @function create + * @memberof mysqlctl.StartResponse + * @static + * @param {mysqlctl.IStartResponse=} [properties] Properties to set + * @returns {mysqlctl.StartResponse} StartResponse instance + */ + StartResponse.create = function create(properties) { + return new StartResponse(properties); + }; + + /** + * Encodes the specified StartResponse message. Does not implicitly {@link mysqlctl.StartResponse.verify|verify} messages. + * @function encode + * @memberof mysqlctl.StartResponse + * @static + * @param {mysqlctl.IStartResponse} message StartResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified StartResponse message, length delimited. Does not implicitly {@link mysqlctl.StartResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.StartResponse + * @static + * @param {mysqlctl.IStartResponse} message StartResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartResponse message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.StartResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.StartResponse} StartResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.StartResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.StartResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.StartResponse} StartResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartResponse message. + * @function verify + * @memberof mysqlctl.StartResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a StartResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.StartResponse + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.StartResponse} StartResponse + */ + StartResponse.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.StartResponse) + return object; + return new $root.mysqlctl.StartResponse(); + }; + + /** + * Creates a plain object from a StartResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.StartResponse + * @static + * @param {mysqlctl.StartResponse} message StartResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StartResponse to JSON. + * @function toJSON + * @memberof mysqlctl.StartResponse + * @instance + * @returns {Object.} JSON object + */ + StartResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartResponse; + })(); + + mysqlctl.ShutdownRequest = (function() { + + /** + * Properties of a ShutdownRequest. + * @memberof mysqlctl + * @interface IShutdownRequest + * @property {boolean|null} [wait_for_mysqld] ShutdownRequest wait_for_mysqld + */ + + /** + * Constructs a new ShutdownRequest. + * @memberof mysqlctl + * @classdesc Represents a ShutdownRequest. + * @implements IShutdownRequest + * @constructor + * @param {mysqlctl.IShutdownRequest=} [properties] Properties to set + */ + function ShutdownRequest(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]]; + } + + /** + * ShutdownRequest wait_for_mysqld. + * @member {boolean} wait_for_mysqld + * @memberof mysqlctl.ShutdownRequest + * @instance + */ + ShutdownRequest.prototype.wait_for_mysqld = false; + + /** + * Creates a new ShutdownRequest instance using the specified properties. + * @function create + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {mysqlctl.IShutdownRequest=} [properties] Properties to set + * @returns {mysqlctl.ShutdownRequest} ShutdownRequest instance + */ + ShutdownRequest.create = function create(properties) { + return new ShutdownRequest(properties); + }; + + /** + * Encodes the specified ShutdownRequest message. Does not implicitly {@link mysqlctl.ShutdownRequest.verify|verify} messages. + * @function encode + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {mysqlctl.IShutdownRequest} message ShutdownRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShutdownRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.wait_for_mysqld != null && Object.hasOwnProperty.call(message, "wait_for_mysqld")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.wait_for_mysqld); + return writer; + }; + + /** + * Encodes the specified ShutdownRequest message, length delimited. Does not implicitly {@link mysqlctl.ShutdownRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {mysqlctl.IShutdownRequest} message ShutdownRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShutdownRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShutdownRequest message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.ShutdownRequest} ShutdownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShutdownRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.ShutdownRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.wait_for_mysqld = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShutdownRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.ShutdownRequest} ShutdownRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShutdownRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShutdownRequest message. + * @function verify + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShutdownRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.wait_for_mysqld != null && message.hasOwnProperty("wait_for_mysqld")) + if (typeof message.wait_for_mysqld !== "boolean") + return "wait_for_mysqld: boolean expected"; + return null; + }; + + /** + * Creates a ShutdownRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.ShutdownRequest} ShutdownRequest + */ + ShutdownRequest.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.ShutdownRequest) + return object; + var message = new $root.mysqlctl.ShutdownRequest(); + if (object.wait_for_mysqld != null) + message.wait_for_mysqld = Boolean(object.wait_for_mysqld); + return message; + }; + + /** + * Creates a plain object from a ShutdownRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.ShutdownRequest + * @static + * @param {mysqlctl.ShutdownRequest} message ShutdownRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShutdownRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.wait_for_mysqld = false; + if (message.wait_for_mysqld != null && message.hasOwnProperty("wait_for_mysqld")) + object.wait_for_mysqld = message.wait_for_mysqld; + return object; + }; + + /** + * Converts this ShutdownRequest to JSON. + * @function toJSON + * @memberof mysqlctl.ShutdownRequest + * @instance + * @returns {Object.} JSON object + */ + ShutdownRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ShutdownRequest; + })(); + + mysqlctl.ShutdownResponse = (function() { + + /** + * Properties of a ShutdownResponse. + * @memberof mysqlctl + * @interface IShutdownResponse + */ + + /** + * Constructs a new ShutdownResponse. + * @memberof mysqlctl + * @classdesc Represents a ShutdownResponse. + * @implements IShutdownResponse + * @constructor + * @param {mysqlctl.IShutdownResponse=} [properties] Properties to set + */ + function ShutdownResponse(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 ShutdownResponse instance using the specified properties. + * @function create + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {mysqlctl.IShutdownResponse=} [properties] Properties to set + * @returns {mysqlctl.ShutdownResponse} ShutdownResponse instance + */ + ShutdownResponse.create = function create(properties) { + return new ShutdownResponse(properties); + }; + + /** + * Encodes the specified ShutdownResponse message. Does not implicitly {@link mysqlctl.ShutdownResponse.verify|verify} messages. + * @function encode + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {mysqlctl.IShutdownResponse} message ShutdownResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShutdownResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ShutdownResponse message, length delimited. Does not implicitly {@link mysqlctl.ShutdownResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {mysqlctl.IShutdownResponse} message ShutdownResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShutdownResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShutdownResponse message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.ShutdownResponse} ShutdownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShutdownResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.ShutdownResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShutdownResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.ShutdownResponse} ShutdownResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShutdownResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShutdownResponse message. + * @function verify + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShutdownResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ShutdownResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.ShutdownResponse} ShutdownResponse + */ + ShutdownResponse.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.ShutdownResponse) + return object; + return new $root.mysqlctl.ShutdownResponse(); + }; + + /** + * Creates a plain object from a ShutdownResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.ShutdownResponse + * @static + * @param {mysqlctl.ShutdownResponse} message ShutdownResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShutdownResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ShutdownResponse to JSON. + * @function toJSON + * @memberof mysqlctl.ShutdownResponse + * @instance + * @returns {Object.} JSON object + */ + ShutdownResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ShutdownResponse; + })(); + + mysqlctl.RunMysqlUpgradeRequest = (function() { + + /** + * Properties of a RunMysqlUpgradeRequest. + * @memberof mysqlctl + * @interface IRunMysqlUpgradeRequest + */ + + /** + * Constructs a new RunMysqlUpgradeRequest. + * @memberof mysqlctl + * @classdesc Represents a RunMysqlUpgradeRequest. + * @implements IRunMysqlUpgradeRequest + * @constructor + * @param {mysqlctl.IRunMysqlUpgradeRequest=} [properties] Properties to set + */ + function RunMysqlUpgradeRequest(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 RunMysqlUpgradeRequest instance using the specified properties. + * @function create + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {mysqlctl.IRunMysqlUpgradeRequest=} [properties] Properties to set + * @returns {mysqlctl.RunMysqlUpgradeRequest} RunMysqlUpgradeRequest instance + */ + RunMysqlUpgradeRequest.create = function create(properties) { + return new RunMysqlUpgradeRequest(properties); + }; + + /** + * Encodes the specified RunMysqlUpgradeRequest message. Does not implicitly {@link mysqlctl.RunMysqlUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {mysqlctl.IRunMysqlUpgradeRequest} message RunMysqlUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunMysqlUpgradeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RunMysqlUpgradeRequest message, length delimited. Does not implicitly {@link mysqlctl.RunMysqlUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {mysqlctl.IRunMysqlUpgradeRequest} message RunMysqlUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunMysqlUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunMysqlUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.RunMysqlUpgradeRequest} RunMysqlUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunMysqlUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.RunMysqlUpgradeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; + + /** + * Decodes a RunMysqlUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.RunMysqlUpgradeRequest} RunMysqlUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunMysqlUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunMysqlUpgradeRequest message. + * @function verify + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunMysqlUpgradeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RunMysqlUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.RunMysqlUpgradeRequest} RunMysqlUpgradeRequest + */ + RunMysqlUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.RunMysqlUpgradeRequest) + return object; + return new $root.mysqlctl.RunMysqlUpgradeRequest(); + }; + + /** + * Creates a plain object from a RunMysqlUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @static + * @param {mysqlctl.RunMysqlUpgradeRequest} message RunMysqlUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunMysqlUpgradeRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RunMysqlUpgradeRequest to JSON. + * @function toJSON + * @memberof mysqlctl.RunMysqlUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + RunMysqlUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RunMysqlUpgradeRequest; + })(); + + mysqlctl.RunMysqlUpgradeResponse = (function() { + + /** + * Properties of a RunMysqlUpgradeResponse. + * @memberof mysqlctl + * @interface IRunMysqlUpgradeResponse + */ + + /** + * Constructs a new RunMysqlUpgradeResponse. + * @memberof mysqlctl + * @classdesc Represents a RunMysqlUpgradeResponse. + * @implements IRunMysqlUpgradeResponse + * @constructor + * @param {mysqlctl.IRunMysqlUpgradeResponse=} [properties] Properties to set + */ + function RunMysqlUpgradeResponse(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 RunMysqlUpgradeResponse instance using the specified properties. + * @function create + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {mysqlctl.IRunMysqlUpgradeResponse=} [properties] Properties to set + * @returns {mysqlctl.RunMysqlUpgradeResponse} RunMysqlUpgradeResponse instance + */ + RunMysqlUpgradeResponse.create = function create(properties) { + return new RunMysqlUpgradeResponse(properties); + }; + + /** + * Encodes the specified RunMysqlUpgradeResponse message. Does not implicitly {@link mysqlctl.RunMysqlUpgradeResponse.verify|verify} messages. + * @function encode + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {mysqlctl.IRunMysqlUpgradeResponse} message RunMysqlUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunMysqlUpgradeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RunMysqlUpgradeResponse message, length delimited. Does not implicitly {@link mysqlctl.RunMysqlUpgradeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {mysqlctl.IRunMysqlUpgradeResponse} message RunMysqlUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunMysqlUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunMysqlUpgradeResponse message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.RunMysqlUpgradeResponse} RunMysqlUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunMysqlUpgradeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.RunMysqlUpgradeResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunMysqlUpgradeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.RunMysqlUpgradeResponse} RunMysqlUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunMysqlUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunMysqlUpgradeResponse message. + * @function verify + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunMysqlUpgradeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RunMysqlUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.RunMysqlUpgradeResponse} RunMysqlUpgradeResponse + */ + RunMysqlUpgradeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.RunMysqlUpgradeResponse) + return object; + return new $root.mysqlctl.RunMysqlUpgradeResponse(); + }; + + /** + * Creates a plain object from a RunMysqlUpgradeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @static + * @param {mysqlctl.RunMysqlUpgradeResponse} message RunMysqlUpgradeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunMysqlUpgradeResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RunMysqlUpgradeResponse to JSON. + * @function toJSON + * @memberof mysqlctl.RunMysqlUpgradeResponse + * @instance + * @returns {Object.} JSON object + */ + RunMysqlUpgradeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RunMysqlUpgradeResponse; + })(); + + mysqlctl.ReinitConfigRequest = (function() { + + /** + * Properties of a ReinitConfigRequest. + * @memberof mysqlctl + * @interface IReinitConfigRequest + */ + + /** + * Constructs a new ReinitConfigRequest. + * @memberof mysqlctl + * @classdesc Represents a ReinitConfigRequest. + * @implements IReinitConfigRequest + * @constructor + * @param {mysqlctl.IReinitConfigRequest=} [properties] Properties to set + */ + function ReinitConfigRequest(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 ReinitConfigRequest instance using the specified properties. + * @function create + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {mysqlctl.IReinitConfigRequest=} [properties] Properties to set + * @returns {mysqlctl.ReinitConfigRequest} ReinitConfigRequest instance + */ + ReinitConfigRequest.create = function create(properties) { + return new ReinitConfigRequest(properties); + }; + + /** + * Encodes the specified ReinitConfigRequest message. Does not implicitly {@link mysqlctl.ReinitConfigRequest.verify|verify} messages. + * @function encode + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {mysqlctl.IReinitConfigRequest} message ReinitConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReinitConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReinitConfigRequest message, length delimited. Does not implicitly {@link mysqlctl.ReinitConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {mysqlctl.IReinitConfigRequest} message ReinitConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReinitConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReinitConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.ReinitConfigRequest} ReinitConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReinitConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.ReinitConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReinitConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.ReinitConfigRequest} ReinitConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReinitConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReinitConfigRequest message. + * @function verify + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReinitConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReinitConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.ReinitConfigRequest} ReinitConfigRequest + */ + ReinitConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.ReinitConfigRequest) + return object; + return new $root.mysqlctl.ReinitConfigRequest(); + }; + + /** + * Creates a plain object from a ReinitConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.ReinitConfigRequest + * @static + * @param {mysqlctl.ReinitConfigRequest} message ReinitConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReinitConfigRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReinitConfigRequest to JSON. + * @function toJSON + * @memberof mysqlctl.ReinitConfigRequest + * @instance + * @returns {Object.} JSON object + */ + ReinitConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReinitConfigRequest; + })(); + + mysqlctl.ReinitConfigResponse = (function() { + + /** + * Properties of a ReinitConfigResponse. + * @memberof mysqlctl + * @interface IReinitConfigResponse + */ + + /** + * Constructs a new ReinitConfigResponse. + * @memberof mysqlctl + * @classdesc Represents a ReinitConfigResponse. + * @implements IReinitConfigResponse + * @constructor + * @param {mysqlctl.IReinitConfigResponse=} [properties] Properties to set + */ + function ReinitConfigResponse(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]]; + } - /** - * 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()); - }; + /** + * Creates a new ReinitConfigResponse instance using the specified properties. + * @function create + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {mysqlctl.IReinitConfigResponse=} [properties] Properties to set + * @returns {mysqlctl.ReinitConfigResponse} ReinitConfigResponse instance + */ + ReinitConfigResponse.create = function create(properties) { + return new ReinitConfigResponse(properties); + }; - /** - * 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; - }; + /** + * Encodes the specified ReinitConfigResponse message. Does not implicitly {@link mysqlctl.ReinitConfigResponse.verify|verify} messages. + * @function encode + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {mysqlctl.IReinitConfigResponse} message ReinitConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReinitConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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; - }; + /** + * Encodes the specified ReinitConfigResponse message, length delimited. Does not implicitly {@link mysqlctl.ReinitConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {mysqlctl.IReinitConfigResponse} message ReinitConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReinitConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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]; + /** + * Decodes a ReinitConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.ReinitConfigResponse} ReinitConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReinitConfigResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.ReinitConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a ReinitConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.ReinitConfigResponse} ReinitConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReinitConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReinitConfigResponse message. + * @function verify + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReinitConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ReinitConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.ReinitConfigResponse} ReinitConfigResponse + */ + ReinitConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.ReinitConfigResponse) return object; - }; + return new $root.mysqlctl.ReinitConfigResponse(); + }; - /** - * 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); - }; + /** + * Creates a plain object from a ReinitConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.ReinitConfigResponse + * @static + * @param {mysqlctl.ReinitConfigResponse} message ReinitConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReinitConfigResponse.toObject = function toObject() { + return {}; + }; - return ServedType; - })(); + /** + * Converts this ReinitConfigResponse to JSON. + * @function toJSON + * @memberof mysqlctl.ReinitConfigResponse + * @instance + * @returns {Object.} JSON object + */ + ReinitConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - 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 - */ + return ReinitConfigResponse; + })(); - /** - * 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]]; - } + mysqlctl.RefreshConfigRequest = (function() { - /** - * SourceShard uid. - * @member {number} uid - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.uid = 0; + /** + * Properties of a RefreshConfigRequest. + * @memberof mysqlctl + * @interface IRefreshConfigRequest + */ - /** - * SourceShard keyspace. - * @member {string} keyspace - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.keyspace = ''; + /** + * Constructs a new RefreshConfigRequest. + * @memberof mysqlctl + * @classdesc Represents a RefreshConfigRequest. + * @implements IRefreshConfigRequest + * @constructor + * @param {mysqlctl.IRefreshConfigRequest=} [properties] Properties to set + */ + function RefreshConfigRequest(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]]; + } - /** - * SourceShard shard. - * @member {string} shard - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.shard = ''; + /** + * Creates a new RefreshConfigRequest instance using the specified properties. + * @function create + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {mysqlctl.IRefreshConfigRequest=} [properties] Properties to set + * @returns {mysqlctl.RefreshConfigRequest} RefreshConfigRequest instance + */ + RefreshConfigRequest.create = function create(properties) { + return new RefreshConfigRequest(properties); + }; - /** - * SourceShard key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.key_range = null; + /** + * Encodes the specified RefreshConfigRequest message. Does not implicitly {@link mysqlctl.RefreshConfigRequest.verify|verify} messages. + * @function encode + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {mysqlctl.IRefreshConfigRequest} message RefreshConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RefreshConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RefreshConfigRequest message, length delimited. Does not implicitly {@link mysqlctl.RefreshConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {mysqlctl.IRefreshConfigRequest} message RefreshConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RefreshConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SourceShard tables. - * @member {Array.} tables - * @memberof topodata.Shard.SourceShard - * @instance - */ - SourceShard.prototype.tables = $util.emptyArray; + /** + * Decodes a RefreshConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.RefreshConfigRequest} RefreshConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RefreshConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.RefreshConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes a RefreshConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.RefreshConfigRequest} RefreshConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RefreshConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a RefreshConfigRequest message. + * @function verify + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RefreshConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * 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(); - }; + /** + * Creates a RefreshConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.RefreshConfigRequest} RefreshConfigRequest + */ + RefreshConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.RefreshConfigRequest) + return object; + return new $root.mysqlctl.RefreshConfigRequest(); + }; - /** - * 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; - }; + /** + * Creates a plain object from a RefreshConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.RefreshConfigRequest + * @static + * @param {mysqlctl.RefreshConfigRequest} message RefreshConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RefreshConfigRequest.toObject = function toObject() { + return {}; + }; - /** - * 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()); - }; + /** + * Converts this RefreshConfigRequest to JSON. + * @function toJSON + * @memberof mysqlctl.RefreshConfigRequest + * @instance + * @returns {Object.} JSON object + */ + RefreshConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return RefreshConfigRequest; + })(); - /** - * 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; - }; + mysqlctl.RefreshConfigResponse = (function() { - /** - * 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; - }; + /** + * Properties of a RefreshConfigResponse. + * @memberof mysqlctl + * @interface IRefreshConfigResponse + */ - /** - * 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); - }; + /** + * Constructs a new RefreshConfigResponse. + * @memberof mysqlctl + * @classdesc Represents a RefreshConfigResponse. + * @implements IRefreshConfigResponse + * @constructor + * @param {mysqlctl.IRefreshConfigResponse=} [properties] Properties to set + */ + function RefreshConfigResponse(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]]; + } - return SourceShard; - })(); + /** + * Creates a new RefreshConfigResponse instance using the specified properties. + * @function create + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {mysqlctl.IRefreshConfigResponse=} [properties] Properties to set + * @returns {mysqlctl.RefreshConfigResponse} RefreshConfigResponse instance + */ + RefreshConfigResponse.create = function create(properties) { + return new RefreshConfigResponse(properties); + }; - 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 - */ + /** + * Encodes the specified RefreshConfigResponse message. Does not implicitly {@link mysqlctl.RefreshConfigResponse.verify|verify} messages. + * @function encode + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {mysqlctl.IRefreshConfigResponse} message RefreshConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RefreshConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * 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]]; + /** + * Encodes the specified RefreshConfigResponse message, length delimited. Does not implicitly {@link mysqlctl.RefreshConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {mysqlctl.IRefreshConfigResponse} message RefreshConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RefreshConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RefreshConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {mysqlctl.RefreshConfigResponse} RefreshConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RefreshConfigResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.RefreshConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * TabletControl tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.tablet_type = 0; + /** + * Decodes a RefreshConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {mysqlctl.RefreshConfigResponse} RefreshConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RefreshConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * TabletControl cells. - * @member {Array.} cells - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.cells = $util.emptyArray; + /** + * Verifies a RefreshConfigResponse message. + * @function verify + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RefreshConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * TabletControl blacklisted_tables. - * @member {Array.} blacklisted_tables - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.blacklisted_tables = $util.emptyArray; + /** + * Creates a RefreshConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.RefreshConfigResponse} RefreshConfigResponse + */ + RefreshConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.RefreshConfigResponse) + return object; + return new $root.mysqlctl.RefreshConfigResponse(); + }; - /** - * TabletControl frozen. - * @member {boolean} frozen - * @memberof topodata.Shard.TabletControl - * @instance - */ - TabletControl.prototype.frozen = false; + /** + * Creates a plain object from a RefreshConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof mysqlctl.RefreshConfigResponse + * @static + * @param {mysqlctl.RefreshConfigResponse} message RefreshConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RefreshConfigResponse.toObject = function toObject() { + return {}; + }; - /** - * 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); - }; + /** + * Converts this RefreshConfigResponse to JSON. + * @function toJSON + * @memberof mysqlctl.RefreshConfigResponse + * @instance + * @returns {Object.} JSON object + */ + RefreshConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return RefreshConfigResponse; + })(); - /** - * 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(); - }; + mysqlctl.MysqlCtl = (function() { - /** - * 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; - }; + /** + * Constructs a new MysqlCtl service. + * @memberof mysqlctl + * @classdesc Represents a MysqlCtl + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MysqlCtl(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * 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()); - }; + (MysqlCtl.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MysqlCtl; - /** - * 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 new MysqlCtl service using the specified rpc implementation. + * @function create + * @memberof mysqlctl.MysqlCtl + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MysqlCtl} RPC service. Useful where requests and/or responses are streamed. + */ + MysqlCtl.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * 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; - }; + /** + * Callback as used by {@link mysqlctl.MysqlCtl#start}. + * @memberof mysqlctl.MysqlCtl + * @typedef StartCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {mysqlctl.StartResponse} [response] StartResponse + */ + + /** + * Calls Start. + * @function start + * @memberof mysqlctl.MysqlCtl + * @instance + * @param {mysqlctl.IStartRequest} request StartRequest message or plain object + * @param {mysqlctl.MysqlCtl.StartCallback} callback Node-style callback called with the error, if any, and StartResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MysqlCtl.prototype.start = function start(request, callback) { + return this.rpcCall(start, $root.mysqlctl.StartRequest, $root.mysqlctl.StartResponse, request, callback); + }, "name", { value: "Start" }); - /** - * 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; - }; + /** + * Calls Start. + * @function start + * @memberof mysqlctl.MysqlCtl + * @instance + * @param {mysqlctl.IStartRequest} request StartRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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); - }; + /** + * Callback as used by {@link mysqlctl.MysqlCtl#shutdown}. + * @memberof mysqlctl.MysqlCtl + * @typedef ShutdownCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {mysqlctl.ShutdownResponse} [response] ShutdownResponse + */ - return TabletControl; - })(); + /** + * Calls Shutdown. + * @function shutdown + * @memberof mysqlctl.MysqlCtl + * @instance + * @param {mysqlctl.IShutdownRequest} request ShutdownRequest message or plain object + * @param {mysqlctl.MysqlCtl.ShutdownCallback} callback Node-style callback called with the error, if any, and ShutdownResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MysqlCtl.prototype.shutdown = function shutdown(request, callback) { + return this.rpcCall(shutdown, $root.mysqlctl.ShutdownRequest, $root.mysqlctl.ShutdownResponse, request, callback); + }, "name", { value: "Shutdown" }); - return Shard; - })(); + /** + * Calls Shutdown. + * @function shutdown + * @memberof mysqlctl.MysqlCtl + * @instance + * @param {mysqlctl.IShutdownRequest} request ShutdownRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - 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 + * Callback as used by {@link mysqlctl.MysqlCtl#runMysqlUpgrade}. + * @memberof mysqlctl.MysqlCtl + * @typedef RunMysqlUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {mysqlctl.RunMysqlUpgradeResponse} [response] RunMysqlUpgradeResponse */ /** - * Constructs a new Keyspace. - * @memberof topodata - * @classdesc Represents a Keyspace. - * @implements IKeyspace - * @constructor - * @param {topodata.IKeyspace=} [properties] Properties to set + * Calls RunMysqlUpgrade. + * @function runMysqlUpgrade + * @memberof mysqlctl.MysqlCtl + * @instance + * @param {mysqlctl.IRunMysqlUpgradeRequest} request RunMysqlUpgradeRequest message or plain object + * @param {mysqlctl.MysqlCtl.RunMysqlUpgradeCallback} callback Node-style callback called with the error, if any, and RunMysqlUpgradeResponse + * @returns {undefined} + * @variation 1 */ - 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]]; - } + Object.defineProperty(MysqlCtl.prototype.runMysqlUpgrade = function runMysqlUpgrade(request, callback) { + return this.rpcCall(runMysqlUpgrade, $root.mysqlctl.RunMysqlUpgradeRequest, $root.mysqlctl.RunMysqlUpgradeResponse, request, callback); + }, "name", { value: "RunMysqlUpgrade" }); /** - * Keyspace sharding_column_name. - * @member {string} sharding_column_name - * @memberof topodata.Keyspace + * Calls RunMysqlUpgrade. + * @function runMysqlUpgrade + * @memberof mysqlctl.MysqlCtl * @instance + * @param {mysqlctl.IRunMysqlUpgradeRequest} request RunMysqlUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Keyspace.prototype.sharding_column_name = ''; /** - * Keyspace sharding_column_type. - * @member {topodata.KeyspaceIdType} sharding_column_type - * @memberof topodata.Keyspace + * Callback as used by {@link mysqlctl.MysqlCtl#reinitConfig}. + * @memberof mysqlctl.MysqlCtl + * @typedef ReinitConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {mysqlctl.ReinitConfigResponse} [response] ReinitConfigResponse + */ + + /** + * Calls ReinitConfig. + * @function reinitConfig + * @memberof mysqlctl.MysqlCtl * @instance + * @param {mysqlctl.IReinitConfigRequest} request ReinitConfigRequest message or plain object + * @param {mysqlctl.MysqlCtl.ReinitConfigCallback} callback Node-style callback called with the error, if any, and ReinitConfigResponse + * @returns {undefined} + * @variation 1 */ - Keyspace.prototype.sharding_column_type = 0; + Object.defineProperty(MysqlCtl.prototype.reinitConfig = function reinitConfig(request, callback) { + return this.rpcCall(reinitConfig, $root.mysqlctl.ReinitConfigRequest, $root.mysqlctl.ReinitConfigResponse, request, callback); + }, "name", { value: "ReinitConfig" }); /** - * Keyspace served_froms. - * @member {Array.} served_froms - * @memberof topodata.Keyspace + * Calls ReinitConfig. + * @function reinitConfig + * @memberof mysqlctl.MysqlCtl * @instance + * @param {mysqlctl.IReinitConfigRequest} request ReinitConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Keyspace.prototype.served_froms = $util.emptyArray; /** - * Keyspace keyspace_type. - * @member {topodata.KeyspaceType} keyspace_type - * @memberof topodata.Keyspace + * Callback as used by {@link mysqlctl.MysqlCtl#refreshConfig}. + * @memberof mysqlctl.MysqlCtl + * @typedef RefreshConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {mysqlctl.RefreshConfigResponse} [response] RefreshConfigResponse + */ + + /** + * Calls RefreshConfig. + * @function refreshConfig + * @memberof mysqlctl.MysqlCtl * @instance + * @param {mysqlctl.IRefreshConfigRequest} request RefreshConfigRequest message or plain object + * @param {mysqlctl.MysqlCtl.RefreshConfigCallback} callback Node-style callback called with the error, if any, and RefreshConfigResponse + * @returns {undefined} + * @variation 1 */ - Keyspace.prototype.keyspace_type = 0; + Object.defineProperty(MysqlCtl.prototype.refreshConfig = function refreshConfig(request, callback) { + return this.rpcCall(refreshConfig, $root.mysqlctl.RefreshConfigRequest, $root.mysqlctl.RefreshConfigResponse, request, callback); + }, "name", { value: "RefreshConfig" }); /** - * Keyspace base_keyspace. - * @member {string} base_keyspace - * @memberof topodata.Keyspace + * Calls RefreshConfig. + * @function refreshConfig + * @memberof mysqlctl.MysqlCtl * @instance + * @param {mysqlctl.IRefreshConfigRequest} request RefreshConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Keyspace.prototype.base_keyspace = ''; + + return MysqlCtl; + })(); + + mysqlctl.BackupInfo = (function() { /** - * Keyspace snapshot_time. - * @member {vttime.ITime|null|undefined} snapshot_time - * @memberof topodata.Keyspace + * Properties of a BackupInfo. + * @memberof mysqlctl + * @interface IBackupInfo + * @property {string|null} [name] BackupInfo name + * @property {string|null} [directory] BackupInfo directory + */ + + /** + * Constructs a new BackupInfo. + * @memberof mysqlctl + * @classdesc Represents a BackupInfo. + * @implements IBackupInfo + * @constructor + * @param {mysqlctl.IBackupInfo=} [properties] Properties to set + */ + function BackupInfo(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]]; + } + + /** + * BackupInfo name. + * @member {string} name + * @memberof mysqlctl.BackupInfo * @instance */ - Keyspace.prototype.snapshot_time = null; + BackupInfo.prototype.name = ""; /** - * Creates a new Keyspace instance using the specified properties. + * BackupInfo directory. + * @member {string} directory + * @memberof mysqlctl.BackupInfo + * @instance + */ + BackupInfo.prototype.directory = ""; + + /** + * Creates a new BackupInfo instance using the specified properties. * @function create - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @static - * @param {topodata.IKeyspace=} [properties] Properties to set - * @returns {topodata.Keyspace} Keyspace instance + * @param {mysqlctl.IBackupInfo=} [properties] Properties to set + * @returns {mysqlctl.BackupInfo} BackupInfo instance */ - Keyspace.create = function create(properties) { - return new Keyspace(properties); + BackupInfo.create = function create(properties) { + return new BackupInfo(properties); }; /** - * Encodes the specified Keyspace message. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. + * Encodes the specified BackupInfo message. Does not implicitly {@link mysqlctl.BackupInfo.verify|verify} messages. * @function encode - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @static - * @param {topodata.IKeyspace} message Keyspace message or plain object to encode + * @param {mysqlctl.IBackupInfo} message BackupInfo 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(); + BackupInfo.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.directory != null && Object.hasOwnProperty.call(message, "directory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directory); return writer; }; /** - * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link topodata.Keyspace.verify|verify} messages. + * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link mysqlctl.BackupInfo.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @static - * @param {topodata.IKeyspace} message Keyspace message or plain object to encode + * @param {mysqlctl.IBackupInfo} message BackupInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Keyspace.encodeDelimited = function encodeDelimited(message, writer) { + BackupInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Keyspace message from the specified reader or buffer. + * Decodes a BackupInfo message from the specified reader or buffer. * @function decode - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.Keyspace} Keyspace + * @returns {mysqlctl.BackupInfo} BackupInfo * @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(); + BackupInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.mysqlctl.BackupInfo(); 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.name = reader.string(); + break; + case 2: + message.directory = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a Keyspace message from the specified reader or buffer, length delimited. + * Decodes a BackupInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.Keyspace} Keyspace + * @returns {mysqlctl.BackupInfo} BackupInfo * @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); - } + */ + BackupInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupInfo message. + * @function verify + * @memberof mysqlctl.BackupInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupInfo.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.directory != null && message.hasOwnProperty("directory")) + if (!$util.isString(message.directory)) + return "directory: string expected"; + return null; + }; + + /** + * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof mysqlctl.BackupInfo + * @static + * @param {Object.} object Plain object + * @returns {mysqlctl.BackupInfo} BackupInfo + */ + BackupInfo.fromObject = function fromObject(object) { + if (object instanceof $root.mysqlctl.BackupInfo) + return object; + var message = new $root.mysqlctl.BackupInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.directory != null) + message.directory = String(object.directory); return message; }; /** - * Creates a plain object from a Keyspace message. Also converts values to other types if specified. + * Creates a plain object from a BackupInfo message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @static - * @param {topodata.Keyspace} message Keyspace + * @param {mysqlctl.BackupInfo} message BackupInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Keyspace.toObject = function toObject(message, options) { - if (!options) options = {}; + BackupInfo.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; + object.name = ""; + object.directory = ""; } - 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); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.directory != null && message.hasOwnProperty("directory")) + object.directory = message.directory; return object; }; /** - * Converts this Keyspace to JSON. + * Converts this BackupInfo to JSON. * @function toJSON - * @memberof topodata.Keyspace + * @memberof mysqlctl.BackupInfo * @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; - })(); + * @returns {Object.} JSON object + */ + BackupInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Keyspace; + return BackupInfo; })(); - topodata.ShardReplication = (function () { + return mysqlctl; +})(); + +$root.vschema = (function() { + + /** + * Namespace vschema. + * @exports vschema + * @namespace + */ + var vschema = {}; + + vschema.RoutingRules = (function() { + /** - * Properties of a ShardReplication. - * @memberof topodata - * @interface IShardReplication - * @property {Array.|null} [nodes] ShardReplication nodes + * Properties of a RoutingRules. + * @memberof vschema + * @interface IRoutingRules + * @property {Array.|null} [rules] RoutingRules rules */ /** - * Constructs a new ShardReplication. - * @memberof topodata - * @classdesc Represents a ShardReplication. - * @implements IShardReplication + * Constructs a new RoutingRules. + * @memberof vschema + * @classdesc Represents a RoutingRules. + * @implements IRoutingRules * @constructor - * @param {topodata.IShardReplication=} [properties] Properties to set + * @param {vschema.IRoutingRules=} [properties] Properties to set */ - function ShardReplication(properties) { - this.nodes = []; + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * ShardReplication nodes. - * @member {Array.} nodes - * @memberof topodata.ShardReplication + * RoutingRules rules. + * @member {Array.} rules + * @memberof vschema.RoutingRules * @instance */ - ShardReplication.prototype.nodes = $util.emptyArray; + RoutingRules.prototype.rules = $util.emptyArray; /** - * Creates a new ShardReplication instance using the specified properties. + * Creates a new RoutingRules instance using the specified properties. * @function create - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static - * @param {topodata.IShardReplication=} [properties] Properties to set - * @returns {topodata.ShardReplication} ShardReplication instance + * @param {vschema.IRoutingRules=} [properties] Properties to set + * @returns {vschema.RoutingRules} RoutingRules instance */ - ShardReplication.create = function create(properties) { - return new ShardReplication(properties); + RoutingRules.create = function create(properties) { + return new RoutingRules(properties); }; /** - * Encodes the specified ShardReplication message. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. + * Encodes the specified RoutingRules message. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. * @function encode - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static - * @param {topodata.IShardReplication} message ShardReplication message or plain object to encode + * @param {vschema.IRoutingRules} message RoutingRules 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(); + 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 ShardReplication message, length delimited. Does not implicitly {@link topodata.ShardReplication.verify|verify} messages. + * Encodes the specified RoutingRules message, length delimited. Does not implicitly {@link vschema.RoutingRules.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static - * @param {topodata.IShardReplication} message ShardReplication message or plain object to encode + * @param {vschema.IRoutingRules} message RoutingRules message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReplication.encodeDelimited = function encodeDelimited(message, writer) { + RoutingRules.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReplication message from the specified reader or buffer. + * Decodes a RoutingRules message from the specified reader or buffer. * @function decode - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardReplication} ShardReplication + * @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 */ - 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(); + 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.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.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 ShardReplication message from the specified reader or buffer, length delimited. + * Decodes a RoutingRules message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardReplication} ShardReplication + * @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 */ - ShardReplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + RoutingRules.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReplication message. + * Verifies a RoutingRules message. * @function verify - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @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; + 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 ShardReplication message from a plain object. Also converts values to their respective internal types. + * Creates a RoutingRules message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static * @param {Object.} object Plain object - * @returns {topodata.ShardReplication} ShardReplication + * @returns {vschema.RoutingRules} RoutingRules */ - 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]); + 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 ShardReplication message. Also converts values to other types if specified. + * Creates a plain object from a RoutingRules message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @static - * @param {topodata.ShardReplication} message ShardReplication + * @param {vschema.RoutingRules} message RoutingRules * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReplication.toObject = function toObject(message, options) { - if (!options) options = {}; + RoutingRules.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); + 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 ShardReplication to JSON. + * Converts this RoutingRules to JSON. * @function toJSON - * @memberof topodata.ShardReplication + * @memberof vschema.RoutingRules * @instance * @returns {Object.} JSON object */ - ShardReplication.prototype.toJSON = function toJSON() { + RoutingRules.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; + return RoutingRules; })(); - 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 + 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 ShardReference. - * @memberof topodata - * @classdesc Represents a ShardReference. - * @implements IShardReference + * Constructs a new RoutingRule. + * @memberof vschema + * @classdesc Represents a RoutingRule. + * @implements IRoutingRule * @constructor - * @param {topodata.IShardReference=} [properties] Properties to set + * @param {vschema.IRoutingRule=} [properties] Properties to set */ - function ShardReference(properties) { + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * ShardReference name. - * @member {string} name - * @memberof topodata.ShardReference + * RoutingRule from_table. + * @member {string} from_table + * @memberof vschema.RoutingRule * @instance */ - ShardReference.prototype.name = ''; + RoutingRule.prototype.from_table = ""; /** - * ShardReference key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.ShardReference + * RoutingRule to_tables. + * @member {Array.} to_tables + * @memberof vschema.RoutingRule * @instance */ - ShardReference.prototype.key_range = null; + RoutingRule.prototype.to_tables = $util.emptyArray; /** - * Creates a new ShardReference instance using the specified properties. + * Creates a new RoutingRule instance using the specified properties. * @function create - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static - * @param {topodata.IShardReference=} [properties] Properties to set - * @returns {topodata.ShardReference} ShardReference instance + * @param {vschema.IRoutingRule=} [properties] Properties to set + * @returns {vschema.RoutingRule} RoutingRule instance */ - ShardReference.create = function create(properties) { - return new ShardReference(properties); + RoutingRule.create = function create(properties) { + return new RoutingRule(properties); }; /** - * Encodes the specified ShardReference message. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. + * Encodes the specified RoutingRule message. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. * @function encode - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static - * @param {topodata.IShardReference} message ShardReference message or plain object to encode + * @param {vschema.IRoutingRule} message RoutingRule 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(); + 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 ShardReference message, length delimited. Does not implicitly {@link topodata.ShardReference.verify|verify} messages. + * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link vschema.RoutingRule.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static - * @param {topodata.IShardReference} message ShardReference message or plain object to encode + * @param {vschema.IRoutingRule} message RoutingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardReference.encodeDelimited = function encodeDelimited(message, writer) { + RoutingRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardReference message from the specified reader or buffer. + * Decodes a RoutingRule message from the specified reader or buffer. * @function decode - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardReference} ShardReference + * @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 */ - 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(); + 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.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.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 ShardReference message from the specified reader or buffer, length delimited. + * Decodes a RoutingRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardReference} ShardReference + * @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 */ - ShardReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + RoutingRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardReference message. + * Verifies a RoutingRule message. * @function verify - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @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; + 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 ShardReference message from a plain object. Also converts values to their respective internal types. + * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static * @param {Object.} object Plain object - * @returns {topodata.ShardReference} ShardReference + * @returns {vschema.RoutingRule} RoutingRule */ - 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); + 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 ShardReference message. Also converts values to other types if specified. + * Creates a plain object from a RoutingRule message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @static - * @param {topodata.ShardReference} message ShardReference + * @param {vschema.RoutingRule} message RoutingRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardReference.toObject = function toObject(message, options) { - if (!options) options = {}; + RoutingRule.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.defaults) { - object.name = ''; - object.key_range = null; + 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]; } - 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. + * Converts this RoutingRule to JSON. * @function toJSON - * @memberof topodata.ShardReference + * @memberof vschema.RoutingRule * @instance * @returns {Object.} JSON object */ - ShardReference.prototype.toJSON = function toJSON() { + RoutingRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardReference; + return RoutingRule; })(); - topodata.ShardTabletControl = (function () { + vschema.Keyspace = (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 + * 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 ShardTabletControl. - * @memberof topodata - * @classdesc Represents a ShardTabletControl. - * @implements IShardTabletControl + * Constructs a new Keyspace. + * @memberof vschema + * @classdesc Represents a Keyspace. + * @implements IKeyspace * @constructor - * @param {topodata.IShardTabletControl=} [properties] Properties to set + * @param {vschema.IKeyspace=} [properties] Properties to set */ - function ShardTabletControl(properties) { + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * ShardTabletControl name. - * @member {string} name - * @memberof topodata.ShardTabletControl + * Keyspace sharded. + * @member {boolean} sharded + * @memberof vschema.Keyspace * @instance */ - ShardTabletControl.prototype.name = ''; + Keyspace.prototype.sharded = false; /** - * ShardTabletControl key_range. - * @member {topodata.IKeyRange|null|undefined} key_range - * @memberof topodata.ShardTabletControl + * Keyspace vindexes. + * @member {Object.} vindexes + * @memberof vschema.Keyspace * @instance */ - ShardTabletControl.prototype.key_range = null; + Keyspace.prototype.vindexes = $util.emptyObject; /** - * ShardTabletControl query_service_disabled. - * @member {boolean} query_service_disabled - * @memberof topodata.ShardTabletControl + * Keyspace tables. + * @member {Object.} tables + * @memberof vschema.Keyspace * @instance */ - ShardTabletControl.prototype.query_service_disabled = false; + Keyspace.prototype.tables = $util.emptyObject; /** - * Creates a new ShardTabletControl instance using the specified properties. + * 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 topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static - * @param {topodata.IShardTabletControl=} [properties] Properties to set - * @returns {topodata.ShardTabletControl} ShardTabletControl instance + * @param {vschema.IKeyspace=} [properties] Properties to set + * @returns {vschema.Keyspace} Keyspace instance */ - ShardTabletControl.create = function create(properties) { - return new ShardTabletControl(properties); + Keyspace.create = function create(properties) { + return new Keyspace(properties); }; /** - * Encodes the specified ShardTabletControl message. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. + * Encodes the specified Keyspace message. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. * @function encode - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static - * @param {topodata.IShardTabletControl} message ShardTabletControl message or plain object to encode + * @param {vschema.IKeyspace} message Keyspace 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); + 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 ShardTabletControl message, length delimited. Does not implicitly {@link topodata.ShardTabletControl.verify|verify} messages. + * Encodes the specified Keyspace message, length delimited. Does not implicitly {@link vschema.Keyspace.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static - * @param {topodata.IShardTabletControl} message ShardTabletControl message or plain object to encode + * @param {vschema.IKeyspace} message Keyspace message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShardTabletControl.encodeDelimited = function encodeDelimited(message, writer) { + Keyspace.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShardTabletControl message from the specified reader or buffer. + * Decodes a Keyspace message from the specified reader or buffer. * @function decode - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.ShardTabletControl} ShardTabletControl + * @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 */ - 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(); + 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.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.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 ShardTabletControl message from the specified reader or buffer, length delimited. + * Decodes a Keyspace message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.ShardTabletControl} ShardTabletControl + * @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 */ - ShardTabletControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Keyspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShardTabletControl message. + * Verifies a Keyspace message. * @function verify - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @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; + 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.query_service_disabled != null && message.hasOwnProperty('query_service_disabled')) - if (typeof message.query_service_disabled !== 'boolean') - return 'query_service_disabled: boolean expected'; + 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 ShardTabletControl message from a plain object. Also converts values to their respective internal types. + * Creates a Keyspace message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static * @param {Object.} object Plain object - * @returns {topodata.ShardTabletControl} ShardTabletControl + * @returns {vschema.Keyspace} Keyspace */ - 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); + 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.query_service_disabled != null) - message.query_service_disabled = Boolean(object.query_service_disabled); + 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 ShardTabletControl message. Also converts values to other types if specified. + * Creates a plain object from a Keyspace message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @static - * @param {topodata.ShardTabletControl} message ShardTabletControl + * @param {vschema.Keyspace} message Keyspace * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShardTabletControl.toObject = function toObject(message, options) { - if (!options) options = {}; + Keyspace.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; + if (options.objects || options.defaults) { + object.vindexes = {}; + object.tables = {}; + } if (options.defaults) { - object.name = ''; - object.key_range = null; - object.query_service_disabled = false; + object.sharded = false; + object.require_explicit_routing = 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; + 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 ShardTabletControl to JSON. + * Converts this Keyspace to JSON. * @function toJSON - * @memberof topodata.ShardTabletControl + * @memberof vschema.Keyspace * @instance * @returns {Object.} JSON object */ - ShardTabletControl.prototype.toJSON = function toJSON() { + Keyspace.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ShardTabletControl; + return Keyspace; })(); - topodata.SrvKeyspace = (function () { + vschema.Vindex = (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 + * 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 SrvKeyspace. - * @memberof topodata - * @classdesc Represents a SrvKeyspace. - * @implements ISrvKeyspace + * Constructs a new Vindex. + * @memberof vschema + * @classdesc Represents a Vindex. + * @implements IVindex * @constructor - * @param {topodata.ISrvKeyspace=} [properties] Properties to set + * @param {vschema.IVindex=} [properties] Properties to set */ - function SrvKeyspace(properties) { - this.partitions = []; - this.served_from = []; + 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]]; + 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 + * Vindex type. + * @member {string} type + * @memberof vschema.Vindex * @instance */ - SrvKeyspace.prototype.sharding_column_name = ''; + Vindex.prototype.type = ""; /** - * SrvKeyspace sharding_column_type. - * @member {topodata.KeyspaceIdType} sharding_column_type - * @memberof topodata.SrvKeyspace + * Vindex params. + * @member {Object.} params + * @memberof vschema.Vindex * @instance */ - SrvKeyspace.prototype.sharding_column_type = 0; + Vindex.prototype.params = $util.emptyObject; /** - * SrvKeyspace served_from. - * @member {Array.} served_from - * @memberof topodata.SrvKeyspace + * Vindex owner. + * @member {string} owner + * @memberof vschema.Vindex * @instance */ - SrvKeyspace.prototype.served_from = $util.emptyArray; + Vindex.prototype.owner = ""; /** - * Creates a new SrvKeyspace instance using the specified properties. + * Creates a new Vindex instance using the specified properties. * @function create - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static - * @param {topodata.ISrvKeyspace=} [properties] Properties to set - * @returns {topodata.SrvKeyspace} SrvKeyspace instance + * @param {vschema.IVindex=} [properties] Properties to set + * @returns {vschema.Vindex} Vindex instance */ - SrvKeyspace.create = function create(properties) { - return new SrvKeyspace(properties); + Vindex.create = function create(properties) { + return new Vindex(properties); }; /** - * Encodes the specified SrvKeyspace message. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. + * Encodes the specified Vindex message. Does not implicitly {@link vschema.Vindex.verify|verify} messages. * @function encode - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static - * @param {topodata.ISrvKeyspace} message SrvKeyspace message or plain object to encode + * @param {vschema.IVindex} message Vindex 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(); + 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 SrvKeyspace message, length delimited. Does not implicitly {@link topodata.SrvKeyspace.verify|verify} messages. + * Encodes the specified Vindex message, length delimited. Does not implicitly {@link vschema.Vindex.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static - * @param {topodata.ISrvKeyspace} message SrvKeyspace message or plain object to encode + * @param {vschema.IVindex} message Vindex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SrvKeyspace.encodeDelimited = function encodeDelimited(message, writer) { + Vindex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SrvKeyspace message from the specified reader or buffer. + * Decodes a Vindex message from the specified reader or buffer. * @function decode - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {topodata.SrvKeyspace} SrvKeyspace + * @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 */ - 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(); + 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: - 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: + 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 SrvKeyspace message from the specified reader or buffer, length delimited. + * Decodes a Vindex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.SrvKeyspace} SrvKeyspace + * @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 */ - SrvKeyspace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Vindex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SrvKeyspace message. + * Verifies a Vindex message. * @function verify - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @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; - } + 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 SrvKeyspace message from a plain object. Also converts values to their respective internal types. + * Creates a Vindex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static * @param {Object.} object Plain object - * @returns {topodata.SrvKeyspace} SrvKeyspace + * @returns {vschema.Vindex} Vindex */ - 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]); - } + 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 SrvKeyspace message. Also converts values to other types if specified. + * Creates a plain object from a Vindex message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @static - * @param {topodata.SrvKeyspace} message SrvKeyspace + * @param {vschema.Vindex} message Vindex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SrvKeyspace.toObject = function toObject(message, options) { - if (!options) options = {}; + Vindex.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.partitions = []; - object.served_from = []; - } + if (options.objects || options.defaults) + object.params = {}; if (options.defaults) { - object.sharding_column_name = ''; - object.sharding_column_type = options.enums === String ? 'UNSET' : 0; + object.type = ""; + object.owner = ""; } - 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 - ); + 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 SrvKeyspace to JSON. + * Converts this Vindex to JSON. * @function toJSON - * @memberof topodata.SrvKeyspace + * @memberof vschema.Vindex * @instance * @returns {Object.} JSON object */ - SrvKeyspace.prototype.toJSON = function toJSON() { + Vindex.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 - */ + return Vindex; + })(); - /** - * 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]]; - } + vschema.Table = (function() { - /** - * KeyspacePartition served_type. - * @member {topodata.TabletType} served_type - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - */ - KeyspacePartition.prototype.served_type = 0; + /** + * 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 + */ - /** - * KeyspacePartition shard_references. - * @member {Array.} shard_references - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - */ - KeyspacePartition.prototype.shard_references = $util.emptyArray; + /** + * 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]]; + } - /** - * KeyspacePartition shard_tablet_controls. - * @member {Array.} shard_tablet_controls - * @memberof topodata.SrvKeyspace.KeyspacePartition - * @instance - */ - KeyspacePartition.prototype.shard_tablet_controls = $util.emptyArray; + /** + * Table type. + * @member {string} type + * @memberof vschema.Table + * @instance + */ + Table.prototype.type = ""; - /** - * 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); - }; + /** + * Table column_vindexes. + * @member {Array.} column_vindexes + * @memberof vschema.Table + * @instance + */ + Table.prototype.column_vindexes = $util.emptyArray; - /** - * 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; - }; + /** + * Table auto_increment. + * @member {vschema.IAutoIncrement|null|undefined} auto_increment + * @memberof vschema.Table + * @instance + */ + Table.prototype.auto_increment = null; - /** - * 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(); - }; + /** + * Table columns. + * @member {Array.} columns + * @memberof vschema.Table + * @instance + */ + Table.prototype.columns = $util.emptyArray; - /** - * 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; - }; + /** + * 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); + }; - /** - * 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()); - }; + /** + * 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; + }; - /** - * 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; - }; + /** + * 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(); + }; - /** - * 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; + /** + * 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; } - 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] - ); - } + } + 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 (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] - ); - } + } + 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; } - return message; - }; + } + 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 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 - ); + /** + * 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 (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 - ); + } + 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]); } - return object; - }; + } + 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; + }; - /** - * 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); - }; + /** + * 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; + }; - return KeyspacePartition; - })(); + /** + * 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); + }; - 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 - */ + return Table; + })(); - /** - * 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]]; - } + vschema.ColumnVindex = (function() { - /** - * ServedFrom tablet_type. - * @member {topodata.TabletType} tablet_type - * @memberof topodata.SrvKeyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.tablet_type = 0; + /** + * 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 + */ - /** - * ServedFrom keyspace. - * @member {string} keyspace - * @memberof topodata.SrvKeyspace.ServedFrom - * @instance - */ - ServedFrom.prototype.keyspace = ''; + /** + * 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]]; + } - /** - * 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); - }; + /** + * ColumnVindex column. + * @member {string} column + * @memberof vschema.ColumnVindex + * @instance + */ + ColumnVindex.prototype.column = ""; - /** - * 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; - }; + /** + * ColumnVindex name. + * @member {string} name + * @memberof vschema.ColumnVindex + * @instance + */ + ColumnVindex.prototype.name = ""; - /** - * 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(); - }; + /** + * ColumnVindex columns. + * @member {Array.} columns + * @memberof vschema.ColumnVindex + * @instance + */ + ColumnVindex.prototype.columns = $util.emptyArray; - /** - * 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; - }; + /** + * 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); + }; - /** - * 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()); - }; + /** + * 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; + }; - /** - * 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; - }; + /** + * 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(); + }; - /** - * 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; + /** + * 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; } - if (object.keyspace != null) message.keyspace = String(object.keyspace); - return message; - }; + } + 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; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - return ServedFrom; - })(); + /** + * 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 SrvKeyspace; + return ColumnVindex; })(); - 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 + 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 CellInfo. - * @memberof topodata - * @classdesc Represents a CellInfo. - * @implements ICellInfo + * Constructs a new AutoIncrement. + * @memberof vschema + * @classdesc Represents an AutoIncrement. + * @implements IAutoIncrement * @constructor - * @param {topodata.ICellInfo=} [properties] Properties to set + * @param {vschema.IAutoIncrement=} [properties] Properties to set */ - function CellInfo(properties) { + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * CellInfo server_address. - * @member {string} server_address - * @memberof topodata.CellInfo + * AutoIncrement column. + * @member {string} column + * @memberof vschema.AutoIncrement * @instance */ - CellInfo.prototype.server_address = ''; + AutoIncrement.prototype.column = ""; /** - * CellInfo root. - * @member {string} root - * @memberof topodata.CellInfo + * AutoIncrement sequence. + * @member {string} sequence + * @memberof vschema.AutoIncrement * @instance */ - CellInfo.prototype.root = ''; + AutoIncrement.prototype.sequence = ""; /** - * Creates a new CellInfo instance using the specified properties. + * Creates a new AutoIncrement instance using the specified properties. * @function create - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @static - * @param {topodata.ICellInfo=} [properties] Properties to set - * @returns {topodata.CellInfo} CellInfo instance + * @param {vschema.IAutoIncrement=} [properties] Properties to set + * @returns {vschema.AutoIncrement} AutoIncrement instance */ - CellInfo.create = function create(properties) { - return new CellInfo(properties); + AutoIncrement.create = function create(properties) { + return new AutoIncrement(properties); }; /** - * Encodes the specified CellInfo message. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. + * Encodes the specified AutoIncrement message. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. * @function encode - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @static - * @param {topodata.ICellInfo} message CellInfo message or plain object to encode + * @param {vschema.IAutoIncrement} message AutoIncrement 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); + 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 CellInfo message, length delimited. Does not implicitly {@link topodata.CellInfo.verify|verify} messages. + * Encodes the specified AutoIncrement message, length delimited. Does not implicitly {@link vschema.AutoIncrement.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @static - * @param {topodata.ICellInfo} message CellInfo message or plain object to encode + * @param {vschema.IAutoIncrement} message AutoIncrement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellInfo.encodeDelimited = function encodeDelimited(message, writer) { + AutoIncrement.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CellInfo message from the specified reader or buffer. + * Decodes an AutoIncrement message from the specified reader or buffer. * @function decode - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @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 {vschema.AutoIncrement} AutoIncrement * @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(); + 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.server_address = reader.string(); - break; - case 2: - message.root = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.column = reader.string(); + break; + case 2: + message.sequence = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Decodes a CellInfo message from the specified reader or buffer, length delimited. + * Decodes an AutoIncrement message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.CellInfo} CellInfo + * @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 */ - CellInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + AutoIncrement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CellInfo message. + * Verifies an AutoIncrement message. * @function verify - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @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'; + 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 a CellInfo message from a plain object. Also converts values to their respective internal types. + * Creates an AutoIncrement message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @static * @param {Object.} object Plain object - * @returns {topodata.CellInfo} CellInfo + * @returns {vschema.AutoIncrement} AutoIncrement */ - 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); + 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 a CellInfo message. Also converts values to other types if specified. + * Creates a plain object from an AutoIncrement message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @static - * @param {topodata.CellInfo} message CellInfo + * @param {vschema.AutoIncrement} message AutoIncrement * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CellInfo.toObject = function toObject(message, options) { - if (!options) options = {}; + AutoIncrement.toObject = function toObject(message, options) { + if (!options) + options = {}; var object = {}; if (options.defaults) { - object.server_address = ''; - object.root = ''; + object.column = ""; + object.sequence = ""; } - 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; + 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 CellInfo to JSON. + * Converts this AutoIncrement to JSON. * @function toJSON - * @memberof topodata.CellInfo + * @memberof vschema.AutoIncrement * @instance * @returns {Object.} JSON object */ - CellInfo.prototype.toJSON = function toJSON() { + AutoIncrement.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CellInfo; + return AutoIncrement; })(); - topodata.CellsAlias = (function () { + vschema.Column = (function() { + /** - * Properties of a CellsAlias. - * @memberof topodata - * @interface ICellsAlias - * @property {Array.|null} [cells] CellsAlias cells + * Properties of a Column. + * @memberof vschema + * @interface IColumn + * @property {string|null} [name] Column name + * @property {query.Type|null} [type] Column type */ /** - * Constructs a new CellsAlias. - * @memberof topodata - * @classdesc Represents a CellsAlias. - * @implements ICellsAlias + * Constructs a new Column. + * @memberof vschema + * @classdesc Represents a Column. + * @implements IColumn * @constructor - * @param {topodata.ICellsAlias=} [properties] Properties to set + * @param {vschema.IColumn=} [properties] Properties to set */ - function CellsAlias(properties) { - this.cells = []; + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * CellsAlias cells. - * @member {Array.} cells - * @memberof topodata.CellsAlias + * Column name. + * @member {string} name + * @memberof vschema.Column * @instance */ - CellsAlias.prototype.cells = $util.emptyArray; + Column.prototype.name = ""; /** - * Creates a new CellsAlias instance using the specified properties. + * 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 topodata.CellsAlias + * @memberof vschema.Column * @static - * @param {topodata.ICellsAlias=} [properties] Properties to set - * @returns {topodata.CellsAlias} CellsAlias instance + * @param {vschema.IColumn=} [properties] Properties to set + * @returns {vschema.Column} Column instance */ - CellsAlias.create = function create(properties) { - return new CellsAlias(properties); + Column.create = function create(properties) { + return new Column(properties); }; /** - * Encodes the specified CellsAlias message. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. + * Encodes the specified Column message. Does not implicitly {@link vschema.Column.verify|verify} messages. * @function encode - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @static - * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode + * @param {vschema.IColumn} message Column 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]); + 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 CellsAlias message, length delimited. Does not implicitly {@link topodata.CellsAlias.verify|verify} messages. + * Encodes the specified Column message, length delimited. Does not implicitly {@link vschema.Column.verify|verify} messages. * @function encodeDelimited - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @static - * @param {topodata.ICellsAlias} message CellsAlias message or plain object to encode + * @param {vschema.IColumn} message Column message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CellsAlias.encodeDelimited = function encodeDelimited(message, writer) { + Column.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CellsAlias message from the specified reader or buffer. + * Decodes a Column message from the specified reader or buffer. * @function decode - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @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 {vschema.Column} Column * @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(); + 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 2: - if (!(message.cells && message.cells.length)) message.cells = []; - message.cells.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + case 1: + message.name = reader.string(); + break; + case 2: + message.type = 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 Column message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {topodata.CellsAlias} CellsAlias + * @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 */ - CellsAlias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CellsAlias message. + * Verifies a Column message. * @function verify - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @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'; - } + 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 CellsAlias message from a plain object. Also converts values to their respective internal types. + * Creates a Column message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @static * @param {Object.} object Plain object - * @returns {topodata.CellsAlias} CellsAlias + * @returns {vschema.Column} Column */ - 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]); + 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 CellsAlias message. Also converts values to other types if specified. + * Creates a plain object from a Column message. Also converts values to other types if specified. * @function toObject - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @static - * @param {topodata.CellsAlias} message CellsAlias + * @param {vschema.Column} message Column * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CellsAlias.toObject = function toObject(message, options) { - if (!options) options = {}; + Column.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) { + 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 CellsAlias to JSON. + * Converts this Column to JSON. * @function toJSON - * @memberof topodata.CellsAlias + * @memberof vschema.Column * @instance * @returns {Object.} JSON object */ - CellsAlias.prototype.toJSON = function toJSON() { + Column.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CellsAlias; + return Column; })(); - return topodata; -})(); - -$root.vttime = (function () { - /** - * Namespace vttime. - * @exports vttime - * @namespace - */ - var vttime = {}; + vschema.SrvVSchema = (function() { - vttime.Time = (function () { /** - * Properties of a Time. - * @memberof vttime - * @interface ITime - * @property {number|Long|null} [seconds] Time seconds - * @property {number|null} [nanoseconds] Time nanoseconds + * 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 Time. - * @memberof vttime - * @classdesc Represents a Time. - * @implements ITime + * Constructs a new SrvVSchema. + * @memberof vschema + * @classdesc Represents a SrvVSchema. + * @implements ISrvVSchema * @constructor - * @param {vttime.ITime=} [properties] Properties to set + * @param {vschema.ISrvVSchema=} [properties] Properties to set */ - function Time(properties) { + 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]]; + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } /** - * Time seconds. - * @member {number|Long} seconds - * @memberof vttime.Time + * SrvVSchema keyspaces. + * @member {Object.} keyspaces + * @memberof vschema.SrvVSchema * @instance */ - Time.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + SrvVSchema.prototype.keyspaces = $util.emptyObject; /** - * Time nanoseconds. - * @member {number} nanoseconds - * @memberof vttime.Time + * SrvVSchema routing_rules. + * @member {vschema.IRoutingRules|null|undefined} routing_rules + * @memberof vschema.SrvVSchema * @instance */ - Time.prototype.nanoseconds = 0; + SrvVSchema.prototype.routing_rules = null; /** - * Creates a new Time instance using the specified properties. + * Creates a new SrvVSchema instance using the specified properties. * @function create - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @static - * @param {vttime.ITime=} [properties] Properties to set - * @returns {vttime.Time} Time instance + * @param {vschema.ISrvVSchema=} [properties] Properties to set + * @returns {vschema.SrvVSchema} SrvVSchema instance */ - Time.create = function create(properties) { - return new Time(properties); + SrvVSchema.create = function create(properties) { + return new SrvVSchema(properties); }; /** - * Encodes the specified Time message. Does not implicitly {@link vttime.Time.verify|verify} messages. + * Encodes the specified SrvVSchema message. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. * @function encode - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @static - * @param {vttime.ITime} message Time message or plain object to encode + * @param {vschema.ISrvVSchema} message SrvVSchema 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); + 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 Time message, length delimited. Does not implicitly {@link vttime.Time.verify|verify} messages. + * Encodes the specified SrvVSchema message, length delimited. Does not implicitly {@link vschema.SrvVSchema.verify|verify} messages. * @function encodeDelimited - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @static - * @param {vttime.ITime} message Time message or plain object to encode + * @param {vschema.ISrvVSchema} message SrvVSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Time.encodeDelimited = function encodeDelimited(message, writer) { + SrvVSchema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Time message from the specified reader or buffer. + * Decodes a SrvVSchema message from the specified reader or buffer. * @function decode - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @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 {vschema.SrvVSchema} SrvVSchema * @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(); + 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: - message.seconds = reader.int64(); - break; - case 2: - message.nanoseconds = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + 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 Time message from the specified reader or buffer, length delimited. + * Decodes a SrvVSchema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {vttime.Time} Time + * @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 */ - Time.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) reader = new $Reader(reader); + SrvVSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Time message. + * Verifies a SrvVSchema message. * @function verify - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @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'; + 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 Time message from a plain object. Also converts values to their respective internal types. + * Creates a SrvVSchema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @static * @param {Object.} object Plain object - * @returns {vttime.Time} Time + * @returns {vschema.SrvVSchema} SrvVSchema */ - 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; + 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 Time message. Also converts values to other types if specified. + * Creates a plain object from a SrvVSchema message. Also converts values to other types if specified. * @function toObject - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @static - * @param {vttime.Time} message Time + * @param {vschema.SrvVSchema} message SrvVSchema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Time.toObject = function toObject(message, options) { - if (!options) options = {}; + SrvVSchema.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 (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.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; + if (message.routing_rules != null && message.hasOwnProperty("routing_rules")) + object.routing_rules = $root.vschema.RoutingRules.toObject(message.routing_rules, options); return object; }; /** - * Converts this Time to JSON. + * Converts this SrvVSchema to JSON. * @function toJSON - * @memberof vttime.Time + * @memberof vschema.SrvVSchema * @instance * @returns {Object.} JSON object */ - Time.prototype.toJSON = function toJSON() { + SrvVSchema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Time; + return SrvVSchema; })(); - return vttime; + return vschema; })(); module.exports = $root;