From c0c287e2d386758609f57f3efee78b18fc9d8b7d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:50:39 -0500 Subject: [PATCH 1/7] feat: Trusted Private Cloud support, use the universeDomain parameter (#1386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Trusted Private Cloud support, use the universeDomain parameter feat: auto populate UUID fields where needed fix: revert changes to streaming retries Use gapic-generator-typescript v4.4.0. PiperOrigin-RevId: 603757799 Source-Link: https://github.com/googleapis/googleapis/commit/1a45bf7393b52407188c82e63101db7dc9c72026 Source-Link: https://github.com/googleapis/googleapis-gen/commit/19ca4b45a53d00cb7bdd94b442b60bd237dfe123 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTljYTRiNDVhNTNkMDBjYjdiZGQ5NGI0NDJiNjBiZDIzN2RmZTEyMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- ...gtable_instance_admin.list_app_profiles.js | 2 +- ...igtable_instance_admin.list_hot_tablets.js | 2 +- .../v2/bigtable_table_admin.list_backups.js | 2 +- .../v2/bigtable_table_admin.list_snapshots.js | 2 +- .../v2/bigtable_table_admin.list_tables.js | 2 +- src/v2/bigtable_client.ts | 75 +++++++++++++--- src/v2/bigtable_instance_admin_client.ts | 65 ++++++++++++-- src/v2/bigtable_table_admin_client.ts | 65 ++++++++++++-- test/gapic_bigtable_instance_admin_v2.ts | 71 +++++++++++++-- test/gapic_bigtable_table_admin_v2.ts | 64 +++++++++++-- test/gapic_bigtable_v2.ts | 90 +++++++++++++------ 11 files changed, 374 insertions(+), 66 deletions(-) diff --git a/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js b/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js index 1c030307b..409c049d6 100644 --- a/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js +++ b/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js @@ -64,7 +64,7 @@ function main(parent) { }; // Run request - const iterable = await adminClient.listAppProfilesAsync(request); + const iterable = adminClient.listAppProfilesAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js b/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js index d165be90a..73eb76242 100644 --- a/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js +++ b/samples/generated/v2/bigtable_instance_admin.list_hot_tablets.js @@ -75,7 +75,7 @@ function main(parent) { }; // Run request - const iterable = await adminClient.listHotTabletsAsync(request); + const iterable = adminClient.listHotTabletsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/samples/generated/v2/bigtable_table_admin.list_backups.js b/samples/generated/v2/bigtable_table_admin.list_backups.js index fcdbbe861..1a6c3f296 100644 --- a/samples/generated/v2/bigtable_table_admin.list_backups.js +++ b/samples/generated/v2/bigtable_table_admin.list_backups.js @@ -114,7 +114,7 @@ function main(parent) { }; // Run request - const iterable = await adminClient.listBackupsAsync(request); + const iterable = adminClient.listBackupsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/samples/generated/v2/bigtable_table_admin.list_snapshots.js b/samples/generated/v2/bigtable_table_admin.list_snapshots.js index 2880f5be9..169a77cb2 100644 --- a/samples/generated/v2/bigtable_table_admin.list_snapshots.js +++ b/samples/generated/v2/bigtable_table_admin.list_snapshots.js @@ -59,7 +59,7 @@ function main(parent) { }; // Run request - const iterable = await adminClient.listSnapshotsAsync(request); + const iterable = adminClient.listSnapshotsAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/samples/generated/v2/bigtable_table_admin.list_tables.js b/samples/generated/v2/bigtable_table_admin.list_tables.js index 74552adbb..d50bbd024 100644 --- a/samples/generated/v2/bigtable_table_admin.list_tables.js +++ b/samples/generated/v2/bigtable_table_admin.list_tables.js @@ -66,7 +66,7 @@ function main(parent) { }; // Run request - const iterable = await adminClient.listTablesAsync(request); + const iterable = adminClient.listTablesAsync(request); for await (const response of iterable) { console.log(response); } diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index af08c7551..d0012edb2 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -27,6 +27,7 @@ import type { import {PassThrough} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); + /** * Client JSON configuration object, loaded from * `src/v2/bigtable_client_config.json`. @@ -48,6 +49,8 @@ export class BigtableClient { private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -105,8 +108,20 @@ export class BigtableClient { ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof BigtableClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'bigtable.' + this._universeDomain; const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + opts?.servicePath || opts?.apiEndpoint || this._servicePath; this._providedCustomServicePath = !!( opts?.servicePath || opts?.apiEndpoint ); @@ -121,7 +136,7 @@ export class BigtableClient { opts.numericEnums = true; // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; } @@ -146,10 +161,10 @@ export class BigtableClient { this.auth.useJWTAccessWithScope = true; // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; + this.auth.defaultServicePath = this._servicePath; // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { + if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } @@ -189,28 +204,28 @@ export class BigtableClient { readRows: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ true + /* gaxStreamingRetries: */ false ), sampleRowKeys: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ true + /* gaxStreamingRetries: */ false ), mutateRows: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ true + /* gaxStreamingRetries: */ false ), generateInitialChangeStreamPartitions: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ true + /* gaxStreamingRetries: */ false ), readChangeStream: new this._gaxModule.StreamDescriptor( this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, - /* gaxStreamingRetries: */ true + /* gaxStreamingRetries: */ false ), }; @@ -317,21 +332,61 @@ export class BigtableClient { /** * The DNS address for this API service. + * @deprecated * @returns {string} The DNS address for this service. */ static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'bigtable.googleapis.com'; } /** - * The DNS address for this API service - same as servicePath(), + * The DNS address for this API service - same as servicePath, * exists for compatibility reasons. + * @deprecated * @returns {string} The DNS address for this service. */ static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'bigtable.googleapis.com'; } + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get servicePath() { + return this._servicePath; + } + + /** + * The DNS address for this API service - same as servicePath(). + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + /** * The port for this API service. * @returns {number} The default port for this service. diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index eb44d7581..1e4fb9b05 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -31,6 +31,7 @@ import type { import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); + /** * Client JSON configuration object, loaded from * `src/v2/bigtable_instance_admin_client_config.json`. @@ -54,6 +55,8 @@ export class BigtableInstanceAdminClient { private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -113,8 +116,20 @@ export class BigtableInstanceAdminClient { // Ensure that options include all the required fields. const staticMembers = this .constructor as typeof BigtableInstanceAdminClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'bigtableadmin.' + this._universeDomain; const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + opts?.servicePath || opts?.apiEndpoint || this._servicePath; this._providedCustomServicePath = !!( opts?.servicePath || opts?.apiEndpoint ); @@ -129,7 +144,7 @@ export class BigtableInstanceAdminClient { opts.numericEnums = true; // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; } @@ -154,10 +169,10 @@ export class BigtableInstanceAdminClient { this.auth.useJWTAccessWithScope = true; // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; + this.auth.defaultServicePath = this._servicePath; // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { + if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } @@ -435,21 +450,61 @@ export class BigtableInstanceAdminClient { /** * The DNS address for this API service. + * @deprecated * @returns {string} The DNS address for this service. */ static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'bigtableadmin.googleapis.com'; } /** - * The DNS address for this API service - same as servicePath(), + * The DNS address for this API service - same as servicePath, * exists for compatibility reasons. + * @deprecated * @returns {string} The DNS address for this service. */ static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'bigtableadmin.googleapis.com'; } + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get servicePath() { + return this._servicePath; + } + + /** + * The DNS address for this API service - same as servicePath(). + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + /** * The port for this API service. * @returns {number} The default port for this service. diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index 46940c6f9..9e6132174 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -31,6 +31,7 @@ import type { import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); + /** * Client JSON configuration object, loaded from * `src/v2/bigtable_table_admin_client_config.json`. @@ -56,6 +57,8 @@ export class BigtableTableAdminClient { private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; auth: gax.GoogleAuth; descriptors: Descriptors = { page: {}, @@ -114,8 +117,20 @@ export class BigtableTableAdminClient { ) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof BigtableTableAdminClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'bigtableadmin.' + this._universeDomain; const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + opts?.servicePath || opts?.apiEndpoint || this._servicePath; this._providedCustomServicePath = !!( opts?.servicePath || opts?.apiEndpoint ); @@ -130,7 +145,7 @@ export class BigtableTableAdminClient { opts.numericEnums = true; // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + if (servicePath !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; } @@ -155,10 +170,10 @@ export class BigtableTableAdminClient { this.auth.useJWTAccessWithScope = true; // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; + this.auth.defaultServicePath = this._servicePath; // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { + if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } @@ -455,21 +470,61 @@ export class BigtableTableAdminClient { /** * The DNS address for this API service. + * @deprecated * @returns {string} The DNS address for this service. */ static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'bigtableadmin.googleapis.com'; } /** - * The DNS address for this API service - same as servicePath(), + * The DNS address for this API service - same as servicePath, * exists for compatibility reasons. + * @deprecated * @returns {string} The DNS address for this service. */ static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } return 'bigtableadmin.googleapis.com'; } + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get servicePath() { + return this._servicePath; + } + + /** + * The DNS address for this API service - same as servicePath(). + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + /** * The port for this API service. * @returns {number} The default port for this service. diff --git a/test/gapic_bigtable_instance_admin_v2.ts b/test/gapic_bigtable_instance_admin_v2.ts index 25b31106d..cf8180226 100644 --- a/test/gapic_bigtable_instance_admin_v2.ts +++ b/test/gapic_bigtable_instance_admin_v2.ts @@ -162,15 +162,74 @@ function stubAsyncIterationCall( describe('v2.BigtableInstanceAdminClient', () => { describe('Common methods', () => { it('has servicePath', () => { - const servicePath = - bigtableinstanceadminModule.v2.BigtableInstanceAdminClient.servicePath; - assert(servicePath); + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); }); it('has apiEndpoint', () => { - const apiEndpoint = - bigtableinstanceadminModule.v2.BigtableInstanceAdminClient.apiEndpoint; - assert(apiEndpoint); + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + bigtableinstanceadminModule.v2.BigtableInstanceAdminClient + .servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + bigtableinstanceadminModule.v2.BigtableInstanceAdminClient + .apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets servicePath according to universe domain camelCase', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universeDomain: 'example.com', + }); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + + it('sets servicePath according to universe domain snakeCase', () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universe_domain: 'example.com', + }); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); }); it('has port', () => { diff --git a/test/gapic_bigtable_table_admin_v2.ts b/test/gapic_bigtable_table_admin_v2.ts index fe44c03d2..2c7094a47 100644 --- a/test/gapic_bigtable_table_admin_v2.ts +++ b/test/gapic_bigtable_table_admin_v2.ts @@ -162,15 +162,67 @@ function stubAsyncIterationCall( describe('v2.BigtableTableAdminClient', () => { describe('Common methods', () => { it('has servicePath', () => { - const servicePath = - bigtabletableadminModule.v2.BigtableTableAdminClient.servicePath; - assert(servicePath); + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); }); it('has apiEndpoint', () => { - const apiEndpoint = - bigtabletableadminModule.v2.BigtableTableAdminClient.apiEndpoint; - assert(apiEndpoint); + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + bigtabletableadminModule.v2.BigtableTableAdminClient.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + bigtabletableadminModule.v2.BigtableTableAdminClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets servicePath according to universe domain camelCase', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universeDomain: 'example.com', + }); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + + it('sets servicePath according to universe domain snakeCase', () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universe_domain: 'example.com', + }); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); }); it('has port', () => { diff --git a/test/gapic_bigtable_v2.ts b/test/gapic_bigtable_v2.ts index 1914bd0da..06cc456ea 100644 --- a/test/gapic_bigtable_v2.ts +++ b/test/gapic_bigtable_v2.ts @@ -90,13 +90,65 @@ function stubServerStreamingCall( describe('v2.BigtableClient', () => { describe('Common methods', () => { it('has servicePath', () => { - const servicePath = bigtableModule.v2.BigtableClient.servicePath; - assert(servicePath); + const client = new bigtableModule.v2.BigtableClient(); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtable.googleapis.com'); }); it('has apiEndpoint', () => { - const apiEndpoint = bigtableModule.v2.BigtableClient.apiEndpoint; - assert(apiEndpoint); + const client = new bigtableModule.v2.BigtableClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtable.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new bigtableModule.v2.BigtableClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = bigtableModule.v2.BigtableClient.servicePath; + assert.strictEqual(servicePath, 'bigtable.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = bigtableModule.v2.BigtableClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigtable.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets servicePath according to universe domain camelCase', () => { + const client = new bigtableModule.v2.BigtableClient({ + universeDomain: 'example.com', + }); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtable.example.com'); + }); + + it('sets servicePath according to universe domain snakeCase', () => { + const client = new bigtableModule.v2.BigtableClient({ + universe_domain: 'example.com', + }); + const servicePath = client.servicePath; + assert.strictEqual(servicePath, 'bigtable.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new bigtableModule.v2.BigtableClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); }); it('has port', () => { @@ -750,11 +802,7 @@ describe('v2.BigtableClient', () => { const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.readRows(request, { - retry: { - shouldRetryFn: () => { - return false; - }, - }, + retryRequestOptions: {noResponseRetries: 0}, }); const promise = new Promise((resolve, reject) => { stream.on( @@ -867,11 +915,7 @@ describe('v2.BigtableClient', () => { const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.sampleRowKeys(request, { - retry: { - shouldRetryFn: () => { - return false; - }, - }, + retryRequestOptions: {noResponseRetries: 0}, }); const promise = new Promise((resolve, reject) => { stream.on( @@ -984,11 +1028,7 @@ describe('v2.BigtableClient', () => { const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.mutateRows(request, { - retry: { - shouldRetryFn: () => { - return false; - }, - }, + retryRequestOptions: {noResponseRetries: 0}, }); const promise = new Promise((resolve, reject) => { stream.on( @@ -1112,11 +1152,7 @@ describe('v2.BigtableClient', () => { const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.generateInitialChangeStreamPartitions(request, { - retry: { - shouldRetryFn: () => { - return false; - }, - }, + retryRequestOptions: {noResponseRetries: 0}, }); const promise = new Promise((resolve, reject) => { stream.on( @@ -1240,11 +1276,7 @@ describe('v2.BigtableClient', () => { const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.readChangeStream(request, { - retry: { - shouldRetryFn: () => { - return false; - }, - }, + retryRequestOptions: {noResponseRetries: 0}, }); const promise = new Promise((resolve, reject) => { stream.on( From 1a6f59afd238ccda4427251cbe0c71c8db37568e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:17:07 -0500 Subject: [PATCH 2/7] fix: extend timeouts for deleting snapshots, backups and tables (#1387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: update gapic-generator-typescript to v4.4.1 PiperOrigin-RevId: 604765466 Source-Link: https://github.com/googleapis/googleapis/commit/40203ca1880849480bbff7b8715491060bbccdf1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/07b7f3dad8aa1912d4acdcfd6365bb4236e4b54b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDdiN2YzZGFkOGFhMTkxMmQ0YWNkY2ZkNjM2NWJiNDIzNmU0YjU0YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: extend timeouts for deleting snapshots, backups and tables PiperOrigin-RevId: 605388988 Source-Link: https://github.com/googleapis/googleapis/commit/fbcfef09510b842774530989889ed1584a8b5acb Source-Link: https://github.com/googleapis/googleapis-gen/commit/716b6e6a6a0e8c87a48a86e31272a2826f2df38c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzE2YjZlNmE2YTBlOGM4N2E0OGE4NmUzMTI3MmEyODI2ZjJkZjM4YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- src/v2/bigtable_client.ts | 15 +++------------ src/v2/bigtable_instance_admin_client.ts | 15 +++------------ src/v2/bigtable_table_admin_client.ts | 15 +++------------ src/v2/bigtable_table_admin_client_config.json | 6 +++--- test/gapic_bigtable_instance_admin_v2.ts | 15 ++++----------- test/gapic_bigtable_table_admin_v2.ts | 14 ++++---------- test/gapic_bigtable_v2.ts | 14 ++++---------- 7 files changed, 24 insertions(+), 70 deletions(-) diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index d0012edb2..83102ce94 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -332,7 +332,7 @@ export class BigtableClient { /** * The DNS address for this API service. - * @deprecated + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath() { @@ -349,9 +349,8 @@ export class BigtableClient { } /** - * The DNS address for this API service - same as servicePath, - * exists for compatibility reasons. - * @deprecated + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint() { @@ -371,14 +370,6 @@ export class BigtableClient { * The DNS address for this API service. * @returns {string} The DNS address for this service. */ - get servicePath() { - return this._servicePath; - } - - /** - * The DNS address for this API service - same as servicePath(). - * @returns {string} The DNS address for this service. - */ get apiEndpoint() { return this._servicePath; } diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index 1e4fb9b05..b67984c7f 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -450,7 +450,7 @@ export class BigtableInstanceAdminClient { /** * The DNS address for this API service. - * @deprecated + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath() { @@ -467,9 +467,8 @@ export class BigtableInstanceAdminClient { } /** - * The DNS address for this API service - same as servicePath, - * exists for compatibility reasons. - * @deprecated + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint() { @@ -489,14 +488,6 @@ export class BigtableInstanceAdminClient { * The DNS address for this API service. * @returns {string} The DNS address for this service. */ - get servicePath() { - return this._servicePath; - } - - /** - * The DNS address for this API service - same as servicePath(). - * @returns {string} The DNS address for this service. - */ get apiEndpoint() { return this._servicePath; } diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index 9e6132174..8ca05f513 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -470,7 +470,7 @@ export class BigtableTableAdminClient { /** * The DNS address for this API service. - * @deprecated + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath() { @@ -487,9 +487,8 @@ export class BigtableTableAdminClient { } /** - * The DNS address for this API service - same as servicePath, - * exists for compatibility reasons. - * @deprecated + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint() { @@ -509,14 +508,6 @@ export class BigtableTableAdminClient { * The DNS address for this API service. * @returns {string} The DNS address for this service. */ - get servicePath() { - return this._servicePath; - } - - /** - * The DNS address for this API service - same as servicePath(). - * @returns {string} The DNS address for this service. - */ get apiEndpoint() { return this._servicePath; } diff --git a/src/v2/bigtable_table_admin_client_config.json b/src/v2/bigtable_table_admin_client_config.json index 5ed77e65a..8ddb3cd4c 100644 --- a/src/v2/bigtable_table_admin_client_config.json +++ b/src/v2/bigtable_table_admin_client_config.json @@ -53,7 +53,7 @@ "retry_params_name": "default" }, "DeleteTable": { - "timeout_millis": 60000, + "timeout_millis": 300000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -96,7 +96,7 @@ "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "DeleteSnapshot": { - "timeout_millis": 60000, + "timeout_millis": 300000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -116,7 +116,7 @@ "retry_params_name": "default" }, "DeleteBackup": { - "timeout_millis": 60000, + "timeout_millis": 300000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, diff --git a/test/gapic_bigtable_instance_admin_v2.ts b/test/gapic_bigtable_instance_admin_v2.ts index cf8180226..a54590546 100644 --- a/test/gapic_bigtable_instance_admin_v2.ts +++ b/test/gapic_bigtable_instance_admin_v2.ts @@ -161,13 +161,6 @@ function stubAsyncIterationCall( describe('v2.BigtableInstanceAdminClient', () => { describe('Common methods', () => { - it('has servicePath', () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); - const servicePath = client.servicePath; - assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); - }); - it('has apiEndpoint', () => { const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); @@ -206,21 +199,21 @@ describe('v2.BigtableInstanceAdminClient', () => { stub.restore(); }); } - it('sets servicePath according to universe domain camelCase', () => { + it('sets apiEndpoint according to universe domain camelCase', () => { const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ universeDomain: 'example.com', }); - const servicePath = client.servicePath; + const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); - it('sets servicePath according to universe domain snakeCase', () => { + it('sets apiEndpoint according to universe domain snakeCase', () => { const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ universe_domain: 'example.com', }); - const servicePath = client.servicePath; + const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); it('does not allow setting both universeDomain and universe_domain', () => { diff --git a/test/gapic_bigtable_table_admin_v2.ts b/test/gapic_bigtable_table_admin_v2.ts index 2c7094a47..90e5b1801 100644 --- a/test/gapic_bigtable_table_admin_v2.ts +++ b/test/gapic_bigtable_table_admin_v2.ts @@ -161,12 +161,6 @@ function stubAsyncIterationCall( describe('v2.BigtableTableAdminClient', () => { describe('Common methods', () => { - it('has servicePath', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); - const servicePath = client.servicePath; - assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); - }); - it('has apiEndpoint', () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); const apiEndpoint = client.apiEndpoint; @@ -201,19 +195,19 @@ describe('v2.BigtableTableAdminClient', () => { stub.restore(); }); } - it('sets servicePath according to universe domain camelCase', () => { + it('sets apiEndpoint according to universe domain camelCase', () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ universeDomain: 'example.com', }); - const servicePath = client.servicePath; + const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); - it('sets servicePath according to universe domain snakeCase', () => { + it('sets apiEndpoint according to universe domain snakeCase', () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ universe_domain: 'example.com', }); - const servicePath = client.servicePath; + const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); it('does not allow setting both universeDomain and universe_domain', () => { diff --git a/test/gapic_bigtable_v2.ts b/test/gapic_bigtable_v2.ts index 06cc456ea..eae52474a 100644 --- a/test/gapic_bigtable_v2.ts +++ b/test/gapic_bigtable_v2.ts @@ -89,12 +89,6 @@ function stubServerStreamingCall( describe('v2.BigtableClient', () => { describe('Common methods', () => { - it('has servicePath', () => { - const client = new bigtableModule.v2.BigtableClient(); - const servicePath = client.servicePath; - assert.strictEqual(servicePath, 'bigtable.googleapis.com'); - }); - it('has apiEndpoint', () => { const client = new bigtableModule.v2.BigtableClient(); const apiEndpoint = client.apiEndpoint; @@ -127,19 +121,19 @@ describe('v2.BigtableClient', () => { stub.restore(); }); } - it('sets servicePath according to universe domain camelCase', () => { + it('sets apiEndpoint according to universe domain camelCase', () => { const client = new bigtableModule.v2.BigtableClient({ universeDomain: 'example.com', }); - const servicePath = client.servicePath; + const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtable.example.com'); }); - it('sets servicePath according to universe domain snakeCase', () => { + it('sets apiEndpoint according to universe domain snakeCase', () => { const client = new bigtableModule.v2.BigtableClient({ universe_domain: 'example.com', }); - const servicePath = client.servicePath; + const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtable.example.com'); }); it('does not allow setting both universeDomain and universe_domain', () => { From 94a21b404d7683ad80edc6bb5a2d83f27a96cd88 Mon Sep 17 00:00:00 2001 From: danieljbruce Date: Wed, 10 Apr 2024 09:34:35 -0400 Subject: [PATCH 3/7] test: Grpc version change bug (#1398) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * run the linter * Do not use stream.destroy. Emit an error instead. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: Grpc version change bug --------- Co-authored-by: Owl Bot --- protos/protos.d.ts | 9 +++++++ protos/protos.js | 53 ++++++++++++++++++++++++++++++++++---- protos/protos.json | 26 ++++++++++++++++++- src/row.ts | 16 ++++++------ test/utils/readRowsImpl.ts | 2 +- 5 files changed, 91 insertions(+), 15 deletions(-) diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 651944bae..fd3f019cb 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -17780,6 +17780,9 @@ export namespace google { /** Publishing protoReferenceDocumentationUri */ protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); } /** Represents a Publishing. */ @@ -17821,6 +17824,9 @@ export namespace google { /** Publishing protoReferenceDocumentationUri. */ public protoReferenceDocumentationUri: string; + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + /** * Creates a new Publishing instance using the specified properties. * @param [properties] Properties to set @@ -22238,6 +22244,9 @@ export namespace google { /** ServiceOptions .google.api.oauthScopes */ ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); } /** Represents a ServiceOptions. */ diff --git a/protos/protos.js b/protos/protos.js index 8727cccf1..38f00d1a0 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -42925,6 +42925,7 @@ * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization * @property {Array.|null} [librarySettings] Publishing librarySettings * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri */ /** @@ -43025,6 +43026,14 @@ */ Publishing.prototype.protoReferenceDocumentationUri = ""; + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + /** * Creates a new Publishing instance using the specified properties. * @function create @@ -43072,6 +43081,8 @@ $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); return writer; }; @@ -43152,6 +43163,10 @@ message.protoReferenceDocumentationUri = reader.string(); break; } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -43244,6 +43259,9 @@ if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) if (!$util.isString(message.protoReferenceDocumentationUri)) return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; return null; }; @@ -43338,6 +43356,8 @@ } if (object.protoReferenceDocumentationUri != null) message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); return message; }; @@ -43367,6 +43387,7 @@ object.docTagPrefix = ""; object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; } if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; @@ -43397,6 +43418,8 @@ } if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; return object; }; @@ -53571,12 +53594,9 @@ if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; @@ -55422,6 +55442,7 @@ * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion */ /** @@ -55480,6 +55501,14 @@ */ ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + /** * Creates a new ServiceOptions instance using the specified properties. * @function create @@ -55515,6 +55544,8 @@ writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); return writer; }; @@ -55571,6 +55602,10 @@ message[".google.api.oauthScopes"] = reader.string(); break; } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -55629,6 +55664,9 @@ if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) if (!$util.isString(message[".google.api.oauthScopes"])) return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; return null; }; @@ -55665,6 +55703,8 @@ message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); if (object[".google.api.oauthScopes"] != null) message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); return message; }; @@ -55688,6 +55728,7 @@ object.features = null; object[".google.api.defaultHost"] = ""; object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -55702,6 +55743,8 @@ object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; return object; }; diff --git a/protos/protos.json b/protos/protos.json index c31f1ff66..8d59140e2 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -4596,6 +4596,11 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, "CommonLanguageSettings": { "fields": { "referenceDocsUri": { @@ -4704,6 +4709,10 @@ "protoReferenceDocumentationUri": { "type": "string", "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 } } }, @@ -4879,7 +4888,10 @@ "rule": "repeated", "type": "google.api.FieldBehavior", "id": 1052, - "extend": "google.protobuf.FieldOptions" + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } }, "FieldBehavior": { "values": { @@ -6103,9 +6115,21 @@ 1001, 1001 ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], [ 9995, 9999 + ], + [ + 10000, + 10000 ] ], "reserved": [ diff --git a/src/row.ts b/src/row.ts index 457f1c92c..a2a9368f5 100644 --- a/src/row.ts +++ b/src/row.ts @@ -705,14 +705,14 @@ export class Row { !Array.isArray(columnsOrOptionsOrCallback) ? columnsOrOptionsOrCallback : typeof optionsOrCallback === 'object' - ? optionsOrCallback - : {}; + ? optionsOrCallback + : {}; const callback = typeof columnsOrOptionsOrCallback === 'function' ? columnsOrOptionsOrCallback : typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb!; + ? optionsOrCallback + : cb!; let filter; columns = arrify(columns); @@ -864,14 +864,14 @@ export class Row { typeof valueOrOptionsOrCallback === 'object' ? valueOrOptionsOrCallback : typeof optionsOrCallback === 'object' - ? optionsOrCallback - : {}; + ? optionsOrCallback + : {}; const callback = typeof valueOrOptionsOrCallback === 'function' ? valueOrOptionsOrCallback : typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb!; + ? optionsOrCallback + : cb!; const reqOpts = { column, diff --git a/test/utils/readRowsImpl.ts b/test/utils/readRowsImpl.ts index 3f11dce23..b103bb54e 100644 --- a/test/utils/readRowsImpl.ts +++ b/test/utils/readRowsImpl.ts @@ -272,7 +272,7 @@ export function readRowsImpl( errorAfterChunkNo = undefined; // do not send error for the second time const error = new GoogleError('Uh oh'); error.code = Status.ABORTED; - stream.destroy(error); + stream.emit('error', error); cancelled = true; break; } From 17838eda19b001e322765c33a83a756eeeb68963 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:58:32 -0400 Subject: [PATCH 4/7] feat: publish Automated Backups protos (#1391) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Cloud Bigtable Authorized Views admin APIs protos PiperOrigin-RevId: 612537460 Source-Link: https://github.com/googleapis/googleapis/commit/b98fe7ff808454e9d11a83946f40259ea9c6a63b Source-Link: https://github.com/googleapis/googleapis-gen/commit/03d9b5c5517cf9123f120461180ebdd387a47bcc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDNkOWI1YzU1MTdjZjkxMjNmMTIwNDYxMTgwZWJkZDM4N2E0N2JjYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add authorized view bindings to Cloud Bigtable data APIs and messages docs: The field `table_name` in message `.google.bigtable.v2.ReadRowsRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.SampleRowKeysRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.MutateRowRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.MutateRowsRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.CheckAndMutateRowRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.ReadModifyWriteRowRequest` is changed from required to optional PiperOrigin-RevId: 612537984 Source-Link: https://github.com/googleapis/googleapis/commit/6465963c92930626473457717ff697aeb1bf4a12 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f4a996071801f559bb6f4d0c99bb9a3c0ecf4844 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRhOTk2MDcxODAxZjU1OWJiNmY0ZDBjOTliYjlhM2MwZWNmNDg0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Publish new bigtable APIs for types and aggregates Bigtable aggregates will allow users to configure column families whose cells accumulate values via an aggregation function rather than simply overwrite them PiperOrigin-RevId: 613716423 Source-Link: https://github.com/googleapis/googleapis/commit/66fc31d257cabb2d4462ce3149da9e3a232b3ad1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b983c8f87e6643d9a74d7b8183d66349943b436e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjk4M2M4Zjg3ZTY2NDNkOWE3NGQ3YjgxODNkNjYzNDk5NDNiNDM2ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add Data Boost configurations to admin API PiperOrigin-RevId: 617925342 Source-Link: https://github.com/googleapis/googleapis/commit/6f289d775912966eb0cf04bda91e5e355c998d30 Source-Link: https://github.com/googleapis/googleapis-gen/commit/92da6d5d435af533f726a97bcfff3c717832c877 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTJkYTZkNWQ0MzVhZjUzM2Y3MjZhOTdiY2ZmZjNjNzE3ODMyYzg3NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: support GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable Use gapic-generator-typescript v4.5.0. PiperOrigin-RevId: 619286536 Source-Link: https://github.com/googleapis/googleapis/commit/f8dae413984ae9e748fa9369c3ffa1239036d1a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a5fdd28a50cb9f4adfffc599ee1073b8c8d7151b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTVmZGQyOGE1MGNiOWY0YWRmZmZjNTk5ZWUxMDczYjhjOGQ3MTUxYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add feature flag for client side metrics PiperOrigin-RevId: 619540187 Source-Link: https://github.com/googleapis/googleapis/commit/cbe62016a4eb24e71186899b79b9a4736f858653 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1587174866b7ab761aed1dbfb9588f5b36ee1590 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTU4NzE3NDg2NmI3YWI3NjFhZWQxZGJmYjk1ODhmNWIzNmVlMTU5MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: publish Automated Backups protos PiperOrigin-RevId: 620381983 Source-Link: https://github.com/googleapis/googleapis/commit/a70aa2c04ddad801a518be4f5b67345cf758a6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/e3fb57f9dd4a10b6c20359ec92a72e87631991b8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTNmYjU3ZjlkZDRhMTBiNmMyMDM1OWVjOTJhNzJlODc2MzE5OTFiOCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- .../admin/v2/bigtable_table_admin.proto | 238 + .../google/bigtable/admin/v2/instance.proto | 33 + protos/google/bigtable/admin/v2/table.proto | 105 + protos/google/bigtable/admin/v2/types.proto | 149 + protos/google/bigtable/v2/bigtable.proto | 163 +- protos/google/bigtable/v2/data.proto | 53 +- protos/google/bigtable/v2/feature_flags.proto | 3 + protos/protos.d.ts | 4802 +++++-- protos/protos.js | 11853 ++++++++++++---- protos/protos.json | 783 +- .../v2/bigtable.check_and_mutate_row.js | 15 +- samples/generated/v2/bigtable.mutate_row.js | 15 +- samples/generated/v2/bigtable.mutate_rows.js | 14 +- .../v2/bigtable.read_modify_write_row.js | 15 +- samples/generated/v2/bigtable.read_rows.js | 11 +- .../generated/v2/bigtable.sample_row_keys.js | 12 +- .../bigtable_table_admin.check_consistency.js | 12 + ...able_table_admin.create_authorized_view.js | 77 + ...able_table_admin.delete_authorized_view.js | 70 + ...igtable_table_admin.get_authorized_view.js | 68 + ...table_table_admin.list_authorized_views.js | 84 + ...able_table_admin.update_authorized_view.js | 80 + ...pet_metadata_google.bigtable.admin.v2.json | 246 +- .../snippet_metadata_google.bigtable.v2.json | 36 +- src/v2/bigtable_client.ts | 283 +- src/v2/bigtable_instance_admin_client.ts | 93 +- .../bigtable_instance_admin_proto_list.json | 3 +- src/v2/bigtable_table_admin_client.ts | 1077 +- .../bigtable_table_admin_client_config.json | 20 + src/v2/bigtable_table_admin_proto_list.json | 3 +- src/v2/gapic_metadata.json | 54 + test/gapic_bigtable_instance_admin_v2.ts | 117 +- test/gapic_bigtable_table_admin_v2.ts | 1745 ++- test/gapic_bigtable_v2.ts | 261 +- 34 files changed, 18645 insertions(+), 3948 deletions(-) create mode 100644 protos/google/bigtable/admin/v2/types.proto create mode 100644 samples/generated/v2/bigtable_table_admin.create_authorized_view.js create mode 100644 samples/generated/v2/bigtable_table_admin.delete_authorized_view.js create mode 100644 samples/generated/v2/bigtable_table_admin.get_authorized_view.js create mode 100644 samples/generated/v2/bigtable_table_admin.list_authorized_views.js create mode 100644 samples/generated/v2/bigtable_table_admin.update_authorized_view.js diff --git a/protos/google/bigtable/admin/v2/bigtable_table_admin.proto b/protos/google/bigtable/admin/v2/bigtable_table_admin.proto index 62cd7d655..9fe63a273 100644 --- a/protos/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/protos/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -136,6 +136,61 @@ service BigtableTableAdmin { }; } + // Creates a new AuthorizedView in a table. + rpc CreateAuthorizedView(CreateAuthorizedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews" + body: "authorized_view" + }; + option (google.api.method_signature) = + "parent,authorized_view,authorized_view_id"; + option (google.longrunning.operation_info) = { + response_type: "AuthorizedView" + metadata_type: "CreateAuthorizedViewMetadata" + }; + } + + // Lists all AuthorizedViews from a specific table. + rpc ListAuthorizedViews(ListAuthorizedViewsRequest) + returns (ListAuthorizedViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information from a specified AuthorizedView. + rpc GetAuthorizedView(GetAuthorizedViewRequest) returns (AuthorizedView) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an AuthorizedView in a table. + rpc UpdateAuthorizedView(UpdateAuthorizedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}" + body: "authorized_view" + }; + option (google.api.method_signature) = "authorized_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AuthorizedView" + metadata_type: "UpdateAuthorizedViewMetadata" + }; + } + + // Permanently deletes a specified AuthorizedView. + rpc DeleteAuthorizedView(DeleteAuthorizedViewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + }; + option (google.api.method_signature) = "name"; + } + // Performs a series of column family modifications on the specified table. // Either all or none of the modifications will occur before this method // returns, but data requests received prior to that point may see a table @@ -716,6 +771,12 @@ message ModifyColumnFamiliesRequest { // family exists. bool drop = 4; } + + // Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + // mod should be updated, ignored for other modification types. If unset or + // empty, we treat it as updating `gc_rule` to be backward compatible. + google.protobuf.FieldMask update_mask = 6 + [(google.api.field_behavior) = OPTIONAL]; } // Required. The unique name of the table whose families should be modified. @@ -775,8 +836,30 @@ message CheckConsistencyRequest { // Required. The token created using GenerateConsistencyToken for the Table. string consistency_token = 2 [(google.api.field_behavior) = REQUIRED]; + + // Which type of read needs to consistently observe which type of write? + // Default: `standard_read_remote_writes` + oneof mode { + // Checks that reads using an app profile with `StandardIsolation` can + // see all writes committed before the token was created, even if the + // read and write target different clusters. + StandardReadRemoteWrites standard_read_remote_writes = 3; + + // Checks that reads using an app profile with `DataBoostIsolationReadOnly` + // can see all writes committed before the token was created, but only if + // the read and write target the same cluster. + DataBoostReadLocalWrites data_boost_read_local_writes = 4; + } } +// Checks that all writes before the consistency token was generated are +// replicated in every cluster and readable. +message StandardReadRemoteWrites {} + +// Checks that all writes before the consistency token was generated in the same +// cluster are readable by Databoost. +message DataBoostReadLocalWrites {} + // Response message for // [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency] message CheckConsistencyResponse { @@ -1194,3 +1277,158 @@ message CopyBackupMetadata { // operation. OperationProgress progress = 3; } + +// The request for +// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView] +message CreateAuthorizedViewRequest { + // Required. This is the name of the table the AuthorizedView belongs to. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Required. The id of the AuthorizedView to create. This AuthorizedView must + // not already exist. The `authorized_view_id` appended to `parent` forms the + // full AuthorizedView name of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + string authorized_view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AuthorizedView to create. + AuthorizedView authorized_view = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by CreateAuthorizedView. +message CreateAuthorizedViewMetadata { + // The request that prompted the initiation of this CreateInstance operation. + CreateAuthorizedViewRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] +message ListAuthorizedViewsRequest { + // Required. The unique name of the table for which AuthorizedViews should be + // listed. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. Maximum number of results per page. + // + // A page_size of zero lets the server choose the number of items to return. + // A page_size which is strictly positive will return at most that many items. + // A negative page_size will cause an error. + // + // Following the first request, subsequent paginated calls are not required + // to pass a page_size. If a page_size is set in subsequent calls, it must + // match the page_size given in the first request. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of `next_page_token` returned by a previous call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource_view to be applied to the returned views' fields. + // Default to NAME_ONLY. + AuthorizedView.ResponseView view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews] +message ListAuthorizedViewsResponse { + // The AuthorizedViews present in the requested table. + repeated AuthorizedView authorized_views = 1; + + // Set if not all tables could be returned in a single response. + // Pass this value to `page_token` in another request to get the next + // page of results. + string next_page_token = 2; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView] +message GetAuthorizedViewRequest { + // Required. The unique name of the requested AuthorizedView. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. The resource_view to be applied to the returned AuthorizedView's + // fields. Default to BASIC. + AuthorizedView.ResponseView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for +// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. +message UpdateAuthorizedViewRequest { + // Required. The AuthorizedView to update. The `name` in `authorized_view` is + // used to identify the AuthorizedView. AuthorizedView name must in this + // format + // projects//instances//tables//authorizedViews/ + AuthorizedView authorized_view = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + // A mask specifying which fields in the AuthorizedView resource should be + // updated. This mask is relative to the AuthorizedView resource, not to the + // request message. A field will be overwritten if it is in the mask. If + // empty, all fields set in the request will be overwritten. A special value + // `*` means to overwrite all fields (including fields not set in the + // request). + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, ignore the safety checks when updating the + // AuthorizedView. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata for the google.longrunning.Operation returned by +// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]. +message UpdateAuthorizedViewMetadata { + // The request that prompted the initiation of this UpdateAuthorizedView + // operation. + UpdateAuthorizedViewRequest original_request = 1; + + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 2; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 3; +} + +// Request message for +// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView] +message DeleteAuthorizedViewRequest { + // Required. The unique name of the AuthorizedView to be deleted. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + + // Optional. The current etag of the AuthorizedView. + // If an etag is provided and does not match the current etag of the + // AuthorizedView, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/protos/google/bigtable/admin/v2/instance.proto b/protos/google/bigtable/admin/v2/instance.proto index 950d9f488..fc7c2b7c9 100644 --- a/protos/google/bigtable/admin/v2/instance.proto +++ b/protos/google/bigtable/admin/v2/instance.proto @@ -297,6 +297,35 @@ message AppProfile { Priority priority = 1; } + // Data Boost is a serverless compute capability that lets you run + // high-throughput read jobs on your Bigtable data, without impacting the + // performance of the clusters that handle your application traffic. + // Currently, Data Boost exclusively supports read-only use-cases with + // single-cluster routing. + // + // Data Boost reads are only guaranteed to see the results of writes that + // were written at least 30 minutes ago. This means newly written values may + // not become visible for up to 30m, and also means that old values may + // remain visible for up to 30m after being deleted or overwritten. To + // mitigate the staleness of the data, users may either wait 30m, or use + // CheckConsistency. + message DataBoostIsolationReadOnly { + // Compute Billing Owner specifies how usage should be accounted when using + // Data Boost. Compute Billing Owner also configures which Cloud Project is + // charged for relevant quota. + enum ComputeBillingOwner { + // Unspecified value. + COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; + + // The host Cloud Project containing the targeted Bigtable Instance / + // Table pays for compute. + HOST_PAYS = 1; + } + + // The Compute Billing Owner for this Data Boost App Profile. + optional ComputeBillingOwner compute_billing_owner = 1; + } + // The unique name of the app profile. Values are of the form // `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. string name = 1; @@ -335,6 +364,10 @@ message AppProfile { // The standard options used for isolating this app profile's traffic from // other use cases. StandardIsolation standard_isolation = 11; + + // Specifies that this app profile is intended for read-only usage via the + // Data Boost feature. + DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; } } diff --git a/protos/google/bigtable/admin/v2/table.proto b/protos/google/bigtable/admin/v2/table.proto index 4d02d3036..321126c6a 100644 --- a/protos/google/bigtable/admin/v2/table.proto +++ b/protos/google/bigtable/admin/v2/table.proto @@ -18,6 +18,7 @@ package google.bigtable.admin.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/bigtable/admin/v2/types.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -142,6 +143,19 @@ message Table { FULL = 4; } + // Defines an automated backup policy for a table + message AutomatedBackupPolicy { + // Required. How long the automated backups should be retained. The only + // supported value at this time is 3 days. + google.protobuf.Duration retention_period = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. How frequently automated backups should occur. The only + // supported value at this time is 24 hours. + google.protobuf.Duration frequency = 2 + [(google.api.field_behavior) = REQUIRED]; + } + // The unique name of the table. Values are of the form // `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. // Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` @@ -184,6 +198,85 @@ message Table { // // Note one can still delete the data stored in the table through Data APIs. bool deletion_protection = 9; + + oneof automated_backup_config { + // If specified, automated backups are enabled for this table. + // Otherwise, automated backups are disabled. + AutomatedBackupPolicy automated_backup_policy = 13; + } +} + +// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users +// can configure access to each Authorized View independently from the table and +// use the existing Data APIs to access the subset of data. +message AuthorizedView { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + pattern: "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}" + plural: "authorizedViews" + singular: "authorizedView" + }; + + // Subsets of a column family that are included in this AuthorizedView. + message FamilySubsets { + // Individual exact column qualifiers to be included in the AuthorizedView. + repeated bytes qualifiers = 1; + + // Prefixes for qualifiers to be included in the AuthorizedView. Every + // qualifier starting with one of these prefixes is included in the + // AuthorizedView. To provide access to all qualifiers, include the empty + // string as a prefix + // (""). + repeated bytes qualifier_prefixes = 2; + } + + // Defines a simple AuthorizedView that is a subset of the underlying Table. + message SubsetView { + // Row prefixes to be included in the AuthorizedView. + // To provide access to all rows, include the empty string as a prefix (""). + repeated bytes row_prefixes = 1; + + // Map from column family name to the columns in this family to be included + // in the AuthorizedView. + map family_subsets = 2; + } + + // Defines a subset of an AuthorizedView's fields. + enum ResponseView { + // Uses the default view for each method as documented in the request. + RESPONSE_VIEW_UNSPECIFIED = 0; + + // Only populates `name`. + NAME_ONLY = 1; + + // Only populates the AuthorizedView's basic metadata. This includes: + // name, deletion_protection, etag. + BASIC = 2; + + // Populates every fields. + FULL = 3; + } + + // Identifier. The name of this AuthorizedView. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The type of this AuthorizedView. + oneof authorized_view { + // An AuthorizedView permitting access to an explicit subset of a Table. + SubsetView subset_view = 2; + } + + // The etag for this AuthorizedView. + // If this is provided on update, it must match the server's etag. The server + // returns ABORTED error on a mismatched etag. + string etag = 3; + + // Set to true to make the AuthorizedView protected against deletion. + // The parent Table and containing Instance cannot be deleted if an + // AuthorizedView has this bit set. + bool deletion_protection = 4; } // A set of columns within a table which share a common configuration. @@ -195,6 +288,18 @@ message ColumnFamily { // so it's possible for reads to return a cell even if it matches the active // GC expression for its family. GcRule gc_rule = 1; + + // The type of data stored in each of this family's cell values, including its + // full encoding. If omitted, the family only serves raw untyped bytes. + // + // For now, only the `Aggregate` type is supported. + // + // `Aggregate` can only be set at family creation and is immutable afterwards. + // + // + // If `value_type` is `Aggregate`, written data must be compatible with: + // * `value_type.input_type` for `AddInput` mutations + Type value_type = 3; } // Rule for determining which cells to delete during garbage collection. diff --git a/protos/google/bigtable/admin/v2/types.proto b/protos/google/bigtable/admin/v2/types.proto new file mode 100644 index 000000000..12c9f180e --- /dev/null +++ b/protos/google/bigtable/admin/v2/types.proto @@ -0,0 +1,149 @@ +// Copyright 2023 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.bigtable.admin.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; +option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; +option java_multiple_files = true; +option java_outer_classname = "TypesProto"; +option java_package = "com.google.bigtable.admin.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; +option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; + +// `Type` represents the type of data that is written to, read from, or stored +// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain +// familiarity and consistency across products and features. +// +// For compatibility with Bigtable's existing untyped APIs, each `Type` includes +// an `Encoding` which describes how to convert to/from the underlying data. +// This might involve composing a series of steps into an "encoding chain," for +// example to convert from INT64 -> STRING -> raw bytes. In most cases, a "link" +// in the encoding chain will be based an on existing GoogleSQL conversion +// function like `CAST`. +// +// Each link in the encoding chain also defines the following properties: +// * Natural sort: Does the encoded value sort consistently with the original +// typed value? Note that Bigtable will always sort data based on the raw +// encoded value, *not* the decoded type. +// - Example: STRING values sort in the same order as their UTF-8 encodings. +// - Counterexample: Encoding INT64 to a fixed-width STRING does *not* +// preserve sort order when dealing with negative numbers. +// INT64(1) > INT64(-1), but STRING("-00001") > STRING("00001). +// - The overall encoding chain sorts naturally if *every* link does. +// * Self-delimiting: If we concatenate two encoded values, can we always tell +// where the first one ends and the second one begins? +// - Example: If we encode INT64s to fixed-width STRINGs, the first value +// will always contain exactly N digits, possibly preceded by a sign. +// - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have +// no way to tell where the first one ends. +// - The overall encoding chain is self-delimiting if *any* link is. +// * Compatibility: Which other systems have matching encoding schemes? For +// example, does this encoding have a GoogleSQL equivalent? HBase? Java? +message Type { + // Bytes + // Values of type `Bytes` are stored in `Value.bytes_value`. + message Bytes { + // Rules used to convert to/from lower level types. + message Encoding { + // Leaves the value "as-is" + // * Natural sort? Yes + // * Self-delimiting? No + // * Compatibility? N/A + message Raw {} + + // Which encoding to use. + oneof encoding { + // Use `Raw` encoding. + Raw raw = 1; + } + } + + // The encoding to use when converting to/from lower level types. + Encoding encoding = 1; + } + + // Int64 + // Values of type `Int64` are stored in `Value.int_value`. + message Int64 { + // Rules used to convert to/from lower level types. + message Encoding { + // Encodes the value as an 8-byte big endian twos complement `Bytes` + // value. + // * Natural sort? No (positive values only) + // * Self-delimiting? Yes + // * Compatibility? + // - BigQuery Federation `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + message BigEndianBytes { + // The underlying `Bytes` type, which may be able to encode further. + Bytes bytes_type = 1; + } + + // Which encoding to use. + oneof encoding { + // Use `BigEndianBytes` encoding. + BigEndianBytes big_endian_bytes = 1; + } + } + + // The encoding to use when converting to/from lower level types. + Encoding encoding = 1; + } + + // A value that combines incremental updates into a summarized value. + // + // Data is never directly written or read using type `Aggregate`. Writes will + // provide either the `input_type` or `state_type`, and reads will always + // return the `state_type` . + message Aggregate { + // Computes the sum of the input values. + // Allowed input: `Int64` + // State: same as input + message Sum {} + + // Type of the inputs that are accumulated by this `Aggregate`, which must + // specify a full encoding. + // Use `AddInput` mutations to accumulate new inputs. + Type input_type = 1; + + // Output only. Type that holds the internal accumulator state for the + // `Aggregate`. This is a function of the `input_type` and `aggregator` + // chosen, and will always specify a full encoding. + Type state_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Which aggregator function to use. The configured types must match. + oneof aggregator { + // Sum aggregator. + Sum sum = 4; + } + } + + // The kind of type that this represents. + oneof kind { + // Bytes + Bytes bytes_type = 1; + + // Int64 + Int64 int64_type = 5; + + // Aggregate + Aggregate aggregate_type = 6; + } +} diff --git a/protos/google/bigtable/v2/bigtable.proto b/protos/google/bigtable/v2/bigtable.proto index aca13f586..879d6d26d 100644 --- a/protos/google/bigtable/v2/bigtable.proto +++ b/protos/google/bigtable/v2/bigtable.proto @@ -43,6 +43,10 @@ option (google.api.resource_definition) = { type: "bigtableadmin.googleapis.com/Table" pattern: "projects/{project}/instances/{instance}/tables/{table}" }; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + pattern: "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}" +}; // Service for reading from and writing to existing Bigtable tables. service Bigtable { @@ -64,6 +68,10 @@ service Bigtable { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows" body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows" + body: "*" + } }; option (google.api.routing) = { routing_parameters { @@ -71,6 +79,10 @@ service Bigtable { path_template: "{table_name=projects/*/instances/*/tables/*}" } routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } }; option (google.api.method_signature) = "table_name"; option (google.api.method_signature) = "table_name,app_profile_id"; @@ -84,6 +96,9 @@ service Bigtable { returns (stream SampleRowKeysResponse) { option (google.api.http) = { get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" + additional_bindings { + get: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys" + } }; option (google.api.routing) = { routing_parameters { @@ -91,6 +106,10 @@ service Bigtable { path_template: "{table_name=projects/*/instances/*/tables/*}" } routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } }; option (google.api.method_signature) = "table_name"; option (google.api.method_signature) = "table_name,app_profile_id"; @@ -102,6 +121,10 @@ service Bigtable { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow" body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow" + body: "*" + } }; option (google.api.routing) = { routing_parameters { @@ -109,6 +132,10 @@ service Bigtable { path_template: "{table_name=projects/*/instances/*/tables/*}" } routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } }; option (google.api.method_signature) = "table_name,row_key,mutations"; option (google.api.method_signature) = @@ -122,6 +149,10 @@ service Bigtable { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows" body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows" + body: "*" + } }; option (google.api.routing) = { routing_parameters { @@ -129,6 +160,10 @@ service Bigtable { path_template: "{table_name=projects/*/instances/*/tables/*}" } routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } }; option (google.api.method_signature) = "table_name,entries"; option (google.api.method_signature) = "table_name,entries,app_profile_id"; @@ -140,6 +175,10 @@ service Bigtable { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow" body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow" + body: "*" + } }; option (google.api.routing) = { routing_parameters { @@ -147,6 +186,10 @@ service Bigtable { path_template: "{table_name=projects/*/instances/*/tables/*}" } routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } }; option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations"; @@ -182,6 +225,10 @@ service Bigtable { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow" body: "*" + additional_bindings { + post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow" + body: "*" + } }; option (google.api.routing) = { routing_parameters { @@ -189,6 +236,10 @@ service Bigtable { path_template: "{table_name=projects/*/instances/*/tables/*}" } routing_parameters { field: "app_profile_id" } + routing_parameters { + field: "authorized_view_name" + path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + } }; option (google.api.method_signature) = "table_name,row_key,rules"; option (google.api.method_signature) = @@ -243,16 +294,28 @@ message ReadRowsRequest { REQUEST_STATS_FULL = 2; } - // Required. The unique name of the table from which to read. + // Optional. The unique name of the table from which to read. + // // Values are of the form // `projects//instances//tables/
`. string table_name = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "bigtableadmin.googleapis.com/Table" } ]; + // Optional. The unique name of the AuthorizedView from which to read. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 5; @@ -390,16 +453,29 @@ message ReadRowsResponse { // Request message for Bigtable.SampleRowKeys. message SampleRowKeysRequest { - // Required. The unique name of the table from which to sample row keys. + // Optional. The unique name of the table from which to sample row keys. + // // Values are of the form // `projects//instances//tables/
`. string table_name = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "bigtableadmin.googleapis.com/Table" } ]; + // Optional. The unique name of the AuthorizedView from which to sample row + // keys. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 2; @@ -425,16 +501,30 @@ message SampleRowKeysResponse { // Request message for Bigtable.MutateRow. message MutateRowRequest { - // Required. The unique name of the table to which the mutation should be - // applied. Values are of the form + // Optional. The unique name of the table to which the mutation should be + // applied. + // + // Values are of the form // `projects//instances//tables/
`. string table_name = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "bigtableadmin.googleapis.com/Table" } ]; + // Optional. The unique name of the AuthorizedView to which the mutation + // should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 4; @@ -464,15 +554,30 @@ message MutateRowsRequest { repeated Mutation mutations = 2 [(google.api.field_behavior) = REQUIRED]; } - // Required. The unique name of the table to which the mutations should be + // Optional. The unique name of the table to which the mutations should be // applied. + // + // Values are of the form + // `projects//instances//tables/
`. string table_name = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "bigtableadmin.googleapis.com/Table" } ]; + // Optional. The unique name of the AuthorizedView to which the mutations + // should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 3; @@ -533,16 +638,30 @@ message RateLimitInfo { // Request message for Bigtable.CheckAndMutateRow. message CheckAndMutateRowRequest { - // Required. The unique name of the table to which the conditional mutation - // should be applied. Values are of the form + // Optional. The unique name of the table to which the conditional mutation + // should be applied. + // + // Values are of the form // `projects//instances//tables/
`. string table_name = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "bigtableadmin.googleapis.com/Table" } ]; + // Optional. The unique name of the AuthorizedView to which the conditional + // mutation should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 7; @@ -601,16 +720,30 @@ message PingAndWarmResponse {} // Request message for Bigtable.ReadModifyWriteRow. message ReadModifyWriteRowRequest { - // Required. The unique name of the table to which the read/modify/write rules - // should be applied. Values are of the form + // Optional. The unique name of the table to which the read/modify/write rules + // should be applied. + // + // Values are of the form // `projects//instances//tables/
`. string table_name = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "bigtableadmin.googleapis.com/Table" } ]; + // Optional. The unique name of the AuthorizedView to which the + // read/modify/write rules should be applied. + // + // Values are of the form + // `projects//instances//tables/
/authorizedViews/`. + string authorized_view_name = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/AuthorizedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 4; diff --git a/protos/google/bigtable/v2/data.proto b/protos/google/bigtable/v2/data.proto index 1e7d463c7..86dca2784 100644 --- a/protos/google/bigtable/v2/data.proto +++ b/protos/google/bigtable/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ syntax = "proto3"; package google.bigtable.v2; +import "google/api/field_behavior.proto"; + option csharp_namespace = "Google.Cloud.Bigtable.V2"; option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; option java_multiple_files = true; @@ -85,6 +87,32 @@ message Cell { repeated string labels = 3; } +// `Value` represents a dynamically typed value. +// The typed fields in `Value` are used as a transport encoding for the actual +// value (which may be of a more complex type). See the documentation of the +// `Type` message for more details. +message Value { + // Options for transporting values within the protobuf type system. A given + // `kind` may support more than one `type` and vice versa. On write, this is + // roughly analogous to a GoogleSQL literal. + // + // The value is `NULL` if none of the fields in `kind` is set. If `type` is + // also omitted on write, we will infer it based on the schema. + oneof kind { + // Represents a raw byte sequence with no type information. + // The `type` field must be omitted. + bytes raw_value = 8; + + // Represents a raw cell timestamp with no type information. + // The `type` field must be omitted. + int64 raw_timestamp_micros = 9; + + // Represents a typed value transported as an integer. + // Default type for writes: `Int64` + int64 int_value = 6; + } +} + // Specifies a contiguous range of rows. message RowRange { // The row key at which to start the range. @@ -463,6 +491,26 @@ message Mutation { bytes value = 4; } + // A Mutation which incrementally updates a cell in an `Aggregate` family. + message AddToCell { + // The name of the `Aggregate` family into which new data should be added. + // This must be a family with a `value_type` of `Aggregate`. + // Format: `[-_.a-zA-Z0-9]+` + string family_name = 1; + + // The qualifier of the column into which new data should be added. This + // must be a `raw_value`. + Value column_qualifier = 2; + + // The timestamp of the cell to which new data should be added. This must + // be a `raw_timestamp_micros` that matches the table's `granularity`. + Value timestamp = 3; + + // The input value to be accumulated into the specified cell. This must be + // compatible with the family's `value_type.input_type`. + Value input = 4; + } + // A Mutation which deletes cells from the specified column, optionally // restricting the deletions to a given timestamp range. message DeleteFromColumn { @@ -493,6 +541,9 @@ message Mutation { // Set a cell's value. SetCell set_cell = 1; + // Incrementally updates an `Aggregate` cell. + AddToCell add_to_cell = 5; + // Deletes cells from a column. DeleteFromColumn delete_from_column = 2; diff --git a/protos/google/bigtable/v2/feature_flags.proto b/protos/google/bigtable/v2/feature_flags.proto index d3128c5c6..bfce3180f 100644 --- a/protos/google/bigtable/v2/feature_flags.proto +++ b/protos/google/bigtable/v2/feature_flags.proto @@ -58,4 +58,7 @@ message FeatureFlags { // Notify the server that the client supports using retry info back off // durations to retry requests with. bool retry_info = 7; + + // Notify the server that the client has client side metrics enabled. + bool client_side_metrics_enabled = 8; } diff --git a/protos/protos.d.ts b/protos/protos.d.ts index fd3f019cb..c897e6ee2 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -4192,6 +4192,9 @@ export namespace google { /** AppProfile standardIsolation */ standardIsolation?: (google.bigtable.admin.v2.AppProfile.IStandardIsolation|null); + + /** AppProfile dataBoostIsolationReadOnly */ + dataBoostIsolationReadOnly?: (google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null); } /** Represents an AppProfile. */ @@ -4224,11 +4227,14 @@ export namespace google { /** AppProfile standardIsolation. */ public standardIsolation?: (google.bigtable.admin.v2.AppProfile.IStandardIsolation|null); + /** AppProfile dataBoostIsolationReadOnly. */ + public dataBoostIsolationReadOnly?: (google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null); + /** AppProfile routingPolicy. */ public routingPolicy?: ("multiClusterRoutingUseAny"|"singleClusterRouting"); /** AppProfile isolation. */ - public isolation?: ("priority"|"standardIsolation"); + public isolation?: ("priority"|"standardIsolation"|"dataBoostIsolationReadOnly"); /** * Creates a new AppProfile instance using the specified properties. @@ -4614,6 +4620,115 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a DataBoostIsolationReadOnly. */ + interface IDataBoostIsolationReadOnly { + + /** DataBoostIsolationReadOnly computeBillingOwner */ + computeBillingOwner?: (google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|keyof typeof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null); + } + + /** Represents a DataBoostIsolationReadOnly. */ + class DataBoostIsolationReadOnly implements IDataBoostIsolationReadOnly { + + /** + * Constructs a new DataBoostIsolationReadOnly. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly); + + /** DataBoostIsolationReadOnly computeBillingOwner. */ + public computeBillingOwner?: (google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|keyof typeof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null); + + /** DataBoostIsolationReadOnly _computeBillingOwner. */ + public _computeBillingOwner?: "computeBillingOwner"; + + /** + * Creates a new DataBoostIsolationReadOnly instance using the specified properties. + * @param [properties] Properties to set + * @returns DataBoostIsolationReadOnly instance + */ + public static create(properties?: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly): google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly; + + /** + * Encodes the specified DataBoostIsolationReadOnly message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @param message DataBoostIsolationReadOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataBoostIsolationReadOnly message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @param message DataBoostIsolationReadOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataBoostIsolationReadOnly + * @throws {Error} If the payload is 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataBoostIsolationReadOnly + * @throws {Error} If the 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly; + + /** + * Verifies a DataBoostIsolationReadOnly message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataBoostIsolationReadOnly message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataBoostIsolationReadOnly + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly; + + /** + * Creates a plain object from a DataBoostIsolationReadOnly message. Also converts values to other types if specified. + * @param message DataBoostIsolationReadOnly + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataBoostIsolationReadOnly to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataBoostIsolationReadOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataBoostIsolationReadOnly { + + /** ComputeBillingOwner enum. */ + enum ComputeBillingOwner { + COMPUTE_BILLING_OWNER_UNSPECIFIED = 0, + HOST_PAYS = 1 + } + } } /** Properties of a HotTablet. */ @@ -4983,6 +5098,76 @@ export namespace google { */ public undeleteTable(request: google.bigtable.admin.v2.IUndeleteTableRequest): Promise; + /** + * Calls CreateAuthorizedView. + * @param request CreateAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAuthorizedView(request: google.bigtable.admin.v2.ICreateAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedViewCallback): void; + + /** + * Calls CreateAuthorizedView. + * @param request CreateAuthorizedViewRequest message or plain object + * @returns Promise + */ + public createAuthorizedView(request: google.bigtable.admin.v2.ICreateAuthorizedViewRequest): Promise; + + /** + * Calls ListAuthorizedViews. + * @param request ListAuthorizedViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAuthorizedViewsResponse + */ + public listAuthorizedViews(request: google.bigtable.admin.v2.IListAuthorizedViewsRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViewsCallback): void; + + /** + * Calls ListAuthorizedViews. + * @param request ListAuthorizedViewsRequest message or plain object + * @returns Promise + */ + public listAuthorizedViews(request: google.bigtable.admin.v2.IListAuthorizedViewsRequest): Promise; + + /** + * Calls GetAuthorizedView. + * @param request GetAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AuthorizedView + */ + public getAuthorizedView(request: google.bigtable.admin.v2.IGetAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedViewCallback): void; + + /** + * Calls GetAuthorizedView. + * @param request GetAuthorizedViewRequest message or plain object + * @returns Promise + */ + public getAuthorizedView(request: google.bigtable.admin.v2.IGetAuthorizedViewRequest): Promise; + + /** + * Calls UpdateAuthorizedView. + * @param request UpdateAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAuthorizedView(request: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedViewCallback): void; + + /** + * Calls UpdateAuthorizedView. + * @param request UpdateAuthorizedViewRequest message or plain object + * @returns Promise + */ + public updateAuthorizedView(request: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest): Promise; + + /** + * Calls DeleteAuthorizedView. + * @param request DeleteAuthorizedViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAuthorizedView(request: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, callback: google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedViewCallback): void; + + /** + * Calls DeleteAuthorizedView. + * @param request DeleteAuthorizedViewRequest message or plain object + * @returns Promise + */ + public deleteAuthorizedView(request: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest): Promise; + /** * Calls ModifyColumnFamilies. * @param request ModifyColumnFamiliesRequest message or plain object @@ -5287,6 +5472,41 @@ export namespace google { */ type UndeleteTableCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createAuthorizedView}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAuthorizedViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listAuthorizedViews}. + * @param error Error, if any + * @param [response] ListAuthorizedViewsResponse + */ + type ListAuthorizedViewsCallback = (error: (Error|null), response?: google.bigtable.admin.v2.ListAuthorizedViewsResponse) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getAuthorizedView}. + * @param error Error, if any + * @param [response] AuthorizedView + */ + type GetAuthorizedViewCallback = (error: (Error|null), response?: google.bigtable.admin.v2.AuthorizedView) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateAuthorizedView}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAuthorizedViewCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteAuthorizedView}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAuthorizedViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|modifyColumnFamilies}. * @param error Error, if any @@ -7150,6 +7370,9 @@ export namespace google { /** Modification drop */ drop?: (boolean|null); + + /** Modification updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } /** Represents a Modification. */ @@ -7173,6 +7396,9 @@ export namespace google { /** Modification drop. */ public drop?: (boolean|null); + /** Modification updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + /** Modification mod. */ public mod?: ("create"|"update"|"drop"); @@ -7457,6 +7683,12 @@ export namespace google { /** CheckConsistencyRequest consistencyToken */ consistencyToken?: (string|null); + + /** CheckConsistencyRequest standardReadRemoteWrites */ + standardReadRemoteWrites?: (google.bigtable.admin.v2.IStandardReadRemoteWrites|null); + + /** CheckConsistencyRequest dataBoostReadLocalWrites */ + dataBoostReadLocalWrites?: (google.bigtable.admin.v2.IDataBoostReadLocalWrites|null); } /** Represents a CheckConsistencyRequest. */ @@ -7474,6 +7706,15 @@ export namespace google { /** CheckConsistencyRequest consistencyToken. */ public consistencyToken: string; + /** CheckConsistencyRequest standardReadRemoteWrites. */ + public standardReadRemoteWrites?: (google.bigtable.admin.v2.IStandardReadRemoteWrites|null); + + /** CheckConsistencyRequest dataBoostReadLocalWrites. */ + public dataBoostReadLocalWrites?: (google.bigtable.admin.v2.IDataBoostReadLocalWrites|null); + + /** CheckConsistencyRequest mode. */ + public mode?: ("standardReadRemoteWrites"|"dataBoostReadLocalWrites"); + /** * Creates a new CheckConsistencyRequest instance using the specified properties. * @param [properties] Properties to set @@ -7552,245 +7793,427 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CheckConsistencyResponse. */ - interface ICheckConsistencyResponse { - - /** CheckConsistencyResponse consistent */ - consistent?: (boolean|null); + /** Properties of a StandardReadRemoteWrites. */ + interface IStandardReadRemoteWrites { } - /** Represents a CheckConsistencyResponse. */ - class CheckConsistencyResponse implements ICheckConsistencyResponse { + /** Represents a StandardReadRemoteWrites. */ + class StandardReadRemoteWrites implements IStandardReadRemoteWrites { /** - * Constructs a new CheckConsistencyResponse. + * Constructs a new StandardReadRemoteWrites. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.ICheckConsistencyResponse); - - /** CheckConsistencyResponse consistent. */ - public consistent: boolean; + constructor(properties?: google.bigtable.admin.v2.IStandardReadRemoteWrites); /** - * Creates a new CheckConsistencyResponse instance using the specified properties. + * Creates a new StandardReadRemoteWrites instance using the specified properties. * @param [properties] Properties to set - * @returns CheckConsistencyResponse instance + * @returns StandardReadRemoteWrites instance */ - public static create(properties?: google.bigtable.admin.v2.ICheckConsistencyResponse): google.bigtable.admin.v2.CheckConsistencyResponse; + public static create(properties?: google.bigtable.admin.v2.IStandardReadRemoteWrites): google.bigtable.admin.v2.StandardReadRemoteWrites; /** - * Encodes the specified CheckConsistencyResponse message. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. - * @param message CheckConsistencyResponse message or plain object to encode + * Encodes the specified StandardReadRemoteWrites message. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @param message StandardReadRemoteWrites message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.ICheckConsistencyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IStandardReadRemoteWrites, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CheckConsistencyResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. - * @param message CheckConsistencyResponse message or plain object to encode + * Encodes the specified StandardReadRemoteWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @param message StandardReadRemoteWrites message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.ICheckConsistencyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IStandardReadRemoteWrites, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CheckConsistencyResponse message from the specified reader or buffer. + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CheckConsistencyResponse + * @returns StandardReadRemoteWrites * @throws {Error} If the payload is 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.bigtable.admin.v2.CheckConsistencyResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.StandardReadRemoteWrites; /** - * Decodes a CheckConsistencyResponse message from the specified reader or buffer, length delimited. + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CheckConsistencyResponse + * @returns StandardReadRemoteWrites * @throws {Error} If the 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.bigtable.admin.v2.CheckConsistencyResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.StandardReadRemoteWrites; /** - * Verifies a CheckConsistencyResponse message. + * Verifies a StandardReadRemoteWrites message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CheckConsistencyResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StandardReadRemoteWrites message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CheckConsistencyResponse + * @returns StandardReadRemoteWrites */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CheckConsistencyResponse; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.StandardReadRemoteWrites; /** - * Creates a plain object from a CheckConsistencyResponse message. Also converts values to other types if specified. - * @param message CheckConsistencyResponse + * Creates a plain object from a StandardReadRemoteWrites message. Also converts values to other types if specified. + * @param message StandardReadRemoteWrites * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.CheckConsistencyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.StandardReadRemoteWrites, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CheckConsistencyResponse to JSON. + * Converts this StandardReadRemoteWrites to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CheckConsistencyResponse + * Gets the default type url for StandardReadRemoteWrites * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SnapshotTableRequest. */ - interface ISnapshotTableRequest { - - /** SnapshotTableRequest name */ - name?: (string|null); - - /** SnapshotTableRequest cluster */ - cluster?: (string|null); - - /** SnapshotTableRequest snapshotId */ - snapshotId?: (string|null); - - /** SnapshotTableRequest ttl */ - ttl?: (google.protobuf.IDuration|null); - - /** SnapshotTableRequest description */ - description?: (string|null); + /** Properties of a DataBoostReadLocalWrites. */ + interface IDataBoostReadLocalWrites { } - /** Represents a SnapshotTableRequest. */ - class SnapshotTableRequest implements ISnapshotTableRequest { + /** Represents a DataBoostReadLocalWrites. */ + class DataBoostReadLocalWrites implements IDataBoostReadLocalWrites { /** - * Constructs a new SnapshotTableRequest. + * Constructs a new DataBoostReadLocalWrites. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.ISnapshotTableRequest); - - /** SnapshotTableRequest name. */ - public name: string; - - /** SnapshotTableRequest cluster. */ - public cluster: string; - - /** SnapshotTableRequest snapshotId. */ - public snapshotId: string; - - /** SnapshotTableRequest ttl. */ - public ttl?: (google.protobuf.IDuration|null); - - /** SnapshotTableRequest description. */ - public description: string; + constructor(properties?: google.bigtable.admin.v2.IDataBoostReadLocalWrites); /** - * Creates a new SnapshotTableRequest instance using the specified properties. + * Creates a new DataBoostReadLocalWrites instance using the specified properties. * @param [properties] Properties to set - * @returns SnapshotTableRequest instance + * @returns DataBoostReadLocalWrites instance */ - public static create(properties?: google.bigtable.admin.v2.ISnapshotTableRequest): google.bigtable.admin.v2.SnapshotTableRequest; + public static create(properties?: google.bigtable.admin.v2.IDataBoostReadLocalWrites): google.bigtable.admin.v2.DataBoostReadLocalWrites; /** - * Encodes the specified SnapshotTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. - * @param message SnapshotTableRequest message or plain object to encode + * Encodes the specified DataBoostReadLocalWrites message. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @param message DataBoostReadLocalWrites message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.ISnapshotTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IDataBoostReadLocalWrites, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SnapshotTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. - * @param message SnapshotTableRequest message or plain object to encode + * Encodes the specified DataBoostReadLocalWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @param message DataBoostReadLocalWrites message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshotTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IDataBoostReadLocalWrites, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SnapshotTableRequest message from the specified reader or buffer. + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SnapshotTableRequest + * @returns DataBoostReadLocalWrites * @throws {Error} If the payload is 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.bigtable.admin.v2.SnapshotTableRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.DataBoostReadLocalWrites; /** - * Decodes a SnapshotTableRequest message from the specified reader or buffer, length delimited. + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SnapshotTableRequest + * @returns DataBoostReadLocalWrites * @throws {Error} If the 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.bigtable.admin.v2.SnapshotTableRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.DataBoostReadLocalWrites; /** - * Verifies a SnapshotTableRequest message. + * Verifies a DataBoostReadLocalWrites message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SnapshotTableRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataBoostReadLocalWrites message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SnapshotTableRequest + * @returns DataBoostReadLocalWrites */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.SnapshotTableRequest; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DataBoostReadLocalWrites; /** - * Creates a plain object from a SnapshotTableRequest message. Also converts values to other types if specified. - * @param message SnapshotTableRequest + * Creates a plain object from a DataBoostReadLocalWrites message. Also converts values to other types if specified. + * @param message DataBoostReadLocalWrites * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.SnapshotTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.DataBoostReadLocalWrites, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SnapshotTableRequest to JSON. + * Converts this DataBoostReadLocalWrites to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SnapshotTableRequest + * Gets the default type url for DataBoostReadLocalWrites * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetSnapshotRequest. */ - interface IGetSnapshotRequest { + /** Properties of a CheckConsistencyResponse. */ + interface ICheckConsistencyResponse { - /** GetSnapshotRequest name */ - name?: (string|null); + /** CheckConsistencyResponse consistent */ + consistent?: (boolean|null); } - /** Represents a GetSnapshotRequest. */ - class GetSnapshotRequest implements IGetSnapshotRequest { + /** Represents a CheckConsistencyResponse. */ + class CheckConsistencyResponse implements ICheckConsistencyResponse { /** - * Constructs a new GetSnapshotRequest. + * Constructs a new CheckConsistencyResponse. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IGetSnapshotRequest); + constructor(properties?: google.bigtable.admin.v2.ICheckConsistencyResponse); - /** GetSnapshotRequest name. */ - public name: string; + /** CheckConsistencyResponse consistent. */ + public consistent: boolean; /** - * Creates a new GetSnapshotRequest instance using the specified properties. + * Creates a new CheckConsistencyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckConsistencyResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.ICheckConsistencyResponse): google.bigtable.admin.v2.CheckConsistencyResponse; + + /** + * Encodes the specified CheckConsistencyResponse message. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. + * @param message CheckConsistencyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ICheckConsistencyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckConsistencyResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CheckConsistencyResponse.verify|verify} messages. + * @param message CheckConsistencyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ICheckConsistencyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckConsistencyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckConsistencyResponse + * @throws {Error} If the payload is 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.bigtable.admin.v2.CheckConsistencyResponse; + + /** + * Decodes a CheckConsistencyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckConsistencyResponse + * @throws {Error} If the 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.bigtable.admin.v2.CheckConsistencyResponse; + + /** + * Verifies a CheckConsistencyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckConsistencyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckConsistencyResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CheckConsistencyResponse; + + /** + * Creates a plain object from a CheckConsistencyResponse message. Also converts values to other types if specified. + * @param message CheckConsistencyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.CheckConsistencyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckConsistencyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckConsistencyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SnapshotTableRequest. */ + interface ISnapshotTableRequest { + + /** SnapshotTableRequest name */ + name?: (string|null); + + /** SnapshotTableRequest cluster */ + cluster?: (string|null); + + /** SnapshotTableRequest snapshotId */ + snapshotId?: (string|null); + + /** SnapshotTableRequest ttl */ + ttl?: (google.protobuf.IDuration|null); + + /** SnapshotTableRequest description */ + description?: (string|null); + } + + /** Represents a SnapshotTableRequest. */ + class SnapshotTableRequest implements ISnapshotTableRequest { + + /** + * Constructs a new SnapshotTableRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ISnapshotTableRequest); + + /** SnapshotTableRequest name. */ + public name: string; + + /** SnapshotTableRequest cluster. */ + public cluster: string; + + /** SnapshotTableRequest snapshotId. */ + public snapshotId: string; + + /** SnapshotTableRequest ttl. */ + public ttl?: (google.protobuf.IDuration|null); + + /** SnapshotTableRequest description. */ + public description: string; + + /** + * Creates a new SnapshotTableRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SnapshotTableRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.ISnapshotTableRequest): google.bigtable.admin.v2.SnapshotTableRequest; + + /** + * Encodes the specified SnapshotTableRequest message. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. + * @param message SnapshotTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ISnapshotTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnapshotTableRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.SnapshotTableRequest.verify|verify} messages. + * @param message SnapshotTableRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshotTableRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnapshotTableRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnapshotTableRequest + * @throws {Error} If the payload is 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.bigtable.admin.v2.SnapshotTableRequest; + + /** + * Decodes a SnapshotTableRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnapshotTableRequest + * @throws {Error} If the 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.bigtable.admin.v2.SnapshotTableRequest; + + /** + * Verifies a SnapshotTableRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SnapshotTableRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnapshotTableRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.SnapshotTableRequest; + + /** + * Creates a plain object from a SnapshotTableRequest message. Also converts values to other types if specified. + * @param message SnapshotTableRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.SnapshotTableRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnapshotTableRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnapshotTableRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSnapshotRequest. */ + interface IGetSnapshotRequest { + + /** GetSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetSnapshotRequest. */ + class GetSnapshotRequest implements IGetSnapshotRequest { + + /** + * Constructs a new GetSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGetSnapshotRequest); + + /** GetSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. * @param [properties] Properties to set * @returns GetSnapshotRequest instance */ @@ -9363,1431 +9786,3659 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreInfo. */ - interface IRestoreInfo { + /** Properties of a CreateAuthorizedViewRequest. */ + interface ICreateAuthorizedViewRequest { - /** RestoreInfo sourceType */ - sourceType?: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType|null); + /** CreateAuthorizedViewRequest parent */ + parent?: (string|null); - /** RestoreInfo backupInfo */ - backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + /** CreateAuthorizedViewRequest authorizedViewId */ + authorizedViewId?: (string|null); + + /** CreateAuthorizedViewRequest authorizedView */ + authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); } - /** Represents a RestoreInfo. */ - class RestoreInfo implements IRestoreInfo { + /** Represents a CreateAuthorizedViewRequest. */ + class CreateAuthorizedViewRequest implements ICreateAuthorizedViewRequest { /** - * Constructs a new RestoreInfo. + * Constructs a new CreateAuthorizedViewRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IRestoreInfo); + constructor(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewRequest); - /** RestoreInfo sourceType. */ - public sourceType: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType); + /** CreateAuthorizedViewRequest parent. */ + public parent: string; - /** RestoreInfo backupInfo. */ - public backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); + /** CreateAuthorizedViewRequest authorizedViewId. */ + public authorizedViewId: string; - /** RestoreInfo sourceInfo. */ - public sourceInfo?: "backupInfo"; + /** CreateAuthorizedViewRequest authorizedView. */ + public authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); /** - * Creates a new RestoreInfo instance using the specified properties. + * Creates a new CreateAuthorizedViewRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreInfo instance + * @returns CreateAuthorizedViewRequest instance */ - public static create(properties?: google.bigtable.admin.v2.IRestoreInfo): google.bigtable.admin.v2.RestoreInfo; + public static create(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewRequest): google.bigtable.admin.v2.CreateAuthorizedViewRequest; /** - * Encodes the specified RestoreInfo message. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. - * @param message RestoreInfo message or plain object to encode + * Encodes the specified CreateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. + * @param message CreateAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.IRestoreInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.ICreateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. - * @param message RestoreInfo message or plain object to encode + * Encodes the specified CreateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. + * @param message CreateAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.IRestoreInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreInfo message from the specified reader or buffer. + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreInfo + * @returns CreateAuthorizedViewRequest * @throws {Error} If the payload is 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.bigtable.admin.v2.RestoreInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.CreateAuthorizedViewRequest; /** - * Decodes a RestoreInfo message from the specified reader or buffer, length delimited. + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreInfo + * @returns CreateAuthorizedViewRequest * @throws {Error} If the 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.bigtable.admin.v2.RestoreInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.CreateAuthorizedViewRequest; /** - * Verifies a RestoreInfo message. + * Verifies a CreateAuthorizedViewRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreInfo + * @returns CreateAuthorizedViewRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.RestoreInfo; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateAuthorizedViewRequest; /** - * Creates a plain object from a RestoreInfo message. Also converts values to other types if specified. - * @param message RestoreInfo + * Creates a plain object from a CreateAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message CreateAuthorizedViewRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.RestoreInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.CreateAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreInfo to JSON. + * Converts this CreateAuthorizedViewRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreInfo + * Gets the default type url for CreateAuthorizedViewRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ChangeStreamConfig. */ - interface IChangeStreamConfig { + /** Properties of a CreateAuthorizedViewMetadata. */ + interface ICreateAuthorizedViewMetadata { - /** ChangeStreamConfig retentionPeriod */ - retentionPeriod?: (google.protobuf.IDuration|null); + /** CreateAuthorizedViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null); + + /** CreateAuthorizedViewMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateAuthorizedViewMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ChangeStreamConfig. */ - class ChangeStreamConfig implements IChangeStreamConfig { + /** Represents a CreateAuthorizedViewMetadata. */ + class CreateAuthorizedViewMetadata implements ICreateAuthorizedViewMetadata { /** - * Constructs a new ChangeStreamConfig. + * Constructs a new CreateAuthorizedViewMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IChangeStreamConfig); + constructor(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata); - /** ChangeStreamConfig retentionPeriod. */ - public retentionPeriod?: (google.protobuf.IDuration|null); + /** CreateAuthorizedViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null); + + /** CreateAuthorizedViewMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** CreateAuthorizedViewMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ChangeStreamConfig instance using the specified properties. + * Creates a new CreateAuthorizedViewMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ChangeStreamConfig instance + * @returns CreateAuthorizedViewMetadata instance */ - public static create(properties?: google.bigtable.admin.v2.IChangeStreamConfig): google.bigtable.admin.v2.ChangeStreamConfig; + public static create(properties?: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata): google.bigtable.admin.v2.CreateAuthorizedViewMetadata; /** - * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. - * @param message ChangeStreamConfig message or plain object to encode + * Encodes the specified CreateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. + * @param message CreateAuthorizedViewMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.IChangeStreamConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. - * @param message ChangeStreamConfig message or plain object to encode + * Encodes the specified CreateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. + * @param message CreateAuthorizedViewMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.IChangeStreamConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.ICreateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChangeStreamConfig message from the specified reader or buffer. + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChangeStreamConfig + * @returns CreateAuthorizedViewMetadata * @throws {Error} If the payload is 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.bigtable.admin.v2.ChangeStreamConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.CreateAuthorizedViewMetadata; /** - * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChangeStreamConfig + * @returns CreateAuthorizedViewMetadata * @throws {Error} If the 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.bigtable.admin.v2.ChangeStreamConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.CreateAuthorizedViewMetadata; /** - * Verifies a ChangeStreamConfig message. + * Verifies a CreateAuthorizedViewMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChangeStreamConfig + * @returns CreateAuthorizedViewMetadata */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ChangeStreamConfig; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.CreateAuthorizedViewMetadata; /** - * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. - * @param message ChangeStreamConfig + * Creates a plain object from a CreateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @param message CreateAuthorizedViewMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.ChangeStreamConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.CreateAuthorizedViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChangeStreamConfig to JSON. + * Converts this CreateAuthorizedViewMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ChangeStreamConfig + * Gets the default type url for CreateAuthorizedViewMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Table. */ - interface ITable { - - /** Table name */ - name?: (string|null); - - /** Table clusterStates */ - clusterStates?: ({ [k: string]: google.bigtable.admin.v2.Table.IClusterState }|null); - - /** Table columnFamilies */ - columnFamilies?: ({ [k: string]: google.bigtable.admin.v2.IColumnFamily }|null); + /** Properties of a ListAuthorizedViewsRequest. */ + interface IListAuthorizedViewsRequest { - /** Table granularity */ - granularity?: (google.bigtable.admin.v2.Table.TimestampGranularity|keyof typeof google.bigtable.admin.v2.Table.TimestampGranularity|null); + /** ListAuthorizedViewsRequest parent */ + parent?: (string|null); - /** Table restoreInfo */ - restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); + /** ListAuthorizedViewsRequest pageSize */ + pageSize?: (number|null); - /** Table changeStreamConfig */ - changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); + /** ListAuthorizedViewsRequest pageToken */ + pageToken?: (string|null); - /** Table deletionProtection */ - deletionProtection?: (boolean|null); + /** ListAuthorizedViewsRequest view */ + view?: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView|null); } - /** Represents a Table. */ - class Table implements ITable { + /** Represents a ListAuthorizedViewsRequest. */ + class ListAuthorizedViewsRequest implements IListAuthorizedViewsRequest { /** - * Constructs a new Table. + * Constructs a new ListAuthorizedViewsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.ITable); - - /** Table name. */ - public name: string; - - /** Table clusterStates. */ - public clusterStates: { [k: string]: google.bigtable.admin.v2.Table.IClusterState }; - - /** Table columnFamilies. */ - public columnFamilies: { [k: string]: google.bigtable.admin.v2.IColumnFamily }; + constructor(properties?: google.bigtable.admin.v2.IListAuthorizedViewsRequest); - /** Table granularity. */ - public granularity: (google.bigtable.admin.v2.Table.TimestampGranularity|keyof typeof google.bigtable.admin.v2.Table.TimestampGranularity); + /** ListAuthorizedViewsRequest parent. */ + public parent: string; - /** Table restoreInfo. */ - public restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); + /** ListAuthorizedViewsRequest pageSize. */ + public pageSize: number; - /** Table changeStreamConfig. */ - public changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); + /** ListAuthorizedViewsRequest pageToken. */ + public pageToken: string; - /** Table deletionProtection. */ - public deletionProtection: boolean; + /** ListAuthorizedViewsRequest view. */ + public view: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView); /** - * Creates a new Table instance using the specified properties. + * Creates a new ListAuthorizedViewsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Table instance + * @returns ListAuthorizedViewsRequest instance */ - public static create(properties?: google.bigtable.admin.v2.ITable): google.bigtable.admin.v2.Table; + public static create(properties?: google.bigtable.admin.v2.IListAuthorizedViewsRequest): google.bigtable.admin.v2.ListAuthorizedViewsRequest; /** - * Encodes the specified Table message. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. - * @param message Table message or plain object to encode + * Encodes the specified ListAuthorizedViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. + * @param message ListAuthorizedViewsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IListAuthorizedViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Table message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. - * @param message Table message or plain object to encode + * Encodes the specified ListAuthorizedViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. + * @param message ListAuthorizedViewsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IListAuthorizedViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Table message from the specified reader or buffer. + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Table + * @returns ListAuthorizedViewsRequest * @throws {Error} If the payload is 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.bigtable.admin.v2.Table; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.ListAuthorizedViewsRequest; /** - * Decodes a Table message from the specified reader or buffer, length delimited. + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Table + * @returns ListAuthorizedViewsRequest * @throws {Error} If the 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.bigtable.admin.v2.Table; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.ListAuthorizedViewsRequest; /** - * Verifies a Table message. + * Verifies a ListAuthorizedViewsRequest message. * @param message Plain object 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. + * Creates a ListAuthorizedViewsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Table + * @returns ListAuthorizedViewsRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListAuthorizedViewsRequest; /** - * Creates a plain object from a Table message. Also converts values to other types if specified. - * @param message Table + * Creates a plain object from a ListAuthorizedViewsRequest message. Also converts values to other types if specified. + * @param message ListAuthorizedViewsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.ListAuthorizedViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Table to JSON. + * Converts this ListAuthorizedViewsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Table + * Gets the default type url for ListAuthorizedViewsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Table { + /** Properties of a ListAuthorizedViewsResponse. */ + interface IListAuthorizedViewsResponse { - /** Properties of a ClusterState. */ - interface IClusterState { + /** ListAuthorizedViewsResponse authorizedViews */ + authorizedViews?: (google.bigtable.admin.v2.IAuthorizedView[]|null); - /** ClusterState replicationState */ - replicationState?: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null); + /** ListAuthorizedViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** ClusterState encryptionInfo */ - encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo[]|null); - } + /** Represents a ListAuthorizedViewsResponse. */ + class ListAuthorizedViewsResponse implements IListAuthorizedViewsResponse { - /** Represents a ClusterState. */ - class ClusterState implements IClusterState { + /** + * Constructs a new ListAuthorizedViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IListAuthorizedViewsResponse); - /** - * Constructs a new ClusterState. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.admin.v2.Table.IClusterState); + /** ListAuthorizedViewsResponse authorizedViews. */ + public authorizedViews: google.bigtable.admin.v2.IAuthorizedView[]; - /** ClusterState replicationState. */ - public replicationState: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState); + /** ListAuthorizedViewsResponse nextPageToken. */ + public nextPageToken: string; - /** ClusterState encryptionInfo. */ - public encryptionInfo: google.bigtable.admin.v2.IEncryptionInfo[]; + /** + * Creates a new ListAuthorizedViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAuthorizedViewsResponse instance + */ + public static create(properties?: google.bigtable.admin.v2.IListAuthorizedViewsResponse): google.bigtable.admin.v2.ListAuthorizedViewsResponse; - /** - * Creates a new ClusterState instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterState instance - */ - public static create(properties?: google.bigtable.admin.v2.Table.IClusterState): google.bigtable.admin.v2.Table.ClusterState; + /** + * Encodes the specified ListAuthorizedViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. + * @param message ListAuthorizedViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IListAuthorizedViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ClusterState message. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. - * @param message ClusterState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.bigtable.admin.v2.Table.IClusterState, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListAuthorizedViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. + * @param message ListAuthorizedViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IListAuthorizedViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ClusterState message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. - * @param message ClusterState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.bigtable.admin.v2.Table.IClusterState, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAuthorizedViewsResponse + * @throws {Error} If the payload is 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.bigtable.admin.v2.ListAuthorizedViewsResponse; - /** - * Decodes a ClusterState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterState - * @throws {Error} If the payload is 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.bigtable.admin.v2.Table.ClusterState; + /** + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAuthorizedViewsResponse + * @throws {Error} If the 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.bigtable.admin.v2.ListAuthorizedViewsResponse; - /** - * Decodes a ClusterState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterState - * @throws {Error} If the 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.bigtable.admin.v2.Table.ClusterState; + /** + * Verifies a ListAuthorizedViewsResponse message. + * @param message 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 ClusterState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a ListAuthorizedViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAuthorizedViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ListAuthorizedViewsResponse; - /** - * Creates a ClusterState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterState - */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table.ClusterState; + /** + * Creates a plain object from a ListAuthorizedViewsResponse message. Also converts values to other types if specified. + * @param message ListAuthorizedViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ListAuthorizedViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a ClusterState message. Also converts values to other types if specified. - * @param message ClusterState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.bigtable.admin.v2.Table.ClusterState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this ListAuthorizedViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ClusterState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for ListAuthorizedViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for ClusterState - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a GetAuthorizedViewRequest. */ + interface IGetAuthorizedViewRequest { - namespace ClusterState { + /** GetAuthorizedViewRequest name */ + name?: (string|null); - /** ReplicationState enum. */ - enum ReplicationState { - STATE_NOT_KNOWN = 0, - INITIALIZING = 1, - PLANNED_MAINTENANCE = 2, - UNPLANNED_MAINTENANCE = 3, - READY = 4, - READY_OPTIMIZING = 5 - } - } - - /** TimestampGranularity enum. */ - enum TimestampGranularity { - TIMESTAMP_GRANULARITY_UNSPECIFIED = 0, - MILLIS = 1 - } - - /** View enum. */ - enum View { - VIEW_UNSPECIFIED = 0, - NAME_ONLY = 1, - SCHEMA_VIEW = 2, - REPLICATION_VIEW = 3, - ENCRYPTION_VIEW = 5, - FULL = 4 - } - } - - /** Properties of a ColumnFamily. */ - interface IColumnFamily { - - /** ColumnFamily gcRule */ - gcRule?: (google.bigtable.admin.v2.IGcRule|null); + /** GetAuthorizedViewRequest view */ + view?: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView|null); } - /** Represents a ColumnFamily. */ - class ColumnFamily implements IColumnFamily { + /** Represents a GetAuthorizedViewRequest. */ + class GetAuthorizedViewRequest implements IGetAuthorizedViewRequest { /** - * Constructs a new ColumnFamily. + * Constructs a new GetAuthorizedViewRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IColumnFamily); + constructor(properties?: google.bigtable.admin.v2.IGetAuthorizedViewRequest); - /** ColumnFamily gcRule. */ - public gcRule?: (google.bigtable.admin.v2.IGcRule|null); + /** GetAuthorizedViewRequest name. */ + public name: string; + + /** GetAuthorizedViewRequest view. */ + public view: (google.bigtable.admin.v2.AuthorizedView.ResponseView|keyof typeof google.bigtable.admin.v2.AuthorizedView.ResponseView); /** - * Creates a new ColumnFamily instance using the specified properties. + * Creates a new GetAuthorizedViewRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ColumnFamily instance + * @returns GetAuthorizedViewRequest instance */ - public static create(properties?: google.bigtable.admin.v2.IColumnFamily): google.bigtable.admin.v2.ColumnFamily; + public static create(properties?: google.bigtable.admin.v2.IGetAuthorizedViewRequest): google.bigtable.admin.v2.GetAuthorizedViewRequest; /** - * Encodes the specified ColumnFamily message. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. - * @param message ColumnFamily message or plain object to encode + * Encodes the specified GetAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @param message GetAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.IColumnFamily, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IGetAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ColumnFamily message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. - * @param message ColumnFamily message or plain object to encode + * Encodes the specified GetAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @param message GetAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.IColumnFamily, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IGetAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ColumnFamily message from the specified reader or buffer. + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ColumnFamily + * @returns GetAuthorizedViewRequest * @throws {Error} If the payload is 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.bigtable.admin.v2.ColumnFamily; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.GetAuthorizedViewRequest; /** - * Decodes a ColumnFamily message from the specified reader or buffer, length delimited. + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ColumnFamily + * @returns GetAuthorizedViewRequest * @throws {Error} If the 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.bigtable.admin.v2.ColumnFamily; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.GetAuthorizedViewRequest; /** - * Verifies a ColumnFamily message. + * Verifies a GetAuthorizedViewRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ColumnFamily message from a plain object. Also converts values to their respective internal types. + * Creates a GetAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ColumnFamily + * @returns GetAuthorizedViewRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ColumnFamily; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GetAuthorizedViewRequest; /** - * Creates a plain object from a ColumnFamily message. Also converts values to other types if specified. - * @param message ColumnFamily + * Creates a plain object from a GetAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message GetAuthorizedViewRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.ColumnFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.GetAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ColumnFamily to JSON. + * Converts this GetAuthorizedViewRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ColumnFamily + * Gets the default type url for GetAuthorizedViewRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GcRule. */ - interface IGcRule { - - /** GcRule maxNumVersions */ - maxNumVersions?: (number|null); + /** Properties of an UpdateAuthorizedViewRequest. */ + interface IUpdateAuthorizedViewRequest { - /** GcRule maxAge */ - maxAge?: (google.protobuf.IDuration|null); + /** UpdateAuthorizedViewRequest authorizedView */ + authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); - /** GcRule intersection */ - intersection?: (google.bigtable.admin.v2.GcRule.IIntersection|null); + /** UpdateAuthorizedViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** GcRule union */ - union?: (google.bigtable.admin.v2.GcRule.IUnion|null); + /** UpdateAuthorizedViewRequest ignoreWarnings */ + ignoreWarnings?: (boolean|null); } - /** Represents a GcRule. */ - class GcRule implements IGcRule { + /** Represents an UpdateAuthorizedViewRequest. */ + class UpdateAuthorizedViewRequest implements IUpdateAuthorizedViewRequest { /** - * Constructs a new GcRule. + * Constructs a new UpdateAuthorizedViewRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IGcRule); - - /** GcRule maxNumVersions. */ - public maxNumVersions?: (number|null); - - /** GcRule maxAge. */ - public maxAge?: (google.protobuf.IDuration|null); + constructor(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest); - /** GcRule intersection. */ - public intersection?: (google.bigtable.admin.v2.GcRule.IIntersection|null); + /** UpdateAuthorizedViewRequest authorizedView. */ + public authorizedView?: (google.bigtable.admin.v2.IAuthorizedView|null); - /** GcRule union. */ - public union?: (google.bigtable.admin.v2.GcRule.IUnion|null); + /** UpdateAuthorizedViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** GcRule rule. */ - public rule?: ("maxNumVersions"|"maxAge"|"intersection"|"union"); + /** UpdateAuthorizedViewRequest ignoreWarnings. */ + public ignoreWarnings: boolean; /** - * Creates a new GcRule instance using the specified properties. + * Creates a new UpdateAuthorizedViewRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GcRule instance + * @returns UpdateAuthorizedViewRequest instance */ - public static create(properties?: google.bigtable.admin.v2.IGcRule): google.bigtable.admin.v2.GcRule; + public static create(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest): google.bigtable.admin.v2.UpdateAuthorizedViewRequest; /** - * Encodes the specified GcRule message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. - * @param message GcRule message or plain object to encode + * Encodes the specified UpdateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. + * @param message UpdateAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.IGcRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. - * @param message GcRule message or plain object to encode + * Encodes the specified UpdateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. + * @param message UpdateAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.IGcRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcRule message from the specified reader or buffer. + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcRule + * @returns UpdateAuthorizedViewRequest * @throws {Error} If the payload is 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.bigtable.admin.v2.GcRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.UpdateAuthorizedViewRequest; /** - * Decodes a GcRule message from the specified reader or buffer, length delimited. + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcRule + * @returns UpdateAuthorizedViewRequest * @throws {Error} If the 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.bigtable.admin.v2.GcRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.UpdateAuthorizedViewRequest; /** - * Verifies a GcRule message. + * Verifies an UpdateAuthorizedViewRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcRule message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcRule + * @returns UpdateAuthorizedViewRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateAuthorizedViewRequest; /** - * Creates a plain object from a GcRule message. Also converts values to other types if specified. - * @param message GcRule + * Creates a plain object from an UpdateAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message UpdateAuthorizedViewRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.GcRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.UpdateAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcRule to JSON. + * Converts this UpdateAuthorizedViewRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcRule + * Gets the default type url for UpdateAuthorizedViewRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GcRule { + /** Properties of an UpdateAuthorizedViewMetadata. */ + interface IUpdateAuthorizedViewMetadata { - /** Properties of an Intersection. */ - interface IIntersection { + /** UpdateAuthorizedViewMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null); - /** Intersection rules */ - rules?: (google.bigtable.admin.v2.IGcRule[]|null); - } + /** UpdateAuthorizedViewMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); - /** Represents an Intersection. */ - class Intersection implements IIntersection { + /** UpdateAuthorizedViewMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + } - /** - * Constructs a new Intersection. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.admin.v2.GcRule.IIntersection); + /** Represents an UpdateAuthorizedViewMetadata. */ + class UpdateAuthorizedViewMetadata implements IUpdateAuthorizedViewMetadata { - /** Intersection rules. */ - public rules: google.bigtable.admin.v2.IGcRule[]; + /** + * Constructs a new UpdateAuthorizedViewMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata); - /** - * Creates a new Intersection instance using the specified properties. - * @param [properties] Properties to set - * @returns Intersection instance - */ - public static create(properties?: google.bigtable.admin.v2.GcRule.IIntersection): google.bigtable.admin.v2.GcRule.Intersection; + /** UpdateAuthorizedViewMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null); - /** - * Encodes the specified Intersection message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. - * @param message Intersection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.bigtable.admin.v2.GcRule.IIntersection, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateAuthorizedViewMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified Intersection message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. - * @param message Intersection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.bigtable.admin.v2.GcRule.IIntersection, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateAuthorizedViewMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes an Intersection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Intersection - * @throws {Error} If the payload is 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.bigtable.admin.v2.GcRule.Intersection; + /** + * Creates a new UpdateAuthorizedViewMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAuthorizedViewMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata): google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; - /** - * Decodes an Intersection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Intersection - * @throws {Error} If the 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.bigtable.admin.v2.GcRule.Intersection; + /** + * Encodes the specified UpdateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @param message UpdateAuthorizedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an Intersection message. - * @param message 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 UpdateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @param message UpdateAuthorizedViewMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an Intersection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Intersection - */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule.Intersection; + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAuthorizedViewMetadata + * @throws {Error} If the payload is 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata; - /** - * Creates a plain object from an Intersection message. Also converts values to other types if specified. - * @param message Intersection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.bigtable.admin.v2.GcRule.Intersection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAuthorizedViewMetadata + * @throws {Error} If the 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata; - /** - * Converts this Intersection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies an UpdateAuthorizedViewMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for Intersection - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates an UpdateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAuthorizedViewMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; - /** Properties of an Union. */ - interface IUnion { + /** + * Creates a plain object from an UpdateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @param message UpdateAuthorizedViewMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.UpdateAuthorizedViewMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Union rules */ - rules?: (google.bigtable.admin.v2.IGcRule[]|null); - } + /** + * Converts this UpdateAuthorizedViewMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents an Union. */ - class Union implements IUnion { - - /** - * Constructs a new Union. - * @param [properties] Properties to set - */ - constructor(properties?: google.bigtable.admin.v2.GcRule.IUnion); - - /** Union rules. */ - public rules: google.bigtable.admin.v2.IGcRule[]; - - /** - * Creates a new Union instance using the specified properties. - * @param [properties] Properties to set - * @returns Union instance - */ - public static create(properties?: google.bigtable.admin.v2.GcRule.IUnion): google.bigtable.admin.v2.GcRule.Union; - - /** - * Encodes the specified Union message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. - * @param message Union message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.bigtable.admin.v2.GcRule.IUnion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Union message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. - * @param message Union message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.bigtable.admin.v2.GcRule.IUnion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Union message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Union - * @throws {Error} If the payload is 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.bigtable.admin.v2.GcRule.Union; - - /** - * Decodes an Union message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Union - * @throws {Error} If the 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.bigtable.admin.v2.GcRule.Union; - - /** - * Verifies an Union message. - * @param message Plain 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 Union message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Union - */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule.Union; - - /** - * Creates a plain object from an Union message. Also converts values to other types if specified. - * @param message Union - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.bigtable.admin.v2.GcRule.Union, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Union to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Union - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for UpdateAuthorizedViewMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EncryptionInfo. */ - interface IEncryptionInfo { - - /** EncryptionInfo encryptionType */ - encryptionType?: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null); + /** Properties of a DeleteAuthorizedViewRequest. */ + interface IDeleteAuthorizedViewRequest { - /** EncryptionInfo encryptionStatus */ - encryptionStatus?: (google.rpc.IStatus|null); + /** DeleteAuthorizedViewRequest name */ + name?: (string|null); - /** EncryptionInfo kmsKeyVersion */ - kmsKeyVersion?: (string|null); + /** DeleteAuthorizedViewRequest etag */ + etag?: (string|null); } - /** Represents an EncryptionInfo. */ - class EncryptionInfo implements IEncryptionInfo { + /** Represents a DeleteAuthorizedViewRequest. */ + class DeleteAuthorizedViewRequest implements IDeleteAuthorizedViewRequest { /** - * Constructs a new EncryptionInfo. + * Constructs a new DeleteAuthorizedViewRequest. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IEncryptionInfo); - - /** EncryptionInfo encryptionType. */ - public encryptionType: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType); + constructor(properties?: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest); - /** EncryptionInfo encryptionStatus. */ - public encryptionStatus?: (google.rpc.IStatus|null); + /** DeleteAuthorizedViewRequest name. */ + public name: string; - /** EncryptionInfo kmsKeyVersion. */ - public kmsKeyVersion: string; + /** DeleteAuthorizedViewRequest etag. */ + public etag: string; /** - * Creates a new EncryptionInfo instance using the specified properties. + * Creates a new DeleteAuthorizedViewRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EncryptionInfo instance + * @returns DeleteAuthorizedViewRequest instance */ - public static create(properties?: google.bigtable.admin.v2.IEncryptionInfo): google.bigtable.admin.v2.EncryptionInfo; + public static create(properties?: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest): google.bigtable.admin.v2.DeleteAuthorizedViewRequest; /** - * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. - * @param message EncryptionInfo message or plain object to encode + * Encodes the specified DeleteAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @param message DeleteAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. - * @param message EncryptionInfo message or plain object to encode + * Encodes the specified DeleteAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @param message DeleteAuthorizedViewRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EncryptionInfo message from the specified reader or buffer. + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EncryptionInfo + * @returns DeleteAuthorizedViewRequest * @throws {Error} If the payload is 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.bigtable.admin.v2.EncryptionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.DeleteAuthorizedViewRequest; /** - * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EncryptionInfo + * @returns DeleteAuthorizedViewRequest * @throws {Error} If the 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.bigtable.admin.v2.EncryptionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.DeleteAuthorizedViewRequest; /** - * Verifies an EncryptionInfo message. + * Verifies a DeleteAuthorizedViewRequest message. * @param message Plain 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 EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EncryptionInfo + * @returns DeleteAuthorizedViewRequest */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.EncryptionInfo; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.DeleteAuthorizedViewRequest; /** - * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. - * @param message EncryptionInfo + * Creates a plain object from a DeleteAuthorizedViewRequest message. Also converts values to other types if specified. + * @param message DeleteAuthorizedViewRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.EncryptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.DeleteAuthorizedViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EncryptionInfo to JSON. + * Converts this DeleteAuthorizedViewRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EncryptionInfo + * Gets the default type url for DeleteAuthorizedViewRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EncryptionInfo { - - /** EncryptionType enum. */ - enum EncryptionType { - ENCRYPTION_TYPE_UNSPECIFIED = 0, - GOOGLE_DEFAULT_ENCRYPTION = 1, - CUSTOMER_MANAGED_ENCRYPTION = 2 - } - } - - /** Properties of a Snapshot. */ - interface ISnapshot { - - /** Snapshot name */ - name?: (string|null); - - /** Snapshot sourceTable */ - sourceTable?: (google.bigtable.admin.v2.ITable|null); - - /** Snapshot dataSizeBytes */ - dataSizeBytes?: (number|Long|string|null); - - /** Snapshot createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Snapshot deleteTime */ - deleteTime?: (google.protobuf.ITimestamp|null); + /** Properties of a RestoreInfo. */ + interface IRestoreInfo { - /** Snapshot state */ - state?: (google.bigtable.admin.v2.Snapshot.State|keyof typeof google.bigtable.admin.v2.Snapshot.State|null); + /** RestoreInfo sourceType */ + sourceType?: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType|null); - /** Snapshot description */ - description?: (string|null); + /** RestoreInfo backupInfo */ + backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); } - /** Represents a Snapshot. */ - class Snapshot implements ISnapshot { + /** Represents a RestoreInfo. */ + class RestoreInfo implements IRestoreInfo { /** - * Constructs a new Snapshot. + * Constructs a new RestoreInfo. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.ISnapshot); - - /** Snapshot name. */ - public name: string; - - /** Snapshot sourceTable. */ - public sourceTable?: (google.bigtable.admin.v2.ITable|null); - - /** Snapshot dataSizeBytes. */ - public dataSizeBytes: (number|Long|string); - - /** Snapshot createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.bigtable.admin.v2.IRestoreInfo); - /** Snapshot deleteTime. */ - public deleteTime?: (google.protobuf.ITimestamp|null); + /** RestoreInfo sourceType. */ + public sourceType: (google.bigtable.admin.v2.RestoreSourceType|keyof typeof google.bigtable.admin.v2.RestoreSourceType); - /** Snapshot state. */ - public state: (google.bigtable.admin.v2.Snapshot.State|keyof typeof google.bigtable.admin.v2.Snapshot.State); + /** RestoreInfo backupInfo. */ + public backupInfo?: (google.bigtable.admin.v2.IBackupInfo|null); - /** Snapshot description. */ - public description: string; + /** RestoreInfo sourceInfo. */ + public sourceInfo?: "backupInfo"; /** - * Creates a new Snapshot instance using the specified properties. + * Creates a new RestoreInfo instance using the specified properties. * @param [properties] Properties to set - * @returns Snapshot instance + * @returns RestoreInfo instance */ - public static create(properties?: google.bigtable.admin.v2.ISnapshot): google.bigtable.admin.v2.Snapshot; + public static create(properties?: google.bigtable.admin.v2.IRestoreInfo): google.bigtable.admin.v2.RestoreInfo; /** - * Encodes the specified Snapshot message. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode + * Encodes the specified RestoreInfo message. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @param message RestoreInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IRestoreInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode + * Encodes the specified RestoreInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @param message RestoreInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IRestoreInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Snapshot message from the specified reader or buffer. + * Decodes a RestoreInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Snapshot + * @returns RestoreInfo * @throws {Error} If the payload is 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.bigtable.admin.v2.Snapshot; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.RestoreInfo; /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * Decodes a RestoreInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Snapshot + * @returns RestoreInfo * @throws {Error} If the 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.bigtable.admin.v2.Snapshot; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.RestoreInfo; /** - * Verifies a Snapshot message. + * Verifies a RestoreInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Snapshot + * @returns RestoreInfo */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Snapshot; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.RestoreInfo; /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @param message Snapshot + * Creates a plain object from a RestoreInfo message. Also converts values to other types if specified. + * @param message RestoreInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.RestoreInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Snapshot to JSON. + * Converts this RestoreInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Snapshot + * Gets the default type url for RestoreInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Snapshot { - - /** State enum. */ - enum State { - STATE_NOT_KNOWN = 0, - READY = 1, - CREATING = 2 - } - } - - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup sourceTable */ - sourceTable?: (string|null); - - /** Backup sourceBackup */ - sourceBackup?: (string|null); - - /** Backup expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Backup endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Backup sizeBytes */ - sizeBytes?: (number|Long|string|null); - - /** Backup state */ - state?: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State|null); + /** Properties of a ChangeStreamConfig. */ + interface IChangeStreamConfig { - /** Backup encryptionInfo */ - encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + /** ChangeStreamConfig retentionPeriod */ + retentionPeriod?: (google.protobuf.IDuration|null); } - /** Represents a Backup. */ - class Backup implements IBackup { + /** Represents a ChangeStreamConfig. */ + class ChangeStreamConfig implements IChangeStreamConfig { /** - * Constructs a new Backup. + * Constructs a new ChangeStreamConfig. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup sourceTable. */ - public sourceTable: string; - - /** Backup sourceBackup. */ - public sourceBackup: string; - - /** Backup expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Backup endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Backup sizeBytes. */ - public sizeBytes: (number|Long|string); - - /** Backup state. */ - public state: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State); + constructor(properties?: google.bigtable.admin.v2.IChangeStreamConfig); - /** Backup encryptionInfo. */ - public encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + /** ChangeStreamConfig retentionPeriod. */ + public retentionPeriod?: (google.protobuf.IDuration|null); /** - * Creates a new Backup instance using the specified properties. + * Creates a new ChangeStreamConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Backup instance + * @returns ChangeStreamConfig instance */ - public static create(properties?: google.bigtable.admin.v2.IBackup): google.bigtable.admin.v2.Backup; + public static create(properties?: google.bigtable.admin.v2.IChangeStreamConfig): google.bigtable.admin.v2.ChangeStreamConfig; /** - * Encodes the specified Backup message. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @param message ChangeStreamConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.bigtable.admin.v2.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.IChangeStreamConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode + * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @param message ChangeStreamConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.bigtable.admin.v2.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.bigtable.admin.v2.IChangeStreamConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a ChangeStreamConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Backup + * @returns ChangeStreamConfig * @throws {Error} If the payload is 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.bigtable.admin.v2.Backup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.ChangeStreamConfig; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Backup + * @returns ChangeStreamConfig * @throws {Error} If the 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.bigtable.admin.v2.Backup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.ChangeStreamConfig; /** - * Verifies a Backup message. + * Verifies a ChangeStreamConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Backup + * @returns ChangeStreamConfig */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Backup; + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ChangeStreamConfig; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup + * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. + * @param message ChangeStreamConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.bigtable.admin.v2.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.bigtable.admin.v2.ChangeStreamConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Backup to JSON. + * Converts this ChangeStreamConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Backup + * Gets the default type url for ChangeStreamConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Backup { + /** Properties of a Table. */ + interface ITable { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2 - } - } + /** Table name */ + name?: (string|null); - /** Properties of a BackupInfo. */ - interface IBackupInfo { + /** Table clusterStates */ + clusterStates?: ({ [k: string]: google.bigtable.admin.v2.Table.IClusterState }|null); - /** BackupInfo backup */ - backup?: (string|null); + /** Table columnFamilies */ + columnFamilies?: ({ [k: string]: google.bigtable.admin.v2.IColumnFamily }|null); - /** BackupInfo startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** Table granularity */ + granularity?: (google.bigtable.admin.v2.Table.TimestampGranularity|keyof typeof google.bigtable.admin.v2.Table.TimestampGranularity|null); - /** BackupInfo endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Table restoreInfo */ + restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); - /** BackupInfo sourceTable */ - sourceTable?: (string|null); + /** Table changeStreamConfig */ + changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); - /** BackupInfo sourceBackup */ - sourceBackup?: (string|null); + /** Table deletionProtection */ + deletionProtection?: (boolean|null); + + /** Table automatedBackupPolicy */ + automatedBackupPolicy?: (google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null); } - /** Represents a BackupInfo. */ - class BackupInfo implements IBackupInfo { + /** Represents a Table. */ + class Table implements ITable { /** - * Constructs a new BackupInfo. + * Constructs a new Table. * @param [properties] Properties to set */ - constructor(properties?: google.bigtable.admin.v2.IBackupInfo); + constructor(properties?: google.bigtable.admin.v2.ITable); - /** BackupInfo backup. */ - public backup: string; + /** Table name. */ + public name: string; - /** BackupInfo startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** Table clusterStates. */ + public clusterStates: { [k: string]: google.bigtable.admin.v2.Table.IClusterState }; - /** BackupInfo endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** Table columnFamilies. */ + public columnFamilies: { [k: string]: google.bigtable.admin.v2.IColumnFamily }; - /** BackupInfo sourceTable. */ - public sourceTable: string; + /** Table granularity. */ + public granularity: (google.bigtable.admin.v2.Table.TimestampGranularity|keyof typeof google.bigtable.admin.v2.Table.TimestampGranularity); - /** BackupInfo sourceBackup. */ - public sourceBackup: string; + /** Table restoreInfo. */ + public restoreInfo?: (google.bigtable.admin.v2.IRestoreInfo|null); + + /** Table changeStreamConfig. */ + public changeStreamConfig?: (google.bigtable.admin.v2.IChangeStreamConfig|null); + + /** Table deletionProtection. */ + public deletionProtection: boolean; + + /** Table automatedBackupPolicy. */ + public automatedBackupPolicy?: (google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null); + + /** Table automatedBackupConfig. */ + public automatedBackupConfig?: "automatedBackupPolicy"; /** - * Creates a new BackupInfo instance using the specified properties. + * Creates a new Table instance using the specified properties. * @param [properties] Properties to set - * @returns BackupInfo instance + * @returns Table instance */ - public static create(properties?: google.bigtable.admin.v2.IBackupInfo): google.bigtable.admin.v2.BackupInfo; + public static create(properties?: google.bigtable.admin.v2.ITable): google.bigtable.admin.v2.Table; /** - * Encodes the specified BackupInfo message. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. - * @param message BackupInfo message or plain object to encode + * Encodes the specified Table message. Does not implicitly {@link google.bigtable.admin.v2.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: google.bigtable.admin.v2.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.bigtable.admin.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Table message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.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: google.bigtable.admin.v2.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): google.bigtable.admin.v2.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)): google.bigtable.admin.v2.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 }): google.bigtable.admin.v2.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: google.bigtable.admin.v2.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Table to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Table + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Table { + + /** Properties of a ClusterState. */ + interface IClusterState { + + /** ClusterState replicationState */ + replicationState?: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null); + + /** ClusterState encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo[]|null); + } + + /** Represents a ClusterState. */ + class ClusterState implements IClusterState { + + /** + * Constructs a new ClusterState. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Table.IClusterState); + + /** ClusterState replicationState. */ + public replicationState: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState); + + /** ClusterState encryptionInfo. */ + public encryptionInfo: google.bigtable.admin.v2.IEncryptionInfo[]; + + /** + * Creates a new ClusterState instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterState instance + */ + public static create(properties?: google.bigtable.admin.v2.Table.IClusterState): google.bigtable.admin.v2.Table.ClusterState; + + /** + * Encodes the specified ClusterState message. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @param message ClusterState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Table.IClusterState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterState message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @param message ClusterState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Table.IClusterState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterState + * @throws {Error} If the payload is 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.bigtable.admin.v2.Table.ClusterState; + + /** + * Decodes a ClusterState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterState + * @throws {Error} If the 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.bigtable.admin.v2.Table.ClusterState; + + /** + * Verifies a ClusterState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterState + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table.ClusterState; + + /** + * Creates a plain object from a ClusterState message. Also converts values to other types if specified. + * @param message ClusterState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Table.ClusterState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClusterState { + + /** ReplicationState enum. */ + enum ReplicationState { + STATE_NOT_KNOWN = 0, + INITIALIZING = 1, + PLANNED_MAINTENANCE = 2, + UNPLANNED_MAINTENANCE = 3, + READY = 4, + READY_OPTIMIZING = 5 + } + } + + /** TimestampGranularity enum. */ + enum TimestampGranularity { + TIMESTAMP_GRANULARITY_UNSPECIFIED = 0, + MILLIS = 1 + } + + /** View enum. */ + enum View { + VIEW_UNSPECIFIED = 0, + NAME_ONLY = 1, + SCHEMA_VIEW = 2, + REPLICATION_VIEW = 3, + ENCRYPTION_VIEW = 5, + FULL = 4 + } + + /** Properties of an AutomatedBackupPolicy. */ + interface IAutomatedBackupPolicy { + + /** AutomatedBackupPolicy retentionPeriod */ + retentionPeriod?: (google.protobuf.IDuration|null); + + /** AutomatedBackupPolicy frequency */ + frequency?: (google.protobuf.IDuration|null); + } + + /** Represents an AutomatedBackupPolicy. */ + class AutomatedBackupPolicy implements IAutomatedBackupPolicy { + + /** + * Constructs a new AutomatedBackupPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy); + + /** AutomatedBackupPolicy retentionPeriod. */ + public retentionPeriod?: (google.protobuf.IDuration|null); + + /** AutomatedBackupPolicy frequency. */ + public frequency?: (google.protobuf.IDuration|null); + + /** + * Creates a new AutomatedBackupPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomatedBackupPolicy instance + */ + public static create(properties?: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy): google.bigtable.admin.v2.Table.AutomatedBackupPolicy; + + /** + * Encodes the specified AutomatedBackupPolicy message. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @param message AutomatedBackupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomatedBackupPolicy message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @param message AutomatedBackupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Table.IAutomatedBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomatedBackupPolicy + * @throws {Error} If the payload is 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.bigtable.admin.v2.Table.AutomatedBackupPolicy; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomatedBackupPolicy + * @throws {Error} If the 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.bigtable.admin.v2.Table.AutomatedBackupPolicy; + + /** + * Verifies an AutomatedBackupPolicy message. + * @param message Plain 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 AutomatedBackupPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomatedBackupPolicy + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Table.AutomatedBackupPolicy; + + /** + * Creates a plain object from an AutomatedBackupPolicy message. Also converts values to other types if specified. + * @param message AutomatedBackupPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Table.AutomatedBackupPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomatedBackupPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomatedBackupPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AuthorizedView. */ + interface IAuthorizedView { + + /** AuthorizedView name */ + name?: (string|null); + + /** AuthorizedView subsetView */ + subsetView?: (google.bigtable.admin.v2.AuthorizedView.ISubsetView|null); + + /** AuthorizedView etag */ + etag?: (string|null); + + /** AuthorizedView deletionProtection */ + deletionProtection?: (boolean|null); + } + + /** Represents an AuthorizedView. */ + class AuthorizedView implements IAuthorizedView { + + /** + * Constructs a new AuthorizedView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAuthorizedView); + + /** AuthorizedView name. */ + public name: string; + + /** AuthorizedView subsetView. */ + public subsetView?: (google.bigtable.admin.v2.AuthorizedView.ISubsetView|null); + + /** AuthorizedView etag. */ + public etag: string; + + /** AuthorizedView deletionProtection. */ + public deletionProtection: boolean; + + /** AuthorizedView authorizedView. */ + public authorizedView?: "subsetView"; + + /** + * Creates a new AuthorizedView instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorizedView instance + */ + public static create(properties?: google.bigtable.admin.v2.IAuthorizedView): google.bigtable.admin.v2.AuthorizedView; + + /** + * Encodes the specified AuthorizedView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @param message AuthorizedView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAuthorizedView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorizedView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @param message AuthorizedView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAuthorizedView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorizedView + * @throws {Error} If the payload is 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.bigtable.admin.v2.AuthorizedView; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorizedView + * @throws {Error} If the 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.bigtable.admin.v2.AuthorizedView; + + /** + * Verifies an AuthorizedView message. + * @param message Plain 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 AuthorizedView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorizedView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AuthorizedView; + + /** + * Creates a plain object from an AuthorizedView message. Also converts values to other types if specified. + * @param message AuthorizedView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AuthorizedView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorizedView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorizedView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuthorizedView { + + /** Properties of a FamilySubsets. */ + interface IFamilySubsets { + + /** FamilySubsets qualifiers */ + qualifiers?: (Uint8Array[]|null); + + /** FamilySubsets qualifierPrefixes */ + qualifierPrefixes?: (Uint8Array[]|null); + } + + /** Represents a FamilySubsets. */ + class FamilySubsets implements IFamilySubsets { + + /** + * Constructs a new FamilySubsets. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets); + + /** FamilySubsets qualifiers. */ + public qualifiers: Uint8Array[]; + + /** FamilySubsets qualifierPrefixes. */ + public qualifierPrefixes: Uint8Array[]; + + /** + * Creates a new FamilySubsets instance using the specified properties. + * @param [properties] Properties to set + * @returns FamilySubsets instance + */ + public static create(properties?: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets): google.bigtable.admin.v2.AuthorizedView.FamilySubsets; + + /** + * Encodes the specified FamilySubsets message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @param message FamilySubsets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FamilySubsets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @param message FamilySubsets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FamilySubsets + * @throws {Error} If the payload is 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.bigtable.admin.v2.AuthorizedView.FamilySubsets; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FamilySubsets + * @throws {Error} If the 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.bigtable.admin.v2.AuthorizedView.FamilySubsets; + + /** + * Verifies a FamilySubsets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FamilySubsets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FamilySubsets + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AuthorizedView.FamilySubsets; + + /** + * Creates a plain object from a FamilySubsets message. Also converts values to other types if specified. + * @param message FamilySubsets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AuthorizedView.FamilySubsets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FamilySubsets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FamilySubsets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubsetView. */ + interface ISubsetView { + + /** SubsetView rowPrefixes */ + rowPrefixes?: (Uint8Array[]|null); + + /** SubsetView familySubsets */ + familySubsets?: ({ [k: string]: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets }|null); + } + + /** Represents a SubsetView. */ + class SubsetView implements ISubsetView { + + /** + * Constructs a new SubsetView. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.AuthorizedView.ISubsetView); + + /** SubsetView rowPrefixes. */ + public rowPrefixes: Uint8Array[]; + + /** SubsetView familySubsets. */ + public familySubsets: { [k: string]: google.bigtable.admin.v2.AuthorizedView.IFamilySubsets }; + + /** + * Creates a new SubsetView instance using the specified properties. + * @param [properties] Properties to set + * @returns SubsetView instance + */ + public static create(properties?: google.bigtable.admin.v2.AuthorizedView.ISubsetView): google.bigtable.admin.v2.AuthorizedView.SubsetView; + + /** + * Encodes the specified SubsetView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @param message SubsetView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.AuthorizedView.ISubsetView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubsetView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @param message SubsetView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.AuthorizedView.ISubsetView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubsetView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubsetView + * @throws {Error} If the payload is 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.bigtable.admin.v2.AuthorizedView.SubsetView; + + /** + * Decodes a SubsetView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubsetView + * @throws {Error} If the 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.bigtable.admin.v2.AuthorizedView.SubsetView; + + /** + * Verifies a SubsetView message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubsetView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubsetView + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AuthorizedView.SubsetView; + + /** + * Creates a plain object from a SubsetView message. Also converts values to other types if specified. + * @param message SubsetView + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AuthorizedView.SubsetView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubsetView to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubsetView + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ResponseView enum. */ + enum ResponseView { + RESPONSE_VIEW_UNSPECIFIED = 0, + NAME_ONLY = 1, + BASIC = 2, + FULL = 3 + } + } + + /** Properties of a ColumnFamily. */ + interface IColumnFamily { + + /** ColumnFamily gcRule */ + gcRule?: (google.bigtable.admin.v2.IGcRule|null); + + /** ColumnFamily valueType */ + valueType?: (google.bigtable.admin.v2.IType|null); + } + + /** Represents a ColumnFamily. */ + class ColumnFamily implements IColumnFamily { + + /** + * Constructs a new ColumnFamily. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IColumnFamily); + + /** ColumnFamily gcRule. */ + public gcRule?: (google.bigtable.admin.v2.IGcRule|null); + + /** ColumnFamily valueType. */ + public valueType?: (google.bigtable.admin.v2.IType|null); + + /** + * Creates a new ColumnFamily instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnFamily instance + */ + public static create(properties?: google.bigtable.admin.v2.IColumnFamily): google.bigtable.admin.v2.ColumnFamily; + + /** + * Encodes the specified ColumnFamily message. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @param message ColumnFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IColumnFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnFamily message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @param message ColumnFamily message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IColumnFamily, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnFamily + * @throws {Error} If the payload is 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.bigtable.admin.v2.ColumnFamily; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnFamily + * @throws {Error} If the 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.bigtable.admin.v2.ColumnFamily; + + /** + * Verifies a ColumnFamily message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnFamily message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnFamily + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.ColumnFamily; + + /** + * Creates a plain object from a ColumnFamily message. Also converts values to other types if specified. + * @param message ColumnFamily + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.ColumnFamily, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnFamily to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnFamily + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcRule. */ + interface IGcRule { + + /** GcRule maxNumVersions */ + maxNumVersions?: (number|null); + + /** GcRule maxAge */ + maxAge?: (google.protobuf.IDuration|null); + + /** GcRule intersection */ + intersection?: (google.bigtable.admin.v2.GcRule.IIntersection|null); + + /** GcRule union */ + union?: (google.bigtable.admin.v2.GcRule.IUnion|null); + } + + /** Represents a GcRule. */ + class GcRule implements IGcRule { + + /** + * Constructs a new GcRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IGcRule); + + /** GcRule maxNumVersions. */ + public maxNumVersions?: (number|null); + + /** GcRule maxAge. */ + public maxAge?: (google.protobuf.IDuration|null); + + /** GcRule intersection. */ + public intersection?: (google.bigtable.admin.v2.GcRule.IIntersection|null); + + /** GcRule union. */ + public union?: (google.bigtable.admin.v2.GcRule.IUnion|null); + + /** GcRule rule. */ + public rule?: ("maxNumVersions"|"maxAge"|"intersection"|"union"); + + /** + * Creates a new GcRule instance using the specified properties. + * @param [properties] Properties to set + * @returns GcRule instance + */ + public static create(properties?: google.bigtable.admin.v2.IGcRule): google.bigtable.admin.v2.GcRule; + + /** + * Encodes the specified GcRule message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @param message GcRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IGcRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @param message GcRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IGcRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcRule + * @throws {Error} If the payload is 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.bigtable.admin.v2.GcRule; + + /** + * Decodes a GcRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcRule + * @throws {Error} If the 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.bigtable.admin.v2.GcRule; + + /** + * Verifies a GcRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcRule + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule; + + /** + * Creates a plain object from a GcRule message. Also converts values to other types if specified. + * @param message GcRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GcRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GcRule { + + /** Properties of an Intersection. */ + interface IIntersection { + + /** Intersection rules */ + rules?: (google.bigtable.admin.v2.IGcRule[]|null); + } + + /** Represents an Intersection. */ + class Intersection implements IIntersection { + + /** + * Constructs a new Intersection. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.GcRule.IIntersection); + + /** Intersection rules. */ + public rules: google.bigtable.admin.v2.IGcRule[]; + + /** + * Creates a new Intersection instance using the specified properties. + * @param [properties] Properties to set + * @returns Intersection instance + */ + public static create(properties?: google.bigtable.admin.v2.GcRule.IIntersection): google.bigtable.admin.v2.GcRule.Intersection; + + /** + * Encodes the specified Intersection message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @param message Intersection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.GcRule.IIntersection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Intersection message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @param message Intersection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.GcRule.IIntersection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Intersection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Intersection + * @throws {Error} If the payload is 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.bigtable.admin.v2.GcRule.Intersection; + + /** + * Decodes an Intersection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Intersection + * @throws {Error} If the 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.bigtable.admin.v2.GcRule.Intersection; + + /** + * Verifies an Intersection message. + * @param message Plain 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 Intersection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Intersection + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule.Intersection; + + /** + * Creates a plain object from an Intersection message. Also converts values to other types if specified. + * @param message Intersection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GcRule.Intersection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Intersection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Intersection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Union. */ + interface IUnion { + + /** Union rules */ + rules?: (google.bigtable.admin.v2.IGcRule[]|null); + } + + /** Represents an Union. */ + class Union implements IUnion { + + /** + * Constructs a new Union. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.GcRule.IUnion); + + /** Union rules. */ + public rules: google.bigtable.admin.v2.IGcRule[]; + + /** + * Creates a new Union instance using the specified properties. + * @param [properties] Properties to set + * @returns Union instance + */ + public static create(properties?: google.bigtable.admin.v2.GcRule.IUnion): google.bigtable.admin.v2.GcRule.Union; + + /** + * Encodes the specified Union message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @param message Union message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.GcRule.IUnion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Union message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @param message Union message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.GcRule.IUnion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Union message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Union + * @throws {Error} If the payload is 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.bigtable.admin.v2.GcRule.Union; + + /** + * Decodes an Union message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Union + * @throws {Error} If the 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.bigtable.admin.v2.GcRule.Union; + + /** + * Verifies an Union message. + * @param message Plain 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 Union message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Union + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.GcRule.Union; + + /** + * Creates a plain object from an Union message. Also converts values to other types if specified. + * @param message Union + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.GcRule.Union, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Union to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Union + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EncryptionInfo. */ + interface IEncryptionInfo { + + /** EncryptionInfo encryptionType */ + encryptionType?: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null); + + /** EncryptionInfo encryptionStatus */ + encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion */ + kmsKeyVersion?: (string|null); + } + + /** Represents an EncryptionInfo. */ + class EncryptionInfo implements IEncryptionInfo { + + /** + * Constructs a new EncryptionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IEncryptionInfo); + + /** EncryptionInfo encryptionType. */ + public encryptionType: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType); + + /** EncryptionInfo encryptionStatus. */ + public encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion. */ + public kmsKeyVersion: string; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IEncryptionInfo): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionInfo + * @throws {Error} If the payload is 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.bigtable.admin.v2.EncryptionInfo; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionInfo + * @throws {Error} If the 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.bigtable.admin.v2.EncryptionInfo; + + /** + * Verifies an EncryptionInfo message. + * @param message Plain 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 EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @param message EncryptionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.EncryptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EncryptionInfo { + + /** EncryptionType enum. */ + enum EncryptionType { + ENCRYPTION_TYPE_UNSPECIFIED = 0, + GOOGLE_DEFAULT_ENCRYPTION = 1, + CUSTOMER_MANAGED_ENCRYPTION = 2 + } + } + + /** Properties of a Snapshot. */ + interface ISnapshot { + + /** Snapshot name */ + name?: (string|null); + + /** Snapshot sourceTable */ + sourceTable?: (google.bigtable.admin.v2.ITable|null); + + /** Snapshot dataSizeBytes */ + dataSizeBytes?: (number|Long|string|null); + + /** Snapshot createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot state */ + state?: (google.bigtable.admin.v2.Snapshot.State|keyof typeof google.bigtable.admin.v2.Snapshot.State|null); + + /** Snapshot description */ + description?: (string|null); + } + + /** Represents a Snapshot. */ + class Snapshot implements ISnapshot { + + /** + * Constructs a new Snapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.ISnapshot); + + /** Snapshot name. */ + public name: string; + + /** Snapshot sourceTable. */ + public sourceTable?: (google.bigtable.admin.v2.ITable|null); + + /** Snapshot dataSizeBytes. */ + public dataSizeBytes: (number|Long|string); + + /** Snapshot createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot state. */ + public state: (google.bigtable.admin.v2.Snapshot.State|keyof typeof google.bigtable.admin.v2.Snapshot.State); + + /** Snapshot description. */ + public description: string; + + /** + * Creates a new Snapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns Snapshot instance + */ + public static create(properties?: google.bigtable.admin.v2.ISnapshot): google.bigtable.admin.v2.Snapshot; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Snapshot + * @throws {Error} If the payload is 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.bigtable.admin.v2.Snapshot; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Snapshot + * @throws {Error} If the 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.bigtable.admin.v2.Snapshot; + + /** + * Verifies a Snapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Snapshot + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Snapshot; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @param message Snapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Snapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Snapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Snapshot { + + /** State enum. */ + enum State { + STATE_NOT_KNOWN = 0, + READY = 1, + CREATING = 2 + } + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup sourceTable */ + sourceTable?: (string|null); + + /** Backup sourceBackup */ + sourceBackup?: (string|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Backup sizeBytes */ + sizeBytes?: (number|Long|string|null); + + /** Backup state */ + state?: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State|null); + + /** Backup encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup sourceTable. */ + public sourceTable: string; + + /** Backup sourceBackup. */ + public sourceBackup: string; + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Backup endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Backup sizeBytes. */ + public sizeBytes: (number|Long|string); + + /** Backup state. */ + public state: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State); + + /** Backup encryptionInfo. */ + public encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.bigtable.admin.v2.IBackup): google.bigtable.admin.v2.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is 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.bigtable.admin.v2.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the 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.bigtable.admin.v2.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2 + } + } + + /** Properties of a BackupInfo. */ + interface IBackupInfo { + + /** BackupInfo backup */ + backup?: (string|null); + + /** BackupInfo startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo sourceTable */ + sourceTable?: (string|null); + + /** BackupInfo sourceBackup */ + sourceBackup?: (string|null); + } + + /** Represents a BackupInfo. */ + class BackupInfo implements IBackupInfo { + + /** + * Constructs a new BackupInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IBackupInfo); + + /** BackupInfo backup. */ + public backup: string; + + /** BackupInfo startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BackupInfo sourceTable. */ + public sourceTable: string; + + /** BackupInfo sourceBackup. */ + public sourceBackup: string; + + /** + * Creates a new BackupInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IBackupInfo): google.bigtable.admin.v2.BackupInfo; + + /** + * Encodes the specified BackupInfo message. Does not implicitly {@link google.bigtable.admin.v2.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: google.bigtable.admin.v2.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.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: google.bigtable.admin.v2.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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): google.bigtable.admin.v2.BackupInfo; + + /** + * Decodes a BackupInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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)): google.bigtable.admin.v2.BackupInfo; + + /** + * 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); + + /** + * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.BackupInfo; + + /** + * 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: google.bigtable.admin.v2.BackupInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RestoreSourceType enum. */ + enum RestoreSourceType { + RESTORE_SOURCE_TYPE_UNSPECIFIED = 0, + BACKUP = 1 + } + + /** Properties of a Type. */ + interface IType { + + /** Type bytesType */ + bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + + /** Type int64Type */ + int64Type?: (google.bigtable.admin.v2.Type.IInt64|null); + + /** Type aggregateType */ + aggregateType?: (google.bigtable.admin.v2.Type.IAggregate|null); + } + + /** Represents a Type. */ + class Type implements IType { + + /** + * Constructs a new Type. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IType); + + /** Type bytesType. */ + public bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + + /** Type int64Type. */ + public int64Type?: (google.bigtable.admin.v2.Type.IInt64|null); + + /** Type aggregateType. */ + public aggregateType?: (google.bigtable.admin.v2.Type.IAggregate|null); + + /** Type kind. */ + public kind?: ("bytesType"|"int64Type"|"aggregateType"); + + /** + * Creates a new Type instance using the specified properties. + * @param [properties] Properties to set + * @returns Type instance + */ + public static create(properties?: google.bigtable.admin.v2.IType): google.bigtable.admin.v2.Type; + + /** + * Encodes the specified Type message. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. + * @param message Type message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Type message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Type + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type; + + /** + * Decodes a Type message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Type + * @throws {Error} If the 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.bigtable.admin.v2.Type; + + /** + * Verifies a Type message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Type message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Type + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type; + + /** + * Creates a plain object from a Type message. Also converts values to other types if specified. + * @param message Type + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Type to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Type + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Type { + + /** Properties of a Bytes. */ + interface IBytes { + + /** Bytes encoding */ + encoding?: (google.bigtable.admin.v2.Type.Bytes.IEncoding|null); + } + + /** Represents a Bytes. */ + class Bytes implements IBytes { + + /** + * Constructs a new Bytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IBytes); + + /** Bytes encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.Bytes.IEncoding|null); + + /** + * Creates a new Bytes instance using the specified properties. + * @param [properties] Properties to set + * @returns Bytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IBytes): google.bigtable.admin.v2.Type.Bytes; + + /** + * Encodes the specified Bytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @param message Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Bytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @param message Bytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Bytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Bytes + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Bytes; + + /** + * Decodes a Bytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Bytes + * @throws {Error} If the 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.bigtable.admin.v2.Type.Bytes; + + /** + * Verifies a Bytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Bytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Bytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bytes; + + /** + * Creates a plain object from a Bytes message. Also converts values to other types if specified. + * @param message Bytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Bytes { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding raw */ + raw?: (google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Bytes.IEncoding); + + /** Encoding raw. */ + public raw?: (google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null); + + /** Encoding encoding. */ + public encoding?: "raw"; + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Bytes.IEncoding): google.bigtable.admin.v2.Type.Bytes.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Bytes.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Bytes.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Bytes.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the 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.bigtable.admin.v2.Type.Bytes.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain 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 Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bytes.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bytes.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a Raw. */ + interface IRaw { + } + + /** Represents a Raw. */ + class Raw implements IRaw { + + /** + * Constructs a new Raw. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw); + + /** + * Creates a new Raw instance using the specified properties. + * @param [properties] Properties to set + * @returns Raw instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw): google.bigtable.admin.v2.Type.Bytes.Encoding.Raw; + + /** + * Encodes the specified Raw message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @param message Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Raw message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @param message Raw message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Raw message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Raw + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw; + + /** + * Decodes a Raw message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Raw + * @throws {Error} If the 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw; + + /** + * Verifies a Raw message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Raw message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Raw + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Bytes.Encoding.Raw; + + /** + * Creates a plain object from a Raw message. Also converts values to other types if specified. + * @param message Raw + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Bytes.Encoding.Raw, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Raw to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Raw + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an Int64. */ + interface IInt64 { + + /** Int64 encoding */ + encoding?: (google.bigtable.admin.v2.Type.Int64.IEncoding|null); + } + + /** Represents an Int64. */ + class Int64 implements IInt64 { + + /** + * Constructs a new Int64. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IInt64); + + /** Int64 encoding. */ + public encoding?: (google.bigtable.admin.v2.Type.Int64.IEncoding|null); + + /** + * Creates a new Int64 instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64 instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IInt64): google.bigtable.admin.v2.Type.Int64; + + /** + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @param message Int64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IInt64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @param message Int64 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IInt64, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64 + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Int64; + + /** + * Decodes an Int64 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64 + * @throws {Error} If the 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.bigtable.admin.v2.Type.Int64; + + /** + * Verifies an Int64 message. + * @param message Plain 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 Int64 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64 + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64; + + /** + * Creates a plain object from an Int64 message. Also converts values to other types if specified. + * @param message Int64 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Int64 { + + /** Properties of an Encoding. */ + interface IEncoding { + + /** Encoding bigEndianBytes */ + bigEndianBytes?: (google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null); + } + + /** Represents an Encoding. */ + class Encoding implements IEncoding { + + /** + * Constructs a new Encoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Int64.IEncoding); + + /** Encoding bigEndianBytes. */ + public bigEndianBytes?: (google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null); + + /** Encoding encoding. */ + public encoding?: "bigEndianBytes"; + + /** + * Creates a new Encoding instance using the specified properties. + * @param [properties] Properties to set + * @returns Encoding instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Int64.IEncoding): google.bigtable.admin.v2.Type.Int64.Encoding; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Int64.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @param message Encoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Int64.IEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encoding + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Int64.Encoding; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encoding + * @throws {Error} If the 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.bigtable.admin.v2.Type.Int64.Encoding; + + /** + * Verifies an Encoding message. + * @param message Plain 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 Encoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encoding + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64.Encoding; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @param message Encoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64.Encoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Encoding { + + /** Properties of a BigEndianBytes. */ + interface IBigEndianBytes { + + /** BigEndianBytes bytesType */ + bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + } + + /** Represents a BigEndianBytes. */ + class BigEndianBytes implements IBigEndianBytes { + + /** + * Constructs a new BigEndianBytes. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes); + + /** BigEndianBytes bytesType. */ + public bytesType?: (google.bigtable.admin.v2.Type.IBytes|null); + + /** + * Creates a new BigEndianBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns BigEndianBytes instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes): google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Encodes the specified BigEndianBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @param message BigEndianBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigEndianBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @param message BigEndianBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigEndianBytes + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigEndianBytes + * @throws {Error} If the 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Verifies a BigEndianBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigEndianBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigEndianBytes + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes; + + /** + * Creates a plain object from a BigEndianBytes message. Also converts values to other types if specified. + * @param message BigEndianBytes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigEndianBytes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigEndianBytes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of an Aggregate. */ + interface IAggregate { + + /** Aggregate inputType */ + inputType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate stateType */ + stateType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate sum */ + sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); + } + + /** Represents an Aggregate. */ + class Aggregate implements IAggregate { + + /** + * Constructs a new Aggregate. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.IAggregate); + + /** Aggregate inputType. */ + public inputType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate stateType. */ + public stateType?: (google.bigtable.admin.v2.IType|null); + + /** Aggregate sum. */ + public sum?: (google.bigtable.admin.v2.Type.Aggregate.ISum|null); + + /** Aggregate aggregator. */ + public aggregator?: "sum"; + + /** + * Creates a new Aggregate instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregate instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.IAggregate): google.bigtable.admin.v2.Type.Aggregate; + + /** + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @param message Aggregate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.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: google.bigtable.admin.v2.IBackupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @param message Aggregate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.IAggregate, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 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): google.bigtable.admin.v2.BackupInfo; + /** + * Decodes an Aggregate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregate + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Aggregate; - /** - * Decodes a BackupInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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)): google.bigtable.admin.v2.BackupInfo; + /** + * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregate + * @throws {Error} If the 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.bigtable.admin.v2.Type.Aggregate; - /** - * 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); + /** + * Verifies an Aggregate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupInfo - */ - public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.BackupInfo; + /** + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregate + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate; - /** - * 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: google.bigtable.admin.v2.BackupInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * @param message Aggregate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this BackupInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Aggregate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for BackupInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for Aggregate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** RestoreSourceType enum. */ - enum RestoreSourceType { - RESTORE_SOURCE_TYPE_UNSPECIFIED = 0, - BACKUP = 1 + namespace Aggregate { + + /** Properties of a Sum. */ + interface ISum { + } + + /** Represents a Sum. */ + class Sum implements ISum { + + /** + * Constructs a new Sum. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Type.Aggregate.ISum); + + /** + * Creates a new Sum instance using the specified properties. + * @param [properties] Properties to set + * @returns Sum instance + */ + public static create(properties?: google.bigtable.admin.v2.Type.Aggregate.ISum): google.bigtable.admin.v2.Type.Aggregate.Sum; + + /** + * Encodes the specified Sum message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @param message Sum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Type.Aggregate.ISum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @param message Sum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Type.Aggregate.ISum, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sum + * @throws {Error} If the payload is 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.bigtable.admin.v2.Type.Aggregate.Sum; + + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sum + * @throws {Error} If the 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.bigtable.admin.v2.Type.Aggregate.Sum; + + /** + * Verifies a Sum message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sum + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Type.Aggregate.Sum; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @param message Sum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Type.Aggregate.Sum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } } } @@ -11014,6 +13665,9 @@ export namespace google { /** ReadRowsRequest tableName */ tableName?: (string|null); + /** ReadRowsRequest authorizedViewName */ + authorizedViewName?: (string|null); + /** ReadRowsRequest appProfileId */ appProfileId?: (string|null); @@ -11045,6 +13699,9 @@ export namespace google { /** ReadRowsRequest tableName. */ public tableName: string; + /** ReadRowsRequest authorizedViewName. */ + public authorizedViewName: string; + /** ReadRowsRequest appProfileId. */ public appProfileId: string; @@ -11417,6 +14074,9 @@ export namespace google { /** SampleRowKeysRequest tableName */ tableName?: (string|null); + /** SampleRowKeysRequest authorizedViewName */ + authorizedViewName?: (string|null); + /** SampleRowKeysRequest appProfileId */ appProfileId?: (string|null); } @@ -11433,6 +14093,9 @@ export namespace google { /** SampleRowKeysRequest tableName. */ public tableName: string; + /** SampleRowKeysRequest authorizedViewName. */ + public authorizedViewName: string; + /** SampleRowKeysRequest appProfileId. */ public appProfileId: string; @@ -11623,6 +14286,9 @@ export namespace google { /** MutateRowRequest tableName */ tableName?: (string|null); + /** MutateRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + /** MutateRowRequest appProfileId */ appProfileId?: (string|null); @@ -11645,6 +14311,9 @@ export namespace google { /** MutateRowRequest tableName. */ public tableName: string; + /** MutateRowRequest authorizedViewName. */ + public authorizedViewName: string; + /** MutateRowRequest appProfileId. */ public appProfileId: string; @@ -11829,6 +14498,9 @@ export namespace google { /** MutateRowsRequest tableName */ tableName?: (string|null); + /** MutateRowsRequest authorizedViewName */ + authorizedViewName?: (string|null); + /** MutateRowsRequest appProfileId */ appProfileId?: (string|null); @@ -11848,6 +14520,9 @@ export namespace google { /** MutateRowsRequest tableName. */ public tableName: string; + /** MutateRowsRequest authorizedViewName. */ + public authorizedViewName: string; + /** MutateRowsRequest appProfileId. */ public appProfileId: string; @@ -12359,6 +15034,9 @@ export namespace google { /** CheckAndMutateRowRequest tableName */ tableName?: (string|null); + /** CheckAndMutateRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + /** CheckAndMutateRowRequest appProfileId */ appProfileId?: (string|null); @@ -12387,6 +15065,9 @@ export namespace google { /** CheckAndMutateRowRequest tableName. */ public tableName: string; + /** CheckAndMutateRowRequest authorizedViewName. */ + public authorizedViewName: string; + /** CheckAndMutateRowRequest appProfileId. */ public appProfileId: string; @@ -12777,6 +15458,9 @@ export namespace google { /** ReadModifyWriteRowRequest tableName */ tableName?: (string|null); + /** ReadModifyWriteRowRequest authorizedViewName */ + authorizedViewName?: (string|null); + /** ReadModifyWriteRowRequest appProfileId */ appProfileId?: (string|null); @@ -12799,6 +15483,9 @@ export namespace google { /** ReadModifyWriteRowRequest tableName. */ public tableName: string; + /** ReadModifyWriteRowRequest authorizedViewName. */ + public authorizedViewName: string; + /** ReadModifyWriteRowRequest appProfileId. */ public appProfileId: string; @@ -14435,6 +17122,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Value. */ + interface IValue { + + /** Value rawValue */ + rawValue?: (Uint8Array|string|null); + + /** Value rawTimestampMicros */ + rawTimestampMicros?: (number|Long|string|null); + + /** Value intValue */ + intValue?: (number|Long|string|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IValue); + + /** Value rawValue. */ + public rawValue?: (Uint8Array|string|null); + + /** Value rawTimestampMicros. */ + public rawTimestampMicros?: (number|Long|string|null); + + /** Value intValue. */ + public intValue?: (number|Long|string|null); + + /** Value kind. */ + public kind?: ("rawValue"|"rawTimestampMicros"|"intValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.bigtable.v2.IValue): google.bigtable.v2.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.bigtable.v2.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: google.bigtable.v2.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.bigtable.v2.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: google.bigtable.v2.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): google.bigtable.v2.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)): google.bigtable.v2.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 }): google.bigtable.v2.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: google.bigtable.v2.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RowRange. */ interface IRowRange { @@ -15530,6 +18329,9 @@ export namespace google { /** Mutation setCell */ setCell?: (google.bigtable.v2.Mutation.ISetCell|null); + /** Mutation addToCell */ + addToCell?: (google.bigtable.v2.Mutation.IAddToCell|null); + /** Mutation deleteFromColumn */ deleteFromColumn?: (google.bigtable.v2.Mutation.IDeleteFromColumn|null); @@ -15552,6 +18354,9 @@ export namespace google { /** Mutation setCell. */ public setCell?: (google.bigtable.v2.Mutation.ISetCell|null); + /** Mutation addToCell. */ + public addToCell?: (google.bigtable.v2.Mutation.IAddToCell|null); + /** Mutation deleteFromColumn. */ public deleteFromColumn?: (google.bigtable.v2.Mutation.IDeleteFromColumn|null); @@ -15562,7 +18367,7 @@ export namespace google { public deleteFromRow?: (google.bigtable.v2.Mutation.IDeleteFromRow|null); /** Mutation mutation. */ - public mutation?: ("setCell"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"); + public mutation?: ("setCell"|"addToCell"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"); /** * Creates a new Mutation instance using the specified properties. @@ -15759,6 +18564,121 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AddToCell. */ + interface IAddToCell { + + /** AddToCell familyName */ + familyName?: (string|null); + + /** AddToCell columnQualifier */ + columnQualifier?: (google.bigtable.v2.IValue|null); + + /** AddToCell timestamp */ + timestamp?: (google.bigtable.v2.IValue|null); + + /** AddToCell input */ + input?: (google.bigtable.v2.IValue|null); + } + + /** Represents an AddToCell. */ + class AddToCell implements IAddToCell { + + /** + * Constructs a new AddToCell. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.Mutation.IAddToCell); + + /** AddToCell familyName. */ + public familyName: string; + + /** AddToCell columnQualifier. */ + public columnQualifier?: (google.bigtable.v2.IValue|null); + + /** AddToCell timestamp. */ + public timestamp?: (google.bigtable.v2.IValue|null); + + /** AddToCell input. */ + public input?: (google.bigtable.v2.IValue|null); + + /** + * Creates a new AddToCell instance using the specified properties. + * @param [properties] Properties to set + * @returns AddToCell instance + */ + public static create(properties?: google.bigtable.v2.Mutation.IAddToCell): google.bigtable.v2.Mutation.AddToCell; + + /** + * Encodes the specified AddToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @param message AddToCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.Mutation.IAddToCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @param message AddToCell message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.Mutation.IAddToCell, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddToCell message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddToCell + * @throws {Error} If the payload is 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.bigtable.v2.Mutation.AddToCell; + + /** + * Decodes an AddToCell message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddToCell + * @throws {Error} If the 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.bigtable.v2.Mutation.AddToCell; + + /** + * Verifies an AddToCell message. + * @param message Plain 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 AddToCell message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddToCell + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.Mutation.AddToCell; + + /** + * Creates a plain object from an AddToCell message. Also converts values to other types if specified. + * @param message AddToCell + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.Mutation.AddToCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddToCell to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddToCell + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a DeleteFromColumn. */ interface IDeleteFromColumn { @@ -16907,6 +19827,9 @@ export namespace google { /** FeatureFlags retryInfo */ retryInfo?: (boolean|null); + + /** FeatureFlags clientSideMetricsEnabled */ + clientSideMetricsEnabled?: (boolean|null); } /** Represents a FeatureFlags. */ @@ -16936,6 +19859,9 @@ export namespace google { /** FeatureFlags retryInfo. */ public retryInfo: boolean; + /** FeatureFlags clientSideMetricsEnabled. */ + public clientSideMetricsEnabled: boolean; + /** * Creates a new FeatureFlags instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 38f00d1a0..952bb1a08 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -9691,6 +9691,7 @@ * @property {google.bigtable.admin.v2.AppProfile.ISingleClusterRouting|null} [singleClusterRouting] AppProfile singleClusterRouting * @property {google.bigtable.admin.v2.AppProfile.Priority|null} [priority] AppProfile priority * @property {google.bigtable.admin.v2.AppProfile.IStandardIsolation|null} [standardIsolation] AppProfile standardIsolation + * @property {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null} [dataBoostIsolationReadOnly] AppProfile dataBoostIsolationReadOnly */ /** @@ -9764,6 +9765,14 @@ */ AppProfile.prototype.standardIsolation = null; + /** + * AppProfile dataBoostIsolationReadOnly. + * @member {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly|null|undefined} dataBoostIsolationReadOnly + * @memberof google.bigtable.admin.v2.AppProfile + * @instance + */ + AppProfile.prototype.dataBoostIsolationReadOnly = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -9780,12 +9789,12 @@ /** * AppProfile isolation. - * @member {"priority"|"standardIsolation"|undefined} isolation + * @member {"priority"|"standardIsolation"|"dataBoostIsolationReadOnly"|undefined} isolation * @memberof google.bigtable.admin.v2.AppProfile * @instance */ Object.defineProperty(AppProfile.prototype, "isolation", { - get: $util.oneOfGetter($oneOfFields = ["priority", "standardIsolation"]), + get: $util.oneOfGetter($oneOfFields = ["priority", "standardIsolation", "dataBoostIsolationReadOnly"]), set: $util.oneOfSetter($oneOfFields) }); @@ -9825,6 +9834,8 @@ $root.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.encode(message.singleClusterRouting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.priority); + if (message.dataBoostIsolationReadOnly != null && Object.hasOwnProperty.call(message, "dataBoostIsolationReadOnly")) + $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.encode(message.dataBoostIsolationReadOnly, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.standardIsolation != null && Object.hasOwnProperty.call(message, "standardIsolation")) $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.encode(message.standardIsolation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; @@ -9889,6 +9900,10 @@ message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.decode(reader, reader.uint32()); break; } + case 10: { + message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9974,6 +9989,16 @@ return "standardIsolation." + error; } } + if (message.dataBoostIsolationReadOnly != null && message.hasOwnProperty("dataBoostIsolationReadOnly")) { + if (properties.isolation === 1) + return "isolation: multiple values"; + properties.isolation = 1; + { + var error = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify(message.dataBoostIsolationReadOnly); + if (error) + return "dataBoostIsolationReadOnly." + error; + } + } return null; }; @@ -10034,6 +10059,11 @@ throw TypeError(".google.bigtable.admin.v2.AppProfile.standardIsolation: object expected"); message.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.fromObject(object.standardIsolation); } + if (object.dataBoostIsolationReadOnly != null) { + if (typeof object.dataBoostIsolationReadOnly !== "object") + throw TypeError(".google.bigtable.admin.v2.AppProfile.dataBoostIsolationReadOnly: object expected"); + message.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.fromObject(object.dataBoostIsolationReadOnly); + } return message; }; @@ -10076,6 +10106,11 @@ if (options.oneofs) object.isolation = "priority"; } + if (message.dataBoostIsolationReadOnly != null && message.hasOwnProperty("dataBoostIsolationReadOnly")) { + object.dataBoostIsolationReadOnly = $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.toObject(message.dataBoostIsolationReadOnly, options); + if (options.oneofs) + object.isolation = "dataBoostIsolationReadOnly"; + } if (message.standardIsolation != null && message.hasOwnProperty("standardIsolation")) { object.standardIsolation = $root.google.bigtable.admin.v2.AppProfile.StandardIsolation.toObject(message.standardIsolation, options); if (options.oneofs) @@ -10806,6 +10841,260 @@ return StandardIsolation; })(); + AppProfile.DataBoostIsolationReadOnly = (function() { + + /** + * Properties of a DataBoostIsolationReadOnly. + * @memberof google.bigtable.admin.v2.AppProfile + * @interface IDataBoostIsolationReadOnly + * @property {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null} [computeBillingOwner] DataBoostIsolationReadOnly computeBillingOwner + */ + + /** + * Constructs a new DataBoostIsolationReadOnly. + * @memberof google.bigtable.admin.v2.AppProfile + * @classdesc Represents a DataBoostIsolationReadOnly. + * @implements IDataBoostIsolationReadOnly + * @constructor + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly=} [properties] Properties to set + */ + function DataBoostIsolationReadOnly(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataBoostIsolationReadOnly computeBillingOwner. + * @member {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner|null|undefined} computeBillingOwner + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @instance + */ + DataBoostIsolationReadOnly.prototype.computeBillingOwner = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataBoostIsolationReadOnly _computeBillingOwner. + * @member {"computeBillingOwner"|undefined} _computeBillingOwner + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @instance + */ + Object.defineProperty(DataBoostIsolationReadOnly.prototype, "_computeBillingOwner", { + get: $util.oneOfGetter($oneOfFields = ["computeBillingOwner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataBoostIsolationReadOnly instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly instance + */ + DataBoostIsolationReadOnly.create = function create(properties) { + return new DataBoostIsolationReadOnly(properties); + }; + + /** + * Encodes the specified DataBoostIsolationReadOnly message. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly} message DataBoostIsolationReadOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostIsolationReadOnly.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.computeBillingOwner != null && Object.hasOwnProperty.call(message, "computeBillingOwner")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.computeBillingOwner); + return writer; + }; + + /** + * Encodes the specified DataBoostIsolationReadOnly message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.IDataBoostIsolationReadOnly} message DataBoostIsolationReadOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostIsolationReadOnly.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostIsolationReadOnly.decode = 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.computeBillingOwner = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataBoostIsolationReadOnly message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostIsolationReadOnly.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataBoostIsolationReadOnly message. + * @function verify + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataBoostIsolationReadOnly.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.computeBillingOwner != null && message.hasOwnProperty("computeBillingOwner")) { + properties._computeBillingOwner = 1; + switch (message.computeBillingOwner) { + default: + return "computeBillingOwner: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a DataBoostIsolationReadOnly message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} DataBoostIsolationReadOnly + */ + DataBoostIsolationReadOnly.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) + return object; + var message = new $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly(); + switch (object.computeBillingOwner) { + default: + if (typeof object.computeBillingOwner === "number") { + message.computeBillingOwner = object.computeBillingOwner; + break; + } + break; + case "COMPUTE_BILLING_OWNER_UNSPECIFIED": + case 0: + message.computeBillingOwner = 0; + break; + case "HOST_PAYS": + case 1: + message.computeBillingOwner = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataBoostIsolationReadOnly message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} message DataBoostIsolationReadOnly + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataBoostIsolationReadOnly.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.computeBillingOwner != null && message.hasOwnProperty("computeBillingOwner")) { + object.computeBillingOwner = options.enums === String ? $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner[message.computeBillingOwner] === undefined ? message.computeBillingOwner : $root.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner[message.computeBillingOwner] : message.computeBillingOwner; + if (options.oneofs) + object._computeBillingOwner = "computeBillingOwner"; + } + return object; + }; + + /** + * Converts this DataBoostIsolationReadOnly to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @instance + * @returns {Object.} JSON object + */ + DataBoostIsolationReadOnly.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataBoostIsolationReadOnly + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataBoostIsolationReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"; + }; + + /** + * ComputeBillingOwner enum. + * @name google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner + * @enum {number} + * @property {number} COMPUTE_BILLING_OWNER_UNSPECIFIED=0 COMPUTE_BILLING_OWNER_UNSPECIFIED value + * @property {number} HOST_PAYS=1 HOST_PAYS value + */ + DataBoostIsolationReadOnly.ComputeBillingOwner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPUTE_BILLING_OWNER_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOST_PAYS"] = 1; + return values; + })(); + + return DataBoostIsolationReadOnly; + })(); + return AppProfile; })(); @@ -11700,6 +11989,171 @@ * @variation 2 */ + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|createAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef CreateAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAuthorizedView. + * @function createAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} request CreateAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.createAuthorizedView = function createAuthorizedView(request, callback) { + return this.rpcCall(createAuthorizedView, $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAuthorizedView" }); + + /** + * Calls CreateAuthorizedView. + * @function createAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} request CreateAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|listAuthorizedViews}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef ListAuthorizedViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.ListAuthorizedViewsResponse} [response] ListAuthorizedViewsResponse + */ + + /** + * Calls ListAuthorizedViews. + * @function listAuthorizedViews + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} request ListAuthorizedViewsRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViewsCallback} callback Node-style callback called with the error, if any, and ListAuthorizedViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.listAuthorizedViews = function listAuthorizedViews(request, callback) { + return this.rpcCall(listAuthorizedViews, $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest, $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse, request, callback); + }, "name", { value: "ListAuthorizedViews" }); + + /** + * Calls ListAuthorizedViews. + * @function listAuthorizedViews + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} request ListAuthorizedViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|getAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef GetAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.admin.v2.AuthorizedView} [response] AuthorizedView + */ + + /** + * Calls GetAuthorizedView. + * @function getAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} request GetAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedViewCallback} callback Node-style callback called with the error, if any, and AuthorizedView + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.getAuthorizedView = function getAuthorizedView(request, callback) { + return this.rpcCall(getAuthorizedView, $root.google.bigtable.admin.v2.GetAuthorizedViewRequest, $root.google.bigtable.admin.v2.AuthorizedView, request, callback); + }, "name", { value: "GetAuthorizedView" }); + + /** + * Calls GetAuthorizedView. + * @function getAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} request GetAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|updateAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef UpdateAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAuthorizedView. + * @function updateAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} request UpdateAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedViewCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.updateAuthorizedView = function updateAuthorizedView(request, callback) { + return this.rpcCall(updateAuthorizedView, $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAuthorizedView" }); + + /** + * Calls UpdateAuthorizedView. + * @function updateAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} request UpdateAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|deleteAuthorizedView}. + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @typedef DeleteAuthorizedViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAuthorizedView. + * @function deleteAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} request DeleteAuthorizedViewRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableTableAdmin.prototype.deleteAuthorizedView = function deleteAuthorizedView(request, callback) { + return this.rpcCall(deleteAuthorizedView, $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAuthorizedView" }); + + /** + * Calls DeleteAuthorizedView. + * @function deleteAuthorizedView + * @memberof google.bigtable.admin.v2.BigtableTableAdmin + * @instance + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} request DeleteAuthorizedViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.bigtable.admin.v2.BigtableTableAdmin|modifyColumnFamilies}. * @memberof google.bigtable.admin.v2.BigtableTableAdmin @@ -16450,6 +16904,7 @@ * @property {google.bigtable.admin.v2.IColumnFamily|null} [create] Modification create * @property {google.bigtable.admin.v2.IColumnFamily|null} [update] Modification update * @property {boolean|null} [drop] Modification drop + * @property {google.protobuf.IFieldMask|null} [updateMask] Modification updateMask */ /** @@ -16499,6 +16954,14 @@ */ Modification.prototype.drop = null; + /** + * Modification updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + * @instance + */ + Modification.prototype.updateMask = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -16545,6 +17008,8 @@ $root.google.bigtable.admin.v2.ColumnFamily.encode(message.update, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.drop); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -16595,6 +17060,10 @@ message.drop = reader.bool(); break; } + case 6: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16659,6 +17128,11 @@ if (typeof message.drop !== "boolean") return "drop: boolean expected"; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; @@ -16688,6 +17162,11 @@ } if (object.drop != null) message.drop = Boolean(object.drop); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; @@ -16704,8 +17183,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.id = ""; + object.updateMask = null; + } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.create != null && message.hasOwnProperty("create")) { @@ -16723,6 +17204,8 @@ if (options.oneofs) object.mod = "drop"; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -17172,6 +17655,8 @@ * @interface ICheckConsistencyRequest * @property {string|null} [name] CheckConsistencyRequest name * @property {string|null} [consistencyToken] CheckConsistencyRequest consistencyToken + * @property {google.bigtable.admin.v2.IStandardReadRemoteWrites|null} [standardReadRemoteWrites] CheckConsistencyRequest standardReadRemoteWrites + * @property {google.bigtable.admin.v2.IDataBoostReadLocalWrites|null} [dataBoostReadLocalWrites] CheckConsistencyRequest dataBoostReadLocalWrites */ /** @@ -17205,6 +17690,36 @@ */ CheckConsistencyRequest.prototype.consistencyToken = ""; + /** + * CheckConsistencyRequest standardReadRemoteWrites. + * @member {google.bigtable.admin.v2.IStandardReadRemoteWrites|null|undefined} standardReadRemoteWrites + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + CheckConsistencyRequest.prototype.standardReadRemoteWrites = null; + + /** + * CheckConsistencyRequest dataBoostReadLocalWrites. + * @member {google.bigtable.admin.v2.IDataBoostReadLocalWrites|null|undefined} dataBoostReadLocalWrites + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + CheckConsistencyRequest.prototype.dataBoostReadLocalWrites = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CheckConsistencyRequest mode. + * @member {"standardReadRemoteWrites"|"dataBoostReadLocalWrites"|undefined} mode + * @memberof google.bigtable.admin.v2.CheckConsistencyRequest + * @instance + */ + Object.defineProperty(CheckConsistencyRequest.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["standardReadRemoteWrites", "dataBoostReadLocalWrites"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CheckConsistencyRequest instance using the specified properties. * @function create @@ -17233,6 +17748,10 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.consistencyToken != null && Object.hasOwnProperty.call(message, "consistencyToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.consistencyToken); + if (message.standardReadRemoteWrites != null && Object.hasOwnProperty.call(message, "standardReadRemoteWrites")) + $root.google.bigtable.admin.v2.StandardReadRemoteWrites.encode(message.standardReadRemoteWrites, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataBoostReadLocalWrites != null && Object.hasOwnProperty.call(message, "dataBoostReadLocalWrites")) + $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.encode(message.dataBoostReadLocalWrites, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -17275,6 +17794,14 @@ message.consistencyToken = reader.string(); break; } + case 3: { + message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.decode(reader, reader.uint32()); + break; + } + case 4: { + message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17310,12 +17837,31 @@ CheckConsistencyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) if (!$util.isString(message.consistencyToken)) return "consistencyToken: string expected"; + if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { + properties.mode = 1; + { + var error = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.verify(message.standardReadRemoteWrites); + if (error) + return "standardReadRemoteWrites." + error; + } + } + if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.verify(message.dataBoostReadLocalWrites); + if (error) + return "dataBoostReadLocalWrites." + error; + } + } return null; }; @@ -17335,6 +17881,16 @@ message.name = String(object.name); if (object.consistencyToken != null) message.consistencyToken = String(object.consistencyToken); + if (object.standardReadRemoteWrites != null) { + if (typeof object.standardReadRemoteWrites !== "object") + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.standardReadRemoteWrites: object expected"); + message.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.fromObject(object.standardReadRemoteWrites); + } + if (object.dataBoostReadLocalWrites != null) { + if (typeof object.dataBoostReadLocalWrites !== "object") + throw TypeError(".google.bigtable.admin.v2.CheckConsistencyRequest.dataBoostReadLocalWrites: object expected"); + message.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.fromObject(object.dataBoostReadLocalWrites); + } return message; }; @@ -17359,6 +17915,16 @@ object.name = message.name; if (message.consistencyToken != null && message.hasOwnProperty("consistencyToken")) object.consistencyToken = message.consistencyToken; + if (message.standardReadRemoteWrites != null && message.hasOwnProperty("standardReadRemoteWrites")) { + object.standardReadRemoteWrites = $root.google.bigtable.admin.v2.StandardReadRemoteWrites.toObject(message.standardReadRemoteWrites, options); + if (options.oneofs) + object.mode = "standardReadRemoteWrites"; + } + if (message.dataBoostReadLocalWrites != null && message.hasOwnProperty("dataBoostReadLocalWrites")) { + object.dataBoostReadLocalWrites = $root.google.bigtable.admin.v2.DataBoostReadLocalWrites.toObject(message.dataBoostReadLocalWrites, options); + if (options.oneofs) + object.mode = "dataBoostReadLocalWrites"; + } return object; }; @@ -17391,6 +17957,356 @@ return CheckConsistencyRequest; })(); + v2.StandardReadRemoteWrites = (function() { + + /** + * Properties of a StandardReadRemoteWrites. + * @memberof google.bigtable.admin.v2 + * @interface IStandardReadRemoteWrites + */ + + /** + * Constructs a new StandardReadRemoteWrites. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a StandardReadRemoteWrites. + * @implements IStandardReadRemoteWrites + * @constructor + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites=} [properties] Properties to set + */ + function StandardReadRemoteWrites(properties) { + if (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 StandardReadRemoteWrites instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites instance + */ + StandardReadRemoteWrites.create = function create(properties) { + return new StandardReadRemoteWrites(properties); + }; + + /** + * Encodes the specified StandardReadRemoteWrites message. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites} message StandardReadRemoteWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardReadRemoteWrites.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified StandardReadRemoteWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.StandardReadRemoteWrites.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.IStandardReadRemoteWrites} message StandardReadRemoteWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardReadRemoteWrites.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardReadRemoteWrites.decode = 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.bigtable.admin.v2.StandardReadRemoteWrites(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardReadRemoteWrites message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardReadRemoteWrites.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardReadRemoteWrites message. + * @function verify + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardReadRemoteWrites.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a StandardReadRemoteWrites message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.StandardReadRemoteWrites} StandardReadRemoteWrites + */ + StandardReadRemoteWrites.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.StandardReadRemoteWrites) + return object; + return new $root.google.bigtable.admin.v2.StandardReadRemoteWrites(); + }; + + /** + * Creates a plain object from a StandardReadRemoteWrites message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {google.bigtable.admin.v2.StandardReadRemoteWrites} message StandardReadRemoteWrites + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardReadRemoteWrites.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StandardReadRemoteWrites to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @instance + * @returns {Object.} JSON object + */ + StandardReadRemoteWrites.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardReadRemoteWrites + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.StandardReadRemoteWrites + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardReadRemoteWrites.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.StandardReadRemoteWrites"; + }; + + return StandardReadRemoteWrites; + })(); + + v2.DataBoostReadLocalWrites = (function() { + + /** + * Properties of a DataBoostReadLocalWrites. + * @memberof google.bigtable.admin.v2 + * @interface IDataBoostReadLocalWrites + */ + + /** + * Constructs a new DataBoostReadLocalWrites. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DataBoostReadLocalWrites. + * @implements IDataBoostReadLocalWrites + * @constructor + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites=} [properties] Properties to set + */ + function DataBoostReadLocalWrites(properties) { + if (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 DataBoostReadLocalWrites instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites instance + */ + DataBoostReadLocalWrites.create = function create(properties) { + return new DataBoostReadLocalWrites(properties); + }; + + /** + * Encodes the specified DataBoostReadLocalWrites message. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites} message DataBoostReadLocalWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostReadLocalWrites.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DataBoostReadLocalWrites message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DataBoostReadLocalWrites.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.IDataBoostReadLocalWrites} message DataBoostReadLocalWrites message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataBoostReadLocalWrites.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostReadLocalWrites.decode = 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.bigtable.admin.v2.DataBoostReadLocalWrites(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataBoostReadLocalWrites message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataBoostReadLocalWrites.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataBoostReadLocalWrites message. + * @function verify + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataBoostReadLocalWrites.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DataBoostReadLocalWrites message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DataBoostReadLocalWrites} DataBoostReadLocalWrites + */ + DataBoostReadLocalWrites.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.DataBoostReadLocalWrites) + return object; + return new $root.google.bigtable.admin.v2.DataBoostReadLocalWrites(); + }; + + /** + * Creates a plain object from a DataBoostReadLocalWrites message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {google.bigtable.admin.v2.DataBoostReadLocalWrites} message DataBoostReadLocalWrites + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataBoostReadLocalWrites.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DataBoostReadLocalWrites to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @instance + * @returns {Object.} JSON object + */ + DataBoostReadLocalWrites.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataBoostReadLocalWrites + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DataBoostReadLocalWrites + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataBoostReadLocalWrites.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DataBoostReadLocalWrites"; + }; + + return DataBoostReadLocalWrites; + })(); + v2.CheckConsistencyResponse = (function() { /** @@ -21592,25 +22508,26 @@ return CopyBackupMetadata; })(); - v2.RestoreInfo = (function() { + v2.CreateAuthorizedViewRequest = (function() { /** - * Properties of a RestoreInfo. + * Properties of a CreateAuthorizedViewRequest. * @memberof google.bigtable.admin.v2 - * @interface IRestoreInfo - * @property {google.bigtable.admin.v2.RestoreSourceType|null} [sourceType] RestoreInfo sourceType - * @property {google.bigtable.admin.v2.IBackupInfo|null} [backupInfo] RestoreInfo backupInfo + * @interface ICreateAuthorizedViewRequest + * @property {string|null} [parent] CreateAuthorizedViewRequest parent + * @property {string|null} [authorizedViewId] CreateAuthorizedViewRequest authorizedViewId + * @property {google.bigtable.admin.v2.IAuthorizedView|null} [authorizedView] CreateAuthorizedViewRequest authorizedView */ /** - * Constructs a new RestoreInfo. + * Constructs a new CreateAuthorizedViewRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a RestoreInfo. - * @implements IRestoreInfo + * @classdesc Represents a CreateAuthorizedViewRequest. + * @implements ICreateAuthorizedViewRequest * @constructor - * @param {google.bigtable.admin.v2.IRestoreInfo=} [properties] Properties to set + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest=} [properties] Properties to set */ - function RestoreInfo(properties) { + function CreateAuthorizedViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21618,103 +22535,103 @@ } /** - * RestoreInfo sourceType. - * @member {google.bigtable.admin.v2.RestoreSourceType} sourceType - * @memberof google.bigtable.admin.v2.RestoreInfo + * CreateAuthorizedViewRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @instance */ - RestoreInfo.prototype.sourceType = 0; + CreateAuthorizedViewRequest.prototype.parent = ""; /** - * RestoreInfo backupInfo. - * @member {google.bigtable.admin.v2.IBackupInfo|null|undefined} backupInfo - * @memberof google.bigtable.admin.v2.RestoreInfo + * CreateAuthorizedViewRequest authorizedViewId. + * @member {string} authorizedViewId + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @instance */ - RestoreInfo.prototype.backupInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateAuthorizedViewRequest.prototype.authorizedViewId = ""; /** - * RestoreInfo sourceInfo. - * @member {"backupInfo"|undefined} sourceInfo - * @memberof google.bigtable.admin.v2.RestoreInfo + * CreateAuthorizedViewRequest authorizedView. + * @member {google.bigtable.admin.v2.IAuthorizedView|null|undefined} authorizedView + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @instance */ - Object.defineProperty(RestoreInfo.prototype, "sourceInfo", { - get: $util.oneOfGetter($oneOfFields = ["backupInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateAuthorizedViewRequest.prototype.authorizedView = null; /** - * Creates a new RestoreInfo instance using the specified properties. + * Creates a new CreateAuthorizedViewRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.IRestoreInfo=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo instance + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest instance */ - RestoreInfo.create = function create(properties) { - return new RestoreInfo(properties); + CreateAuthorizedViewRequest.create = function create(properties) { + return new CreateAuthorizedViewRequest(properties); }; /** - * Encodes the specified RestoreInfo message. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * Encodes the specified CreateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.IRestoreInfo} message RestoreInfo message or plain object to encode + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} message CreateAuthorizedViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreInfo.encode = function encode(message, writer) { + CreateAuthorizedViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); - if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) - $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.authorizedViewId != null && Object.hasOwnProperty.call(message, "authorizedViewId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.authorizedViewId); + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified RestoreInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * Encodes the specified CreateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.IRestoreInfo} message RestoreInfo message or plain object to encode + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewRequest} message CreateAuthorizedViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreInfo.encodeDelimited = function encodeDelimited(message, writer) { + CreateAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreInfo message from the specified reader or buffer. + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreInfo.decode = function decode(reader, length) { + CreateAuthorizedViewRequest.decode = 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.bigtable.admin.v2.RestoreInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.sourceType = reader.int32(); + message.parent = reader.string(); break; } case 2: { - message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32()); + message.authorizedViewId = reader.string(); + break; + } + case 3: { + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32()); break; } default: @@ -21726,160 +22643,146 @@ }; /** - * Decodes a RestoreInfo message from the specified reader or buffer, length delimited. + * Decodes a CreateAuthorizedViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreInfo.decodeDelimited = function decodeDelimited(reader) { + CreateAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreInfo message. + * Verifies a CreateAuthorizedViewRequest message. * @function verify - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreInfo.verify = function verify(message) { + CreateAuthorizedViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - switch (message.sourceType) { - default: - return "sourceType: enum value expected"; - case 0: - case 1: - break; - } - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { - properties.sourceInfo = 1; - { - var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo); - if (error) - return "backupInfo." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) + if (!$util.isString(message.authorizedViewId)) + return "authorizedViewId: string expected"; + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView); + if (error) + return "authorizedView." + error; } return null; }; /** - * Creates a RestoreInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewRequest} CreateAuthorizedViewRequest */ - RestoreInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.RestoreInfo) + CreateAuthorizedViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest) return object; - var message = new $root.google.bigtable.admin.v2.RestoreInfo(); - switch (object.sourceType) { - default: - if (typeof object.sourceType === "number") { - message.sourceType = object.sourceType; - break; - } - break; - case "RESTORE_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.sourceType = 0; - break; - case "BACKUP": - case 1: - message.sourceType = 1; - break; - } - if (object.backupInfo != null) { - if (typeof object.backupInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.RestoreInfo.backupInfo: object expected"); - message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo); + var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.authorizedViewId != null) + message.authorizedViewId = String(object.authorizedViewId); + if (object.authorizedView != null) { + if (typeof object.authorizedView !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewRequest.authorizedView: object expected"); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView); } return message; }; /** - * Creates a plain object from a RestoreInfo message. Also converts values to other types if specified. + * Creates a plain object from a CreateAuthorizedViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.RestoreInfo} message RestoreInfo + * @param {google.bigtable.admin.v2.CreateAuthorizedViewRequest} message CreateAuthorizedViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreInfo.toObject = function toObject(message, options) { + CreateAuthorizedViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - object.sourceType = options.enums === String ? $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] : message.sourceType; - if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { - object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); - if (options.oneofs) - object.sourceInfo = "backupInfo"; + if (options.defaults) { + object.parent = ""; + object.authorizedViewId = ""; + object.authorizedView = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.authorizedViewId != null && message.hasOwnProperty("authorizedViewId")) + object.authorizedViewId = message.authorizedViewId; + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); return object; }; /** - * Converts this RestoreInfo to JSON. + * Converts this CreateAuthorizedViewRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @instance * @returns {Object.} JSON object */ - RestoreInfo.prototype.toJSON = function toJSON() { + CreateAuthorizedViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreInfo + * Gets the default type url for CreateAuthorizedViewRequest * @function getTypeUrl - * @memberof google.bigtable.admin.v2.RestoreInfo + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.RestoreInfo"; + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateAuthorizedViewRequest"; }; - return RestoreInfo; + return CreateAuthorizedViewRequest; })(); - v2.ChangeStreamConfig = (function() { + v2.CreateAuthorizedViewMetadata = (function() { /** - * Properties of a ChangeStreamConfig. + * Properties of a CreateAuthorizedViewMetadata. * @memberof google.bigtable.admin.v2 - * @interface IChangeStreamConfig - * @property {google.protobuf.IDuration|null} [retentionPeriod] ChangeStreamConfig retentionPeriod + * @interface ICreateAuthorizedViewMetadata + * @property {google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null} [originalRequest] CreateAuthorizedViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] CreateAuthorizedViewMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] CreateAuthorizedViewMetadata finishTime */ /** - * Constructs a new ChangeStreamConfig. + * Constructs a new CreateAuthorizedViewMetadata. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a ChangeStreamConfig. - * @implements IChangeStreamConfig + * @classdesc Represents a CreateAuthorizedViewMetadata. + * @implements ICreateAuthorizedViewMetadata * @constructor - * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata=} [properties] Properties to set */ - function ChangeStreamConfig(properties) { + function CreateAuthorizedViewMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21887,75 +22790,103 @@ } /** - * ChangeStreamConfig retentionPeriod. - * @member {google.protobuf.IDuration|null|undefined} retentionPeriod - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * CreateAuthorizedViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.ICreateAuthorizedViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @instance */ - ChangeStreamConfig.prototype.retentionPeriod = null; + CreateAuthorizedViewMetadata.prototype.originalRequest = null; /** - * Creates a new ChangeStreamConfig instance using the specified properties. + * CreateAuthorizedViewMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @instance + */ + CreateAuthorizedViewMetadata.prototype.requestTime = null; + + /** + * CreateAuthorizedViewMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata + * @instance + */ + CreateAuthorizedViewMetadata.prototype.finishTime = null; + + /** + * Creates a new CreateAuthorizedViewMetadata instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static - * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig instance + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata instance */ - ChangeStreamConfig.create = function create(properties) { - return new ChangeStreamConfig(properties); + CreateAuthorizedViewMetadata.create = function create(properties) { + return new CreateAuthorizedViewMetadata(properties); }; /** - * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * Encodes the specified CreateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static - * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata} message CreateAuthorizedViewMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeStreamConfig.encode = function encode(message, writer) { + CreateAuthorizedViewMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) - $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * Encodes the specified CreateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAuthorizedViewMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static - * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {google.bigtable.admin.v2.ICreateAuthorizedViewMetadata} message CreateAuthorizedViewMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChangeStreamConfig.encodeDelimited = function encodeDelimited(message, writer) { + CreateAuthorizedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChangeStreamConfig message from the specified reader or buffer. + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeStreamConfig.decode = function decode(reader, length) { + CreateAuthorizedViewMetadata.decode = 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.bigtable.admin.v2.ChangeStreamConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -21967,135 +22898,157 @@ }; /** - * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChangeStreamConfig.decodeDelimited = function decodeDelimited(reader) { + CreateAuthorizedViewMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChangeStreamConfig message. + * Verifies a CreateAuthorizedViewMetadata message. * @function verify - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChangeStreamConfig.verify = function verify(message) { + CreateAuthorizedViewMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.verify(message.originalRequest); if (error) - return "retentionPeriod." + error; + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; } return null; }; /** - * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @returns {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} CreateAuthorizedViewMetadata */ - ChangeStreamConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) + CreateAuthorizedViewMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata) return object; - var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); - if (object.retentionPeriod != null) { - if (typeof object.retentionPeriod !== "object") - throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); - message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); + var message = new $root.google.bigtable.admin.v2.CreateAuthorizedViewMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAuthorizedViewMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); } return message; }; /** - * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. + * Creates a plain object from a CreateAuthorizedViewMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static - * @param {google.bigtable.admin.v2.ChangeStreamConfig} message ChangeStreamConfig + * @param {google.bigtable.admin.v2.CreateAuthorizedViewMetadata} message CreateAuthorizedViewMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChangeStreamConfig.toObject = function toObject(message, options) { + CreateAuthorizedViewMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.retentionPeriod = null; - if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) - object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.CreateAuthorizedViewRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); return object; }; /** - * Converts this ChangeStreamConfig to JSON. + * Converts this CreateAuthorizedViewMetadata to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @instance * @returns {Object.} JSON object */ - ChangeStreamConfig.prototype.toJSON = function toJSON() { + CreateAuthorizedViewMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChangeStreamConfig + * Gets the default type url for CreateAuthorizedViewMetadata * @function getTypeUrl - * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @memberof google.bigtable.admin.v2.CreateAuthorizedViewMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChangeStreamConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAuthorizedViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.ChangeStreamConfig"; + return typeUrlPrefix + "/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"; }; - return ChangeStreamConfig; + return CreateAuthorizedViewMetadata; })(); - v2.Table = (function() { + v2.ListAuthorizedViewsRequest = (function() { /** - * Properties of a Table. + * Properties of a ListAuthorizedViewsRequest. * @memberof google.bigtable.admin.v2 - * @interface ITable - * @property {string|null} [name] Table name - * @property {Object.|null} [clusterStates] Table clusterStates - * @property {Object.|null} [columnFamilies] Table columnFamilies - * @property {google.bigtable.admin.v2.Table.TimestampGranularity|null} [granularity] Table granularity - * @property {google.bigtable.admin.v2.IRestoreInfo|null} [restoreInfo] Table restoreInfo - * @property {google.bigtable.admin.v2.IChangeStreamConfig|null} [changeStreamConfig] Table changeStreamConfig - * @property {boolean|null} [deletionProtection] Table deletionProtection + * @interface IListAuthorizedViewsRequest + * @property {string|null} [parent] ListAuthorizedViewsRequest parent + * @property {number|null} [pageSize] ListAuthorizedViewsRequest pageSize + * @property {string|null} [pageToken] ListAuthorizedViewsRequest pageToken + * @property {google.bigtable.admin.v2.AuthorizedView.ResponseView|null} [view] ListAuthorizedViewsRequest view */ /** - * Constructs a new Table. + * Constructs a new ListAuthorizedViewsRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a Table. - * @implements ITable + * @classdesc Represents a ListAuthorizedViewsRequest. + * @implements IListAuthorizedViewsRequest * @constructor - * @param {google.bigtable.admin.v2.ITable=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest=} [properties] Properties to set */ - function Table(properties) { - this.clusterStates = {}; - this.columnFamilies = {}; + function ListAuthorizedViewsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22103,203 +23056,117 @@ } /** - * Table name. - * @member {string} name - * @memberof google.bigtable.admin.v2.Table - * @instance - */ - Table.prototype.name = ""; - - /** - * Table clusterStates. - * @member {Object.} clusterStates - * @memberof google.bigtable.admin.v2.Table - * @instance - */ - Table.prototype.clusterStates = $util.emptyObject; - - /** - * Table columnFamilies. - * @member {Object.} columnFamilies - * @memberof google.bigtable.admin.v2.Table - * @instance - */ - Table.prototype.columnFamilies = $util.emptyObject; - - /** - * Table granularity. - * @member {google.bigtable.admin.v2.Table.TimestampGranularity} granularity - * @memberof google.bigtable.admin.v2.Table + * ListAuthorizedViewsRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @instance */ - Table.prototype.granularity = 0; + ListAuthorizedViewsRequest.prototype.parent = ""; /** - * Table restoreInfo. - * @member {google.bigtable.admin.v2.IRestoreInfo|null|undefined} restoreInfo - * @memberof google.bigtable.admin.v2.Table + * ListAuthorizedViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @instance */ - Table.prototype.restoreInfo = null; + ListAuthorizedViewsRequest.prototype.pageSize = 0; /** - * Table changeStreamConfig. - * @member {google.bigtable.admin.v2.IChangeStreamConfig|null|undefined} changeStreamConfig - * @memberof google.bigtable.admin.v2.Table + * ListAuthorizedViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @instance */ - Table.prototype.changeStreamConfig = null; + ListAuthorizedViewsRequest.prototype.pageToken = ""; /** - * Table deletionProtection. - * @member {boolean} deletionProtection - * @memberof google.bigtable.admin.v2.Table + * ListAuthorizedViewsRequest view. + * @member {google.bigtable.admin.v2.AuthorizedView.ResponseView} view + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @instance */ - Table.prototype.deletionProtection = false; + ListAuthorizedViewsRequest.prototype.view = 0; /** - * Creates a new Table instance using the specified properties. + * Creates a new ListAuthorizedViewsRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static - * @param {google.bigtable.admin.v2.ITable=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Table} Table instance + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest instance */ - Table.create = function create(properties) { - return new Table(properties); + ListAuthorizedViewsRequest.create = function create(properties) { + return new ListAuthorizedViewsRequest(properties); }; /** - * Encodes the specified Table message. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * Encodes the specified ListAuthorizedViewsRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static - * @param {google.bigtable.admin.v2.ITable} message Table message or plain object to encode + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} message ListAuthorizedViewsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Table.encode = function encode(message, writer) { + ListAuthorizedViewsRequest.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.clusterStates != null && Object.hasOwnProperty.call(message, "clusterStates")) - for (var keys = Object.keys(message.clusterStates), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.Table.ClusterState.encode(message.clusterStates[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.columnFamilies != null && Object.hasOwnProperty.call(message, "columnFamilies")) - for (var keys = Object.keys(message.columnFamilies), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.bigtable.admin.v2.ColumnFamily.encode(message.columnFamilies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.granularity); - if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) - $root.google.bigtable.admin.v2.RestoreInfo.encode(message.restoreInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) - $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.view); return writer; }; /** - * Encodes the specified Table message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * Encodes the specified ListAuthorizedViewsRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static - * @param {google.bigtable.admin.v2.ITable} message Table message or plain object to encode + * @param {google.bigtable.admin.v2.IListAuthorizedViewsRequest} message ListAuthorizedViewsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Table.encodeDelimited = function encodeDelimited(message, writer) { + ListAuthorizedViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Table message from the specified reader or buffer. + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.Table} Table + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest * @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) { + ListAuthorizedViewsRequest.decode = 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.bigtable.admin.v2.Table(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - if (message.clusterStates === $util.emptyObject) - message.clusterStates = {}; - 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.google.bigtable.admin.v2.Table.ClusterState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.clusterStates[key] = value; + message.pageSize = reader.int32(); break; } case 3: { - if (message.columnFamilies === $util.emptyObject) - message.columnFamilies = {}; - 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.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.columnFamilies[key] = value; + message.pageToken = reader.string(); break; } case 4: { - message.granularity = reader.int32(); - break; - } - case 6: { - message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.deletionProtection = reader.bool(); + message.view = reader.int32(); break; } default: @@ -22311,584 +23178,178 @@ }; /** - * Decodes a Table message from the specified reader or buffer, length delimited. + * Decodes a ListAuthorizedViewsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.Table} Table + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest * @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) { + ListAuthorizedViewsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Table message. + * Verifies a ListAuthorizedViewsRequest message. * @function verify - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @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) { + ListAuthorizedViewsRequest.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.clusterStates != null && message.hasOwnProperty("clusterStates")) { - if (!$util.isObject(message.clusterStates)) - return "clusterStates: object expected"; - var key = Object.keys(message.clusterStates); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.bigtable.admin.v2.Table.ClusterState.verify(message.clusterStates[key[i]]); - if (error) - return "clusterStates." + error; - } - } - if (message.columnFamilies != null && message.hasOwnProperty("columnFamilies")) { - if (!$util.isObject(message.columnFamilies)) - return "columnFamilies: object expected"; - var key = Object.keys(message.columnFamilies); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.columnFamilies[key[i]]); - if (error) - return "columnFamilies." + error; - } - } - if (message.granularity != null && message.hasOwnProperty("granularity")) - switch (message.granularity) { + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { default: - return "granularity: enum value expected"; + return "view: enum value expected"; case 0: case 1: + case 2: + case 3: break; } - if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) { - var error = $root.google.bigtable.admin.v2.RestoreInfo.verify(message.restoreInfo); - if (error) - return "restoreInfo." + error; - } - if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) { - var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig); - if (error) - return "changeStreamConfig." + error; - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) - if (typeof message.deletionProtection !== "boolean") - return "deletionProtection: boolean expected"; return null; }; /** - * Creates a Table message from a plain object. Also converts values to their respective internal types. + * Creates a ListAuthorizedViewsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Table} Table + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsRequest} ListAuthorizedViewsRequest */ - Table.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Table) + ListAuthorizedViewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest) return object; - var message = new $root.google.bigtable.admin.v2.Table(); - if (object.name != null) - message.name = String(object.name); - if (object.clusterStates) { - if (typeof object.clusterStates !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); - message.clusterStates = {}; - for (var keys = Object.keys(object.clusterStates), i = 0; i < keys.length; ++i) { - if (typeof object.clusterStates[keys[i]] !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); - message.clusterStates[keys[i]] = $root.google.bigtable.admin.v2.Table.ClusterState.fromObject(object.clusterStates[keys[i]]); - } - } - if (object.columnFamilies) { - if (typeof object.columnFamilies !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); - message.columnFamilies = {}; - for (var keys = Object.keys(object.columnFamilies), i = 0; i < keys.length; ++i) { - if (typeof object.columnFamilies[keys[i]] !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); - message.columnFamilies[keys[i]] = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.columnFamilies[keys[i]]); - } - } - switch (object.granularity) { + var message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.view) { default: - if (typeof object.granularity === "number") { - message.granularity = object.granularity; + if (typeof object.view === "number") { + message.view = object.view; break; } break; - case "TIMESTAMP_GRANULARITY_UNSPECIFIED": + case "RESPONSE_VIEW_UNSPECIFIED": case 0: - message.granularity = 0; + message.view = 0; break; - case "MILLIS": + case "NAME_ONLY": case 1: - message.granularity = 1; + message.view = 1; + break; + case "BASIC": + case 2: + message.view = 2; + break; + case "FULL": + case 3: + message.view = 3; break; } - if (object.restoreInfo != null) { - if (typeof object.restoreInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); - message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo); - } - if (object.changeStreamConfig != null) { - if (typeof object.changeStreamConfig !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); - message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig); - } - if (object.deletionProtection != null) - message.deletionProtection = Boolean(object.deletionProtection); return message; }; /** - * Creates a plain object from a Table message. Also converts values to other types if specified. + * Creates a plain object from a ListAuthorizedViewsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static - * @param {google.bigtable.admin.v2.Table} message Table + * @param {google.bigtable.admin.v2.ListAuthorizedViewsRequest} message ListAuthorizedViewsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Table.toObject = function toObject(message, options) { + ListAuthorizedViewsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.clusterStates = {}; - object.columnFamilies = {}; - } if (options.defaults) { - object.name = ""; - object.granularity = options.enums === String ? "TIMESTAMP_GRANULARITY_UNSPECIFIED" : 0; - object.restoreInfo = null; - object.changeStreamConfig = null; - object.deletionProtection = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.clusterStates && (keys2 = Object.keys(message.clusterStates)).length) { - object.clusterStates = {}; - for (var j = 0; j < keys2.length; ++j) - object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options); - } - if (message.columnFamilies && (keys2 = Object.keys(message.columnFamilies)).length) { - object.columnFamilies = {}; - for (var j = 0; j < keys2.length; ++j) - object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options); + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; } - if (message.granularity != null && message.hasOwnProperty("granularity")) - object.granularity = options.enums === String ? $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] === undefined ? message.granularity : $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] : message.granularity; - if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) - object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options); - if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) - object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options); - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) - object.deletionProtection = message.deletionProtection; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] : message.view; return object; }; /** - * Converts this Table to JSON. + * Converts this ListAuthorizedViewsRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @instance * @returns {Object.} JSON object */ - Table.prototype.toJSON = function toJSON() { + ListAuthorizedViewsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Table + * Gets the default type url for ListAuthorizedViewsRequest * @function getTypeUrl - * @memberof google.bigtable.admin.v2.Table + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Table.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAuthorizedViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.Table"; + return typeUrlPrefix + "/google.bigtable.admin.v2.ListAuthorizedViewsRequest"; }; - Table.ClusterState = (function() { - - /** - * Properties of a ClusterState. - * @memberof google.bigtable.admin.v2.Table - * @interface IClusterState - * @property {google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null} [replicationState] ClusterState replicationState - * @property {Array.|null} [encryptionInfo] ClusterState encryptionInfo - */ - - /** - * Constructs a new ClusterState. - * @memberof google.bigtable.admin.v2.Table - * @classdesc Represents a ClusterState. - * @implements IClusterState - * @constructor - * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set - */ - function ClusterState(properties) { - this.encryptionInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterState replicationState. - * @member {google.bigtable.admin.v2.Table.ClusterState.ReplicationState} replicationState - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @instance - */ - ClusterState.prototype.replicationState = 0; - - /** - * ClusterState encryptionInfo. - * @member {Array.} encryptionInfo - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @instance - */ - ClusterState.prototype.encryptionInfo = $util.emptyArray; - - /** - * Creates a new ClusterState instance using the specified properties. - * @function create - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState instance - */ - ClusterState.create = function create(properties) { - return new ClusterState(properties); - }; - - /** - * Encodes the specified ClusterState message. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. - * @function encode - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {google.bigtable.admin.v2.Table.IClusterState} message ClusterState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.replicationState); - if (message.encryptionInfo != null && message.encryptionInfo.length) - for (var i = 0; i < message.encryptionInfo.length; ++i) - $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClusterState message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {google.bigtable.admin.v2.Table.IClusterState} message ClusterState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterState message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterState.decode = 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.bigtable.admin.v2.Table.ClusterState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.replicationState = reader.int32(); - break; - } - case 2: { - if (!(message.encryptionInfo && message.encryptionInfo.length)) - message.encryptionInfo = []; - message.encryptionInfo.push($root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterState message. - * @function verify - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.replicationState != null && message.hasOwnProperty("replicationState")) - switch (message.replicationState) { - default: - return "replicationState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { - if (!Array.isArray(message.encryptionInfo)) - return "encryptionInfo: array expected"; - for (var i = 0; i < message.encryptionInfo.length; ++i) { - var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo[i]); - if (error) - return "encryptionInfo." + error; - } - } - return null; - }; - - /** - * Creates a ClusterState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState - */ - ClusterState.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Table.ClusterState) - return object; - var message = new $root.google.bigtable.admin.v2.Table.ClusterState(); - switch (object.replicationState) { - default: - if (typeof object.replicationState === "number") { - message.replicationState = object.replicationState; - break; - } - break; - case "STATE_NOT_KNOWN": - case 0: - message.replicationState = 0; - break; - case "INITIALIZING": - case 1: - message.replicationState = 1; - break; - case "PLANNED_MAINTENANCE": - case 2: - message.replicationState = 2; - break; - case "UNPLANNED_MAINTENANCE": - case 3: - message.replicationState = 3; - break; - case "READY": - case 4: - message.replicationState = 4; - break; - case "READY_OPTIMIZING": - case 5: - message.replicationState = 5; - break; - } - if (object.encryptionInfo) { - if (!Array.isArray(object.encryptionInfo)) - throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: array expected"); - message.encryptionInfo = []; - for (var i = 0; i < object.encryptionInfo.length; ++i) { - if (typeof object.encryptionInfo[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); - message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ClusterState message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {google.bigtable.admin.v2.Table.ClusterState} message ClusterState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.encryptionInfo = []; - if (options.defaults) - object.replicationState = options.enums === String ? "STATE_NOT_KNOWN" : 0; - if (message.replicationState != null && message.hasOwnProperty("replicationState")) - object.replicationState = options.enums === String ? $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] === undefined ? message.replicationState : $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] : message.replicationState; - if (message.encryptionInfo && message.encryptionInfo.length) { - object.encryptionInfo = []; - for (var j = 0; j < message.encryptionInfo.length; ++j) - object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options); - } - return object; - }; - - /** - * Converts this ClusterState to JSON. - * @function toJSON - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @instance - * @returns {Object.} JSON object - */ - ClusterState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterState - * @function getTypeUrl - * @memberof google.bigtable.admin.v2.Table.ClusterState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.admin.v2.Table.ClusterState"; - }; - - /** - * ReplicationState enum. - * @name google.bigtable.admin.v2.Table.ClusterState.ReplicationState - * @enum {number} - * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value - * @property {number} INITIALIZING=1 INITIALIZING value - * @property {number} PLANNED_MAINTENANCE=2 PLANNED_MAINTENANCE value - * @property {number} UNPLANNED_MAINTENANCE=3 UNPLANNED_MAINTENANCE value - * @property {number} READY=4 READY value - * @property {number} READY_OPTIMIZING=5 READY_OPTIMIZING value - */ - ClusterState.ReplicationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; - values[valuesById[1] = "INITIALIZING"] = 1; - values[valuesById[2] = "PLANNED_MAINTENANCE"] = 2; - values[valuesById[3] = "UNPLANNED_MAINTENANCE"] = 3; - values[valuesById[4] = "READY"] = 4; - values[valuesById[5] = "READY_OPTIMIZING"] = 5; - return values; - })(); - - return ClusterState; - })(); - - /** - * TimestampGranularity enum. - * @name google.bigtable.admin.v2.Table.TimestampGranularity - * @enum {number} - * @property {number} TIMESTAMP_GRANULARITY_UNSPECIFIED=0 TIMESTAMP_GRANULARITY_UNSPECIFIED value - * @property {number} MILLIS=1 MILLIS value - */ - Table.TimestampGranularity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIMESTAMP_GRANULARITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "MILLIS"] = 1; - return values; - })(); - - /** - * View enum. - * @name google.bigtable.admin.v2.Table.View - * @enum {number} - * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value - * @property {number} NAME_ONLY=1 NAME_ONLY value - * @property {number} SCHEMA_VIEW=2 SCHEMA_VIEW value - * @property {number} REPLICATION_VIEW=3 REPLICATION_VIEW value - * @property {number} ENCRYPTION_VIEW=5 ENCRYPTION_VIEW value - * @property {number} FULL=4 FULL value - */ - Table.View = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "NAME_ONLY"] = 1; - values[valuesById[2] = "SCHEMA_VIEW"] = 2; - values[valuesById[3] = "REPLICATION_VIEW"] = 3; - values[valuesById[5] = "ENCRYPTION_VIEW"] = 5; - values[valuesById[4] = "FULL"] = 4; - return values; - })(); - - return Table; + return ListAuthorizedViewsRequest; })(); - v2.ColumnFamily = (function() { + v2.ListAuthorizedViewsResponse = (function() { /** - * Properties of a ColumnFamily. + * Properties of a ListAuthorizedViewsResponse. * @memberof google.bigtable.admin.v2 - * @interface IColumnFamily - * @property {google.bigtable.admin.v2.IGcRule|null} [gcRule] ColumnFamily gcRule + * @interface IListAuthorizedViewsResponse + * @property {Array.|null} [authorizedViews] ListAuthorizedViewsResponse authorizedViews + * @property {string|null} [nextPageToken] ListAuthorizedViewsResponse nextPageToken */ /** - * Constructs a new ColumnFamily. + * Constructs a new ListAuthorizedViewsResponse. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a ColumnFamily. - * @implements IColumnFamily + * @classdesc Represents a ListAuthorizedViewsResponse. + * @implements IListAuthorizedViewsResponse * @constructor - * @param {google.bigtable.admin.v2.IColumnFamily=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse=} [properties] Properties to set */ - function ColumnFamily(properties) { + function ListAuthorizedViewsResponse(properties) { + this.authorizedViews = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22896,75 +23357,92 @@ } /** - * ColumnFamily gcRule. - * @member {google.bigtable.admin.v2.IGcRule|null|undefined} gcRule - * @memberof google.bigtable.admin.v2.ColumnFamily + * ListAuthorizedViewsResponse authorizedViews. + * @member {Array.} authorizedViews + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @instance */ - ColumnFamily.prototype.gcRule = null; + ListAuthorizedViewsResponse.prototype.authorizedViews = $util.emptyArray; /** - * Creates a new ColumnFamily instance using the specified properties. + * ListAuthorizedViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse + * @instance + */ + ListAuthorizedViewsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAuthorizedViewsResponse instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static - * @param {google.bigtable.admin.v2.IColumnFamily=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily instance + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse instance */ - ColumnFamily.create = function create(properties) { - return new ColumnFamily(properties); + ListAuthorizedViewsResponse.create = function create(properties) { + return new ListAuthorizedViewsResponse(properties); }; /** - * Encodes the specified ColumnFamily message. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * Encodes the specified ListAuthorizedViewsResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static - * @param {google.bigtable.admin.v2.IColumnFamily} message ColumnFamily message or plain object to encode + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse} message ListAuthorizedViewsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnFamily.encode = function encode(message, writer) { + ListAuthorizedViewsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) - $root.google.bigtable.admin.v2.GcRule.encode(message.gcRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authorizedViews != null && message.authorizedViews.length) + for (var i = 0; i < message.authorizedViews.length; ++i) + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedViews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ColumnFamily message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * Encodes the specified ListAuthorizedViewsResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAuthorizedViewsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static - * @param {google.bigtable.admin.v2.IColumnFamily} message ColumnFamily message or plain object to encode + * @param {google.bigtable.admin.v2.IListAuthorizedViewsResponse} message ListAuthorizedViewsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { + ListAuthorizedViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ColumnFamily message from the specified reader or buffer. + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnFamily.decode = function decode(reader, length) { + ListAuthorizedViewsResponse.decode = 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.bigtable.admin.v2.ColumnFamily(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcRule = $root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32()); + if (!(message.authorizedViews && message.authorizedViews.length)) + message.authorizedViews = []; + message.authorizedViews.push($root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -22976,130 +23454,149 @@ }; /** - * Decodes a ColumnFamily message from the specified reader or buffer, length delimited. + * Decodes a ListAuthorizedViewsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ColumnFamily.decodeDelimited = function decodeDelimited(reader) { + ListAuthorizedViewsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ColumnFamily message. + * Verifies a ListAuthorizedViewsResponse message. * @function verify - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ColumnFamily.verify = function verify(message) { + ListAuthorizedViewsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcRule != null && message.hasOwnProperty("gcRule")) { - var error = $root.google.bigtable.admin.v2.GcRule.verify(message.gcRule); - if (error) - return "gcRule." + error; + if (message.authorizedViews != null && message.hasOwnProperty("authorizedViews")) { + if (!Array.isArray(message.authorizedViews)) + return "authorizedViews: array expected"; + for (var i = 0; i < message.authorizedViews.length; ++i) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedViews[i]); + if (error) + return "authorizedViews." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ColumnFamily message from a plain object. Also converts values to their respective internal types. + * Creates a ListAuthorizedViewsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + * @returns {google.bigtable.admin.v2.ListAuthorizedViewsResponse} ListAuthorizedViewsResponse */ - ColumnFamily.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.ColumnFamily) + ListAuthorizedViewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse) return object; - var message = new $root.google.bigtable.admin.v2.ColumnFamily(); - if (object.gcRule != null) { - if (typeof object.gcRule !== "object") - throw TypeError(".google.bigtable.admin.v2.ColumnFamily.gcRule: object expected"); - message.gcRule = $root.google.bigtable.admin.v2.GcRule.fromObject(object.gcRule); + var message = new $root.google.bigtable.admin.v2.ListAuthorizedViewsResponse(); + if (object.authorizedViews) { + if (!Array.isArray(object.authorizedViews)) + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: array expected"); + message.authorizedViews = []; + for (var i = 0; i < object.authorizedViews.length; ++i) { + if (typeof object.authorizedViews[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListAuthorizedViewsResponse.authorizedViews: object expected"); + message.authorizedViews[i] = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedViews[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ColumnFamily message. Also converts values to other types if specified. + * Creates a plain object from a ListAuthorizedViewsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static - * @param {google.bigtable.admin.v2.ColumnFamily} message ColumnFamily + * @param {google.bigtable.admin.v2.ListAuthorizedViewsResponse} message ListAuthorizedViewsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ColumnFamily.toObject = function toObject(message, options) { + ListAuthorizedViewsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.authorizedViews = []; if (options.defaults) - object.gcRule = null; - if (message.gcRule != null && message.hasOwnProperty("gcRule")) - object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options); + object.nextPageToken = ""; + if (message.authorizedViews && message.authorizedViews.length) { + object.authorizedViews = []; + for (var j = 0; j < message.authorizedViews.length; ++j) + object.authorizedViews[j] = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedViews[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ColumnFamily to JSON. + * Converts this ListAuthorizedViewsResponse to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @instance * @returns {Object.} JSON object */ - ColumnFamily.prototype.toJSON = function toJSON() { + ListAuthorizedViewsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ColumnFamily + * Gets the default type url for ListAuthorizedViewsResponse * @function getTypeUrl - * @memberof google.bigtable.admin.v2.ColumnFamily + * @memberof google.bigtable.admin.v2.ListAuthorizedViewsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAuthorizedViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.ColumnFamily"; + return typeUrlPrefix + "/google.bigtable.admin.v2.ListAuthorizedViewsResponse"; }; - return ColumnFamily; + return ListAuthorizedViewsResponse; })(); - v2.GcRule = (function() { + v2.GetAuthorizedViewRequest = (function() { /** - * Properties of a GcRule. + * Properties of a GetAuthorizedViewRequest. * @memberof google.bigtable.admin.v2 - * @interface IGcRule - * @property {number|null} [maxNumVersions] GcRule maxNumVersions - * @property {google.protobuf.IDuration|null} [maxAge] GcRule maxAge - * @property {google.bigtable.admin.v2.GcRule.IIntersection|null} [intersection] GcRule intersection - * @property {google.bigtable.admin.v2.GcRule.IUnion|null} [union] GcRule union + * @interface IGetAuthorizedViewRequest + * @property {string|null} [name] GetAuthorizedViewRequest name + * @property {google.bigtable.admin.v2.AuthorizedView.ResponseView|null} [view] GetAuthorizedViewRequest view */ /** - * Constructs a new GcRule. + * Constructs a new GetAuthorizedViewRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a GcRule. - * @implements IGcRule + * @classdesc Represents a GetAuthorizedViewRequest. + * @implements IGetAuthorizedViewRequest * @constructor - * @param {google.bigtable.admin.v2.IGcRule=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest=} [properties] Properties to set */ - function GcRule(properties) { + function GetAuthorizedViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23107,131 +23604,360 @@ } /** - * GcRule maxNumVersions. - * @member {number|null|undefined} maxNumVersions - * @memberof google.bigtable.admin.v2.GcRule + * GetAuthorizedViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest * @instance */ - GcRule.prototype.maxNumVersions = null; + GetAuthorizedViewRequest.prototype.name = ""; /** - * GcRule maxAge. - * @member {google.protobuf.IDuration|null|undefined} maxAge - * @memberof google.bigtable.admin.v2.GcRule + * GetAuthorizedViewRequest view. + * @member {google.bigtable.admin.v2.AuthorizedView.ResponseView} view + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest * @instance */ - GcRule.prototype.maxAge = null; + GetAuthorizedViewRequest.prototype.view = 0; /** - * GcRule intersection. - * @member {google.bigtable.admin.v2.GcRule.IIntersection|null|undefined} intersection - * @memberof google.bigtable.admin.v2.GcRule + * Creates a new GetAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest instance + */ + GetAuthorizedViewRequest.create = function create(properties) { + return new GetAuthorizedViewRequest(properties); + }; + + /** + * Encodes the specified GetAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} message GetAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAuthorizedViewRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IGetAuthorizedViewRequest} message GetAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAuthorizedViewRequest.decode = 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.bigtable.admin.v2.GetAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAuthorizedViewRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GetAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GetAuthorizedViewRequest} GetAuthorizedViewRequest + */ + GetAuthorizedViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.GetAuthorizedViewRequest) + return object; + var message = new $root.google.bigtable.admin.v2.GetAuthorizedViewRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "RESPONSE_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "NAME_ONLY": + case 1: + message.view = 1; + break; + case "BASIC": + case 2: + message.view = 2; + break; + case "FULL": + case 3: + message.view = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.GetAuthorizedViewRequest} message GetAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAuthorizedViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "RESPONSE_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] === undefined ? message.view : $root.google.bigtable.admin.v2.AuthorizedView.ResponseView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest * @instance + * @returns {Object.} JSON object */ - GcRule.prototype.intersection = null; + GetAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * GcRule union. - * @member {google.bigtable.admin.v2.GcRule.IUnion|null|undefined} union - * @memberof google.bigtable.admin.v2.GcRule + * Gets the default type url for GetAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GetAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GetAuthorizedViewRequest"; + }; + + return GetAuthorizedViewRequest; + })(); + + v2.UpdateAuthorizedViewRequest = (function() { + + /** + * Properties of an UpdateAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateAuthorizedViewRequest + * @property {google.bigtable.admin.v2.IAuthorizedView|null} [authorizedView] UpdateAuthorizedViewRequest authorizedView + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAuthorizedViewRequest updateMask + * @property {boolean|null} [ignoreWarnings] UpdateAuthorizedViewRequest ignoreWarnings + */ + + /** + * Constructs a new UpdateAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateAuthorizedViewRequest. + * @implements IUpdateAuthorizedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest=} [properties] Properties to set + */ + function UpdateAuthorizedViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAuthorizedViewRequest authorizedView. + * @member {google.bigtable.admin.v2.IAuthorizedView|null|undefined} authorizedView + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @instance */ - GcRule.prototype.union = null; + UpdateAuthorizedViewRequest.prototype.authorizedView = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * UpdateAuthorizedViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest + * @instance + */ + UpdateAuthorizedViewRequest.prototype.updateMask = null; /** - * GcRule rule. - * @member {"maxNumVersions"|"maxAge"|"intersection"|"union"|undefined} rule - * @memberof google.bigtable.admin.v2.GcRule + * UpdateAuthorizedViewRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @instance */ - Object.defineProperty(GcRule.prototype, "rule", { - get: $util.oneOfGetter($oneOfFields = ["maxNumVersions", "maxAge", "intersection", "union"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateAuthorizedViewRequest.prototype.ignoreWarnings = false; /** - * Creates a new GcRule instance using the specified properties. + * Creates a new UpdateAuthorizedViewRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.IGcRule=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.GcRule} GcRule instance + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest instance */ - GcRule.create = function create(properties) { - return new GcRule(properties); + UpdateAuthorizedViewRequest.create = function create(properties) { + return new UpdateAuthorizedViewRequest(properties); }; /** - * Encodes the specified GcRule message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * Encodes the specified UpdateAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.IGcRule} message GcRule message or plain object to encode + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} message UpdateAuthorizedViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcRule.encode = function encode(message, writer) { + UpdateAuthorizedViewRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxNumVersions); - if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) - $root.google.protobuf.Duration.encode(message.maxAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) - $root.google.bigtable.admin.v2.GcRule.Intersection.encode(message.intersection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.union != null && Object.hasOwnProperty.call(message, "union")) - $root.google.bigtable.admin.v2.GcRule.Union.encode(message.union, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.authorizedView != null && Object.hasOwnProperty.call(message, "authorizedView")) + $root.google.bigtable.admin.v2.AuthorizedView.encode(message.authorizedView, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; }; /** - * Encodes the specified GcRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * Encodes the specified UpdateAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.IGcRule} message GcRule message or plain object to encode + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest} message UpdateAuthorizedViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcRule.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcRule message from the specified reader or buffer. + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.GcRule} GcRule + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcRule.decode = function decode(reader, length) { + UpdateAuthorizedViewRequest.decode = 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.bigtable.admin.v2.GcRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.maxNumVersions = reader.int32(); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.decode(reader, reader.uint32()); break; } case 2: { - message.maxAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 3: { - message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.decode(reader, reader.uint32()); - break; - } - case 4: { - message.union = $root.google.bigtable.admin.v2.GcRule.Union.decode(reader, reader.uint32()); + message.ignoreWarnings = reader.bool(); break; } default: @@ -23243,636 +23969,4799 @@ }; /** - * Decodes a GcRule message from the specified reader or buffer, length delimited. + * Decodes an UpdateAuthorizedViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.GcRule} GcRule + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcRule.decodeDelimited = function decodeDelimited(reader) { + UpdateAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcRule message. + * Verifies an UpdateAuthorizedViewRequest message. * @function verify - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcRule.verify = function verify(message) { + UpdateAuthorizedViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { - properties.rule = 1; - if (!$util.isInteger(message.maxNumVersions)) - return "maxNumVersions: integer expected"; - } - if (message.maxAge != null && message.hasOwnProperty("maxAge")) { - if (properties.rule === 1) - return "rule: multiple values"; - properties.rule = 1; - { - var error = $root.google.protobuf.Duration.verify(message.maxAge); - if (error) - return "maxAge." + error; - } - } - if (message.intersection != null && message.hasOwnProperty("intersection")) { - if (properties.rule === 1) - return "rule: multiple values"; - properties.rule = 1; - { - var error = $root.google.bigtable.admin.v2.GcRule.Intersection.verify(message.intersection); - if (error) - return "intersection." + error; - } + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.verify(message.authorizedView); + if (error) + return "authorizedView." + error; } - if (message.union != null && message.hasOwnProperty("union")) { - if (properties.rule === 1) - return "rule: multiple values"; - properties.rule = 1; - { - var error = $root.google.bigtable.admin.v2.GcRule.Union.verify(message.union); - if (error) - return "union." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; return null; }; /** - * Creates a GcRule message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.GcRule} GcRule + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} UpdateAuthorizedViewRequest */ - GcRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.GcRule) + UpdateAuthorizedViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest) return object; - var message = new $root.google.bigtable.admin.v2.GcRule(); - if (object.maxNumVersions != null) - message.maxNumVersions = object.maxNumVersions | 0; - if (object.maxAge != null) { - if (typeof object.maxAge !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.maxAge: object expected"); - message.maxAge = $root.google.protobuf.Duration.fromObject(object.maxAge); - } - if (object.intersection != null) { - if (typeof object.intersection !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.intersection: object expected"); - message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.fromObject(object.intersection); + var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest(); + if (object.authorizedView != null) { + if (typeof object.authorizedView !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.authorizedView: object expected"); + message.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.fromObject(object.authorizedView); } - if (object.union != null) { - if (typeof object.union !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.union: object expected"); - message.union = $root.google.bigtable.admin.v2.GcRule.Union.fromObject(object.union); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); return message; }; /** - * Creates a plain object from a GcRule message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAuthorizedViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static - * @param {google.bigtable.admin.v2.GcRule} message GcRule + * @param {google.bigtable.admin.v2.UpdateAuthorizedViewRequest} message UpdateAuthorizedViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcRule.toObject = function toObject(message, options) { + UpdateAuthorizedViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { - object.maxNumVersions = message.maxNumVersions; - if (options.oneofs) - object.rule = "maxNumVersions"; - } - if (message.maxAge != null && message.hasOwnProperty("maxAge")) { - object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options); - if (options.oneofs) - object.rule = "maxAge"; - } - if (message.intersection != null && message.hasOwnProperty("intersection")) { - object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options); - if (options.oneofs) - object.rule = "intersection"; - } - if (message.union != null && message.hasOwnProperty("union")) { - object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options); - if (options.oneofs) - object.rule = "union"; + if (options.defaults) { + object.authorizedView = null; + object.updateMask = null; + object.ignoreWarnings = false; } + if (message.authorizedView != null && message.hasOwnProperty("authorizedView")) + object.authorizedView = $root.google.bigtable.admin.v2.AuthorizedView.toObject(message.authorizedView, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; return object; }; /** - * Converts this GcRule to JSON. + * Converts this UpdateAuthorizedViewRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @instance * @returns {Object.} JSON object */ - GcRule.prototype.toJSON = function toJSON() { + UpdateAuthorizedViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcRule + * Gets the default type url for UpdateAuthorizedViewRequest * @function getTypeUrl - * @memberof google.bigtable.admin.v2.GcRule + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule"; + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"; }; - GcRule.Intersection = (function() { + return UpdateAuthorizedViewRequest; + })(); - /** - * Properties of an Intersection. - * @memberof google.bigtable.admin.v2.GcRule - * @interface IIntersection - * @property {Array.|null} [rules] Intersection rules - */ + v2.UpdateAuthorizedViewMetadata = (function() { - /** - * Constructs a new Intersection. - * @memberof google.bigtable.admin.v2.GcRule - * @classdesc Represents an Intersection. - * @implements IIntersection - * @constructor - * @param {google.bigtable.admin.v2.GcRule.IIntersection=} [properties] Properties to set - */ - function Intersection(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]]; - } + /** + * Properties of an UpdateAuthorizedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @interface IUpdateAuthorizedViewMetadata + * @property {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null} [originalRequest] UpdateAuthorizedViewMetadata originalRequest + * @property {google.protobuf.ITimestamp|null} [requestTime] UpdateAuthorizedViewMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] UpdateAuthorizedViewMetadata finishTime + */ - /** - * Intersection rules. - * @member {Array.} rules - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @instance - */ - Intersection.prototype.rules = $util.emptyArray; + /** + * Constructs a new UpdateAuthorizedViewMetadata. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an UpdateAuthorizedViewMetadata. + * @implements IUpdateAuthorizedViewMetadata + * @constructor + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata=} [properties] Properties to set + */ + function UpdateAuthorizedViewMetadata(properties) { + if (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 Intersection instance using the specified properties. - * @function create - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {google.bigtable.admin.v2.GcRule.IIntersection=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection instance - */ - Intersection.create = function create(properties) { - return new Intersection(properties); - }; + /** + * UpdateAuthorizedViewMetadata originalRequest. + * @member {google.bigtable.admin.v2.IUpdateAuthorizedViewRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + */ + UpdateAuthorizedViewMetadata.prototype.originalRequest = null; - /** - * Encodes the specified Intersection message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. - * @function encode - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {google.bigtable.admin.v2.GcRule.IIntersection} message Intersection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Intersection.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.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * UpdateAuthorizedViewMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + */ + UpdateAuthorizedViewMetadata.prototype.requestTime = null; - /** - * Encodes the specified Intersection message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {google.bigtable.admin.v2.GcRule.IIntersection} message Intersection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Intersection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UpdateAuthorizedViewMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + */ + UpdateAuthorizedViewMetadata.prototype.finishTime = null; - /** - * Decodes an Intersection message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Intersection.decode = 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.bigtable.admin.v2.GcRule.Intersection(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new UpdateAuthorizedViewMetadata instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata instance + */ + UpdateAuthorizedViewMetadata.create = function create(properties) { + return new UpdateAuthorizedViewMetadata(properties); + }; - /** - * Decodes an Intersection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Intersection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UpdateAuthorizedViewMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata} message UpdateAuthorizedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAuthorizedViewMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.encode(message.originalRequest, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Verifies an Intersection message. - * @function verify - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Intersection.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.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - return null; - }; + /** + * Encodes the specified UpdateAuthorizedViewMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata} message UpdateAuthorizedViewMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAuthorizedViewMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an Intersection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection - */ - Intersection.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.GcRule.Intersection) - return object; - var message = new $root.google.bigtable.admin.v2.GcRule.Intersection(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: object expected"); - message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAuthorizedViewMetadata.decode = 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.decode(reader, reader.uint32()); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; } + case 3: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Intersection message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {google.bigtable.admin.v2.GcRule.Intersection} message Intersection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Intersection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options); - } + /** + * Decodes an UpdateAuthorizedViewMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAuthorizedViewMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAuthorizedViewMetadata message. + * @function verify + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAuthorizedViewMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; + } + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + return null; + }; + + /** + * Creates an UpdateAuthorizedViewMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} UpdateAuthorizedViewMetadata + */ + UpdateAuthorizedViewMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) return object; - }; + var message = new $root.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata(); + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.fromObject(object.originalRequest); + } + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAuthorizedViewMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + return message; + }; - /** - * Converts this Intersection to JSON. - * @function toJSON - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @instance - * @returns {Object.} JSON object - */ - Intersection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an UpdateAuthorizedViewMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} message UpdateAuthorizedViewMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAuthorizedViewMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.originalRequest = null; + object.requestTime = null; + object.finishTime = null; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.toObject(message.originalRequest, options); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + return object; + }; - /** - * Gets the default type url for Intersection - * @function getTypeUrl - * @memberof google.bigtable.admin.v2.GcRule.Intersection - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Intersection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule.Intersection"; - }; + /** + * Converts this UpdateAuthorizedViewMetadata to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateAuthorizedViewMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Intersection; - })(); + /** + * Gets the default type url for UpdateAuthorizedViewMetadata + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAuthorizedViewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"; + }; - GcRule.Union = (function() { + return UpdateAuthorizedViewMetadata; + })(); - /** - * Properties of an Union. - * @memberof google.bigtable.admin.v2.GcRule - * @interface IUnion - * @property {Array.|null} [rules] Union rules - */ + v2.DeleteAuthorizedViewRequest = (function() { - /** - * Constructs a new Union. - * @memberof google.bigtable.admin.v2.GcRule - * @classdesc Represents an Union. - * @implements IUnion - * @constructor - * @param {google.bigtable.admin.v2.GcRule.IUnion=} [properties] Properties to set - */ - function Union(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]]; - } + /** + * Properties of a DeleteAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @interface IDeleteAuthorizedViewRequest + * @property {string|null} [name] DeleteAuthorizedViewRequest name + * @property {string|null} [etag] DeleteAuthorizedViewRequest etag + */ - /** - * Union rules. - * @member {Array.} rules - * @memberof google.bigtable.admin.v2.GcRule.Union - * @instance - */ - Union.prototype.rules = $util.emptyArray; + /** + * Constructs a new DeleteAuthorizedViewRequest. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a DeleteAuthorizedViewRequest. + * @implements IDeleteAuthorizedViewRequest + * @constructor + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest=} [properties] Properties to set + */ + function DeleteAuthorizedViewRequest(properties) { + if (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 Union instance using the specified properties. - * @function create - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {google.bigtable.admin.v2.GcRule.IUnion=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.GcRule.Union} Union instance - */ - Union.create = function create(properties) { - return new Union(properties); - }; + /** + * DeleteAuthorizedViewRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @instance + */ + DeleteAuthorizedViewRequest.prototype.name = ""; - /** - * Encodes the specified Union message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. - * @function encode - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {google.bigtable.admin.v2.GcRule.IUnion} message Union message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Union.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.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * DeleteAuthorizedViewRequest etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @instance + */ + DeleteAuthorizedViewRequest.prototype.etag = ""; - /** - * Encodes the specified Union message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {google.bigtable.admin.v2.GcRule.IUnion} message Union message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Union.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DeleteAuthorizedViewRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest instance + */ + DeleteAuthorizedViewRequest.create = function create(properties) { + return new DeleteAuthorizedViewRequest(properties); + }; - /** - * Decodes an Union message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.GcRule.Union} Union - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Union.decode = 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.bigtable.admin.v2.GcRule.Union(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DeleteAuthorizedViewRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} message DeleteAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAuthorizedViewRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + return writer; + }; - /** - * Decodes an Union message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.GcRule.Union} Union - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Union.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DeleteAuthorizedViewRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAuthorizedViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.IDeleteAuthorizedViewRequest} message DeleteAuthorizedViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAuthorizedViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an Union message. - * @function verify - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Union.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.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); - if (error) - return "rules." + error; + /** + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAuthorizedViewRequest.decode = 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.bigtable.admin.v2.DeleteAuthorizedViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - } - return null; - }; - - /** - * Creates an Union message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.GcRule.Union} Union - */ - Union.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.GcRule.Union) - return object; - var message = new $root.google.bigtable.admin.v2.GcRule.Union(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: object expected"); - message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); + case 2: { + message.etag = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Union message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {google.bigtable.admin.v2.GcRule.Union} message Union - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Union.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { + /** + * Decodes a DeleteAuthorizedViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAuthorizedViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAuthorizedViewRequest message. + * @function verify + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAuthorizedViewRequest.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteAuthorizedViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} DeleteAuthorizedViewRequest + */ + DeleteAuthorizedViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest) + return object; + var message = new $root.google.bigtable.admin.v2.DeleteAuthorizedViewRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteAuthorizedViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {google.bigtable.admin.v2.DeleteAuthorizedViewRequest} message DeleteAuthorizedViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAuthorizedViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteAuthorizedViewRequest to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAuthorizedViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAuthorizedViewRequest + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.DeleteAuthorizedViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAuthorizedViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"; + }; + + return DeleteAuthorizedViewRequest; + })(); + + v2.RestoreInfo = (function() { + + /** + * Properties of a RestoreInfo. + * @memberof google.bigtable.admin.v2 + * @interface IRestoreInfo + * @property {google.bigtable.admin.v2.RestoreSourceType|null} [sourceType] RestoreInfo sourceType + * @property {google.bigtable.admin.v2.IBackupInfo|null} [backupInfo] RestoreInfo backupInfo + */ + + /** + * Constructs a new RestoreInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a RestoreInfo. + * @implements IRestoreInfo + * @constructor + * @param {google.bigtable.admin.v2.IRestoreInfo=} [properties] Properties to set + */ + function RestoreInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreInfo sourceType. + * @member {google.bigtable.admin.v2.RestoreSourceType} sourceType + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + */ + RestoreInfo.prototype.sourceType = 0; + + /** + * RestoreInfo backupInfo. + * @member {google.bigtable.admin.v2.IBackupInfo|null|undefined} backupInfo + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + */ + RestoreInfo.prototype.backupInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreInfo sourceInfo. + * @member {"backupInfo"|undefined} sourceInfo + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + */ + Object.defineProperty(RestoreInfo.prototype, "sourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.IRestoreInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo instance + */ + RestoreInfo.create = function create(properties) { + return new RestoreInfo(properties); + }; + + /** + * Encodes the specified RestoreInfo message. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.IRestoreInfo} message RestoreInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); + if (message.backupInfo != null && Object.hasOwnProperty.call(message, "backupInfo")) + $root.google.bigtable.admin.v2.BackupInfo.encode(message.backupInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.RestoreInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.IRestoreInfo} message RestoreInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreInfo.decode = 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.bigtable.admin.v2.RestoreInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + case 2: { + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + break; + } + if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { + properties.sourceInfo = 1; + { + var error = $root.google.bigtable.admin.v2.BackupInfo.verify(message.backupInfo); + if (error) + return "backupInfo." + error; + } + } + return null; + }; + + /** + * Creates a RestoreInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.RestoreInfo} RestoreInfo + */ + RestoreInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.RestoreInfo) + return object; + var message = new $root.google.bigtable.admin.v2.RestoreInfo(); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "RESTORE_SOURCE_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "BACKUP": + case 1: + message.sourceType = 1; + break; + } + if (object.backupInfo != null) { + if (typeof object.backupInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.RestoreInfo.backupInfo: object expected"); + message.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.fromObject(object.backupInfo); + } + return message; + }; + + /** + * Creates a plain object from a RestoreInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {google.bigtable.admin.v2.RestoreInfo} message RestoreInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sourceType = options.enums === String ? "RESTORE_SOURCE_TYPE_UNSPECIFIED" : 0; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] === undefined ? message.sourceType : $root.google.bigtable.admin.v2.RestoreSourceType[message.sourceType] : message.sourceType; + if (message.backupInfo != null && message.hasOwnProperty("backupInfo")) { + object.backupInfo = $root.google.bigtable.admin.v2.BackupInfo.toObject(message.backupInfo, options); + if (options.oneofs) + object.sourceInfo = "backupInfo"; + } + return object; + }; + + /** + * Converts this RestoreInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.RestoreInfo + * @instance + * @returns {Object.} JSON object + */ + RestoreInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreInfo + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.RestoreInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.RestoreInfo"; + }; + + return RestoreInfo; + })(); + + v2.ChangeStreamConfig = (function() { + + /** + * Properties of a ChangeStreamConfig. + * @memberof google.bigtable.admin.v2 + * @interface IChangeStreamConfig + * @property {google.protobuf.IDuration|null} [retentionPeriod] ChangeStreamConfig retentionPeriod + */ + + /** + * Constructs a new ChangeStreamConfig. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ChangeStreamConfig. + * @implements IChangeStreamConfig + * @constructor + * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set + */ + function ChangeStreamConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeStreamConfig retentionPeriod. + * @member {google.protobuf.IDuration|null|undefined} retentionPeriod + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @instance + */ + ChangeStreamConfig.prototype.retentionPeriod = null; + + /** + * Creates a new ChangeStreamConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig instance + */ + ChangeStreamConfig.create = function create(properties) { + return new ChangeStreamConfig(properties); + }; + + /** + * Encodes the specified ChangeStreamConfig message. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeStreamConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeStreamConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ChangeStreamConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.IChangeStreamConfig} message ChangeStreamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeStreamConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeStreamConfig.decode = 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.bigtable.admin.v2.ChangeStreamConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeStreamConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeStreamConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeStreamConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeStreamConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); + if (error) + return "retentionPeriod." + error; + } + return null; + }; + + /** + * Creates a ChangeStreamConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ChangeStreamConfig} ChangeStreamConfig + */ + ChangeStreamConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ChangeStreamConfig) + return object; + var message = new $root.google.bigtable.admin.v2.ChangeStreamConfig(); + if (object.retentionPeriod != null) { + if (typeof object.retentionPeriod !== "object") + throw TypeError(".google.bigtable.admin.v2.ChangeStreamConfig.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); + } + return message; + }; + + /** + * Creates a plain object from a ChangeStreamConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {google.bigtable.admin.v2.ChangeStreamConfig} message ChangeStreamConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeStreamConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.retentionPeriod = null; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + return object; + }; + + /** + * Converts this ChangeStreamConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @instance + * @returns {Object.} JSON object + */ + ChangeStreamConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeStreamConfig + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ChangeStreamConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeStreamConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ChangeStreamConfig"; + }; + + return ChangeStreamConfig; + })(); + + v2.Table = (function() { + + /** + * Properties of a Table. + * @memberof google.bigtable.admin.v2 + * @interface ITable + * @property {string|null} [name] Table name + * @property {Object.|null} [clusterStates] Table clusterStates + * @property {Object.|null} [columnFamilies] Table columnFamilies + * @property {google.bigtable.admin.v2.Table.TimestampGranularity|null} [granularity] Table granularity + * @property {google.bigtable.admin.v2.IRestoreInfo|null} [restoreInfo] Table restoreInfo + * @property {google.bigtable.admin.v2.IChangeStreamConfig|null} [changeStreamConfig] Table changeStreamConfig + * @property {boolean|null} [deletionProtection] Table deletionProtection + * @property {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null} [automatedBackupPolicy] Table automatedBackupPolicy + */ + + /** + * Constructs a new Table. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Table. + * @implements ITable + * @constructor + * @param {google.bigtable.admin.v2.ITable=} [properties] Properties to set + */ + function Table(properties) { + this.clusterStates = {}; + this.columnFamilies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Table name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.name = ""; + + /** + * Table clusterStates. + * @member {Object.} clusterStates + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.clusterStates = $util.emptyObject; + + /** + * Table columnFamilies. + * @member {Object.} columnFamilies + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.columnFamilies = $util.emptyObject; + + /** + * Table granularity. + * @member {google.bigtable.admin.v2.Table.TimestampGranularity} granularity + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.granularity = 0; + + /** + * Table restoreInfo. + * @member {google.bigtable.admin.v2.IRestoreInfo|null|undefined} restoreInfo + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.restoreInfo = null; + + /** + * Table changeStreamConfig. + * @member {google.bigtable.admin.v2.IChangeStreamConfig|null|undefined} changeStreamConfig + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.changeStreamConfig = null; + + /** + * Table deletionProtection. + * @member {boolean} deletionProtection + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.deletionProtection = false; + + /** + * Table automatedBackupPolicy. + * @member {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy|null|undefined} automatedBackupPolicy + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Table.prototype.automatedBackupPolicy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Table automatedBackupConfig. + * @member {"automatedBackupPolicy"|undefined} automatedBackupConfig + * @memberof google.bigtable.admin.v2.Table + * @instance + */ + Object.defineProperty(Table.prototype, "automatedBackupConfig", { + get: $util.oneOfGetter($oneOfFields = ["automatedBackupPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Table instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.ITable=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Table} Table instance + */ + Table.create = function create(properties) { + return new Table(properties); + }; + + /** + * Encodes the specified Table message. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.clusterStates != null && Object.hasOwnProperty.call(message, "clusterStates")) + for (var keys = Object.keys(message.clusterStates), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.Table.ClusterState.encode(message.clusterStates[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.columnFamilies != null && Object.hasOwnProperty.call(message, "columnFamilies")) + for (var keys = Object.keys(message.columnFamilies), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.ColumnFamily.encode(message.columnFamilies[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.granularity); + if (message.restoreInfo != null && Object.hasOwnProperty.call(message, "restoreInfo")) + $root.google.bigtable.admin.v2.RestoreInfo.encode(message.restoreInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.changeStreamConfig != null && Object.hasOwnProperty.call(message, "changeStreamConfig")) + $root.google.bigtable.admin.v2.ChangeStreamConfig.encode(message.changeStreamConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.deletionProtection); + if (message.automatedBackupPolicy != null && Object.hasOwnProperty.call(message, "automatedBackupPolicy")) + $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.encode(message.automatedBackupPolicy, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Table message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.ITable} message Table message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Table.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Table message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.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.google.bigtable.admin.v2.Table(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.clusterStates === $util.emptyObject) + message.clusterStates = {}; + 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.google.bigtable.admin.v2.Table.ClusterState.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.clusterStates[key] = value; + break; + } + case 3: { + if (message.columnFamilies === $util.emptyObject) + message.columnFamilies = {}; + 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.google.bigtable.admin.v2.ColumnFamily.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.columnFamilies[key] = value; + break; + } + case 4: { + message.granularity = reader.int32(); + break; + } + case 6: { + message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.deletionProtection = reader.bool(); + break; + } + case 13: { + message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Table message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.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 google.bigtable.admin.v2.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"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.clusterStates != null && message.hasOwnProperty("clusterStates")) { + if (!$util.isObject(message.clusterStates)) + return "clusterStates: object expected"; + var key = Object.keys(message.clusterStates); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.Table.ClusterState.verify(message.clusterStates[key[i]]); + if (error) + return "clusterStates." + error; + } + } + if (message.columnFamilies != null && message.hasOwnProperty("columnFamilies")) { + if (!$util.isObject(message.columnFamilies)) + return "columnFamilies: object expected"; + var key = Object.keys(message.columnFamilies); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.ColumnFamily.verify(message.columnFamilies[key[i]]); + if (error) + return "columnFamilies." + error; + } + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + switch (message.granularity) { + default: + return "granularity: enum value expected"; + case 0: + case 1: + break; + } + if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) { + var error = $root.google.bigtable.admin.v2.RestoreInfo.verify(message.restoreInfo); + if (error) + return "restoreInfo." + error; + } + if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) { + var error = $root.google.bigtable.admin.v2.ChangeStreamConfig.verify(message.changeStreamConfig); + if (error) + return "changeStreamConfig." + error; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { + properties.automatedBackupConfig = 1; + { + var error = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify(message.automatedBackupPolicy); + if (error) + return "automatedBackupPolicy." + error; + } + } + return null; + }; + + /** + * Creates a Table message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Table} Table + */ + Table.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Table) + return object; + var message = new $root.google.bigtable.admin.v2.Table(); + if (object.name != null) + message.name = String(object.name); + if (object.clusterStates) { + if (typeof object.clusterStates !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); + message.clusterStates = {}; + for (var keys = Object.keys(object.clusterStates), i = 0; i < keys.length; ++i) { + if (typeof object.clusterStates[keys[i]] !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.clusterStates: object expected"); + message.clusterStates[keys[i]] = $root.google.bigtable.admin.v2.Table.ClusterState.fromObject(object.clusterStates[keys[i]]); + } + } + if (object.columnFamilies) { + if (typeof object.columnFamilies !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); + message.columnFamilies = {}; + for (var keys = Object.keys(object.columnFamilies), i = 0; i < keys.length; ++i) { + if (typeof object.columnFamilies[keys[i]] !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.columnFamilies: object expected"); + message.columnFamilies[keys[i]] = $root.google.bigtable.admin.v2.ColumnFamily.fromObject(object.columnFamilies[keys[i]]); + } + } + switch (object.granularity) { + default: + if (typeof object.granularity === "number") { + message.granularity = object.granularity; + break; + } + break; + case "TIMESTAMP_GRANULARITY_UNSPECIFIED": + case 0: + message.granularity = 0; + break; + case "MILLIS": + case 1: + message.granularity = 1; + break; + } + if (object.restoreInfo != null) { + if (typeof object.restoreInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.restoreInfo: object expected"); + message.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.fromObject(object.restoreInfo); + } + if (object.changeStreamConfig != null) { + if (typeof object.changeStreamConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.changeStreamConfig: object expected"); + message.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.fromObject(object.changeStreamConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.automatedBackupPolicy != null) { + if (typeof object.automatedBackupPolicy !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.automatedBackupPolicy: object expected"); + message.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.fromObject(object.automatedBackupPolicy); + } + return message; + }; + + /** + * Creates a plain object from a Table message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {google.bigtable.admin.v2.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.objects || options.defaults) { + object.clusterStates = {}; + object.columnFamilies = {}; + } + if (options.defaults) { + object.name = ""; + object.granularity = options.enums === String ? "TIMESTAMP_GRANULARITY_UNSPECIFIED" : 0; + object.restoreInfo = null; + object.changeStreamConfig = null; + object.deletionProtection = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.clusterStates && (keys2 = Object.keys(message.clusterStates)).length) { + object.clusterStates = {}; + for (var j = 0; j < keys2.length; ++j) + object.clusterStates[keys2[j]] = $root.google.bigtable.admin.v2.Table.ClusterState.toObject(message.clusterStates[keys2[j]], options); + } + if (message.columnFamilies && (keys2 = Object.keys(message.columnFamilies)).length) { + object.columnFamilies = {}; + for (var j = 0; j < keys2.length; ++j) + object.columnFamilies[keys2[j]] = $root.google.bigtable.admin.v2.ColumnFamily.toObject(message.columnFamilies[keys2[j]], options); + } + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = options.enums === String ? $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] === undefined ? message.granularity : $root.google.bigtable.admin.v2.Table.TimestampGranularity[message.granularity] : message.granularity; + if (message.restoreInfo != null && message.hasOwnProperty("restoreInfo")) + object.restoreInfo = $root.google.bigtable.admin.v2.RestoreInfo.toObject(message.restoreInfo, options); + if (message.changeStreamConfig != null && message.hasOwnProperty("changeStreamConfig")) + object.changeStreamConfig = $root.google.bigtable.admin.v2.ChangeStreamConfig.toObject(message.changeStreamConfig, options); + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + object.deletionProtection = message.deletionProtection; + if (message.automatedBackupPolicy != null && message.hasOwnProperty("automatedBackupPolicy")) { + object.automatedBackupPolicy = $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.toObject(message.automatedBackupPolicy, options); + if (options.oneofs) + object.automatedBackupConfig = "automatedBackupPolicy"; + } + return object; + }; + + /** + * Converts this Table to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Table + * @instance + * @returns {Object.} JSON object + */ + Table.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Table + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Table + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Table.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Table"; + }; + + Table.ClusterState = (function() { + + /** + * Properties of a ClusterState. + * @memberof google.bigtable.admin.v2.Table + * @interface IClusterState + * @property {google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null} [replicationState] ClusterState replicationState + * @property {Array.|null} [encryptionInfo] ClusterState encryptionInfo + */ + + /** + * Constructs a new ClusterState. + * @memberof google.bigtable.admin.v2.Table + * @classdesc Represents a ClusterState. + * @implements IClusterState + * @constructor + * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set + */ + function ClusterState(properties) { + this.encryptionInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterState replicationState. + * @member {google.bigtable.admin.v2.Table.ClusterState.ReplicationState} replicationState + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + */ + ClusterState.prototype.replicationState = 0; + + /** + * ClusterState encryptionInfo. + * @member {Array.} encryptionInfo + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + */ + ClusterState.prototype.encryptionInfo = $util.emptyArray; + + /** + * Creates a new ClusterState instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState instance + */ + ClusterState.create = function create(properties) { + return new ClusterState(properties); + }; + + /** + * Encodes the specified ClusterState message. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.IClusterState} message ClusterState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.replicationState); + if (message.encryptionInfo != null && message.encryptionInfo.length) + for (var i = 0; i < message.encryptionInfo.length; ++i) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterState message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.ClusterState.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.IClusterState} message ClusterState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterState message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterState.decode = 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.bigtable.admin.v2.Table.ClusterState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.replicationState = reader.int32(); + break; + } + case 2: { + if (!(message.encryptionInfo && message.encryptionInfo.length)) + message.encryptionInfo = []; + message.encryptionInfo.push($root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterState message. + * @function verify + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.replicationState != null && message.hasOwnProperty("replicationState")) + switch (message.replicationState) { + default: + return "replicationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + if (!Array.isArray(message.encryptionInfo)) + return "encryptionInfo: array expected"; + for (var i = 0; i < message.encryptionInfo.length; ++i) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo[i]); + if (error) + return "encryptionInfo." + error; + } + } + return null; + }; + + /** + * Creates a ClusterState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Table.ClusterState} ClusterState + */ + ClusterState.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Table.ClusterState) + return object; + var message = new $root.google.bigtable.admin.v2.Table.ClusterState(); + switch (object.replicationState) { + default: + if (typeof object.replicationState === "number") { + message.replicationState = object.replicationState; + break; + } + break; + case "STATE_NOT_KNOWN": + case 0: + message.replicationState = 0; + break; + case "INITIALIZING": + case 1: + message.replicationState = 1; + break; + case "PLANNED_MAINTENANCE": + case 2: + message.replicationState = 2; + break; + case "UNPLANNED_MAINTENANCE": + case 3: + message.replicationState = 3; + break; + case "READY": + case 4: + message.replicationState = 4; + break; + case "READY_OPTIMIZING": + case 5: + message.replicationState = 5; + break; + } + if (object.encryptionInfo) { + if (!Array.isArray(object.encryptionInfo)) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: array expected"); + message.encryptionInfo = []; + for (var i = 0; i < object.encryptionInfo.length; ++i) { + if (typeof object.encryptionInfo[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); + message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ClusterState message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {google.bigtable.admin.v2.Table.ClusterState} message ClusterState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.encryptionInfo = []; + if (options.defaults) + object.replicationState = options.enums === String ? "STATE_NOT_KNOWN" : 0; + if (message.replicationState != null && message.hasOwnProperty("replicationState")) + object.replicationState = options.enums === String ? $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] === undefined ? message.replicationState : $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] : message.replicationState; + if (message.encryptionInfo && message.encryptionInfo.length) { + object.encryptionInfo = []; + for (var j = 0; j < message.encryptionInfo.length; ++j) + object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options); + } + return object; + }; + + /** + * Converts this ClusterState to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + * @returns {Object.} JSON object + */ + ClusterState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClusterState + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Table.ClusterState"; + }; + + /** + * ReplicationState enum. + * @name google.bigtable.admin.v2.Table.ClusterState.ReplicationState + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} INITIALIZING=1 INITIALIZING value + * @property {number} PLANNED_MAINTENANCE=2 PLANNED_MAINTENANCE value + * @property {number} UNPLANNED_MAINTENANCE=3 UNPLANNED_MAINTENANCE value + * @property {number} READY=4 READY value + * @property {number} READY_OPTIMIZING=5 READY_OPTIMIZING value + */ + ClusterState.ReplicationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "INITIALIZING"] = 1; + values[valuesById[2] = "PLANNED_MAINTENANCE"] = 2; + values[valuesById[3] = "UNPLANNED_MAINTENANCE"] = 3; + values[valuesById[4] = "READY"] = 4; + values[valuesById[5] = "READY_OPTIMIZING"] = 5; + return values; + })(); + + return ClusterState; + })(); + + /** + * TimestampGranularity enum. + * @name google.bigtable.admin.v2.Table.TimestampGranularity + * @enum {number} + * @property {number} TIMESTAMP_GRANULARITY_UNSPECIFIED=0 TIMESTAMP_GRANULARITY_UNSPECIFIED value + * @property {number} MILLIS=1 MILLIS value + */ + Table.TimestampGranularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIMESTAMP_GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "MILLIS"] = 1; + return values; + })(); + + /** + * View enum. + * @name google.bigtable.admin.v2.Table.View + * @enum {number} + * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value + * @property {number} NAME_ONLY=1 NAME_ONLY value + * @property {number} SCHEMA_VIEW=2 SCHEMA_VIEW value + * @property {number} REPLICATION_VIEW=3 REPLICATION_VIEW value + * @property {number} ENCRYPTION_VIEW=5 ENCRYPTION_VIEW value + * @property {number} FULL=4 FULL value + */ + Table.View = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "NAME_ONLY"] = 1; + values[valuesById[2] = "SCHEMA_VIEW"] = 2; + values[valuesById[3] = "REPLICATION_VIEW"] = 3; + values[valuesById[5] = "ENCRYPTION_VIEW"] = 5; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + Table.AutomatedBackupPolicy = (function() { + + /** + * Properties of an AutomatedBackupPolicy. + * @memberof google.bigtable.admin.v2.Table + * @interface IAutomatedBackupPolicy + * @property {google.protobuf.IDuration|null} [retentionPeriod] AutomatedBackupPolicy retentionPeriod + * @property {google.protobuf.IDuration|null} [frequency] AutomatedBackupPolicy frequency + */ + + /** + * Constructs a new AutomatedBackupPolicy. + * @memberof google.bigtable.admin.v2.Table + * @classdesc Represents an AutomatedBackupPolicy. + * @implements IAutomatedBackupPolicy + * @constructor + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy=} [properties] Properties to set + */ + function AutomatedBackupPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomatedBackupPolicy retentionPeriod. + * @member {google.protobuf.IDuration|null|undefined} retentionPeriod + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + */ + AutomatedBackupPolicy.prototype.retentionPeriod = null; + + /** + * AutomatedBackupPolicy frequency. + * @member {google.protobuf.IDuration|null|undefined} frequency + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + */ + AutomatedBackupPolicy.prototype.frequency = null; + + /** + * Creates a new AutomatedBackupPolicy instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy instance + */ + AutomatedBackupPolicy.create = function create(properties) { + return new AutomatedBackupPolicy(properties); + }; + + /** + * Encodes the specified AutomatedBackupPolicy message. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy} message AutomatedBackupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomatedBackupPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retentionPeriod != null && Object.hasOwnProperty.call(message, "retentionPeriod")) + $root.google.protobuf.Duration.encode(message.retentionPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + $root.google.protobuf.Duration.encode(message.frequency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AutomatedBackupPolicy message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Table.AutomatedBackupPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.IAutomatedBackupPolicy} message AutomatedBackupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomatedBackupPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomatedBackupPolicy.decode = 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.bigtable.admin.v2.Table.AutomatedBackupPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retentionPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.frequency = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomatedBackupPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomatedBackupPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomatedBackupPolicy message. + * @function verify + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomatedBackupPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.retentionPeriod); + if (error) + return "retentionPeriod." + error; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + var error = $root.google.protobuf.Duration.verify(message.frequency); + if (error) + return "frequency." + error; + } + return null; + }; + + /** + * Creates an AutomatedBackupPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} AutomatedBackupPolicy + */ + AutomatedBackupPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) + return object; + var message = new $root.google.bigtable.admin.v2.Table.AutomatedBackupPolicy(); + if (object.retentionPeriod != null) { + if (typeof object.retentionPeriod !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.retentionPeriod: object expected"); + message.retentionPeriod = $root.google.protobuf.Duration.fromObject(object.retentionPeriod); + } + if (object.frequency != null) { + if (typeof object.frequency !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.AutomatedBackupPolicy.frequency: object expected"); + message.frequency = $root.google.protobuf.Duration.fromObject(object.frequency); + } + return message; + }; + + /** + * Creates a plain object from an AutomatedBackupPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {google.bigtable.admin.v2.Table.AutomatedBackupPolicy} message AutomatedBackupPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomatedBackupPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.retentionPeriod = null; + object.frequency = null; + } + if (message.retentionPeriod != null && message.hasOwnProperty("retentionPeriod")) + object.retentionPeriod = $root.google.protobuf.Duration.toObject(message.retentionPeriod, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = $root.google.protobuf.Duration.toObject(message.frequency, options); + return object; + }; + + /** + * Converts this AutomatedBackupPolicy to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @instance + * @returns {Object.} JSON object + */ + AutomatedBackupPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomatedBackupPolicy + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Table.AutomatedBackupPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomatedBackupPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"; + }; + + return AutomatedBackupPolicy; + })(); + + return Table; + })(); + + v2.AuthorizedView = (function() { + + /** + * Properties of an AuthorizedView. + * @memberof google.bigtable.admin.v2 + * @interface IAuthorizedView + * @property {string|null} [name] AuthorizedView name + * @property {google.bigtable.admin.v2.AuthorizedView.ISubsetView|null} [subsetView] AuthorizedView subsetView + * @property {string|null} [etag] AuthorizedView etag + * @property {boolean|null} [deletionProtection] AuthorizedView deletionProtection + */ + + /** + * Constructs a new AuthorizedView. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AuthorizedView. + * @implements IAuthorizedView + * @constructor + * @param {google.bigtable.admin.v2.IAuthorizedView=} [properties] Properties to set + */ + function AuthorizedView(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthorizedView name. + * @member {string} name + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.name = ""; + + /** + * AuthorizedView subsetView. + * @member {google.bigtable.admin.v2.AuthorizedView.ISubsetView|null|undefined} subsetView + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.subsetView = null; + + /** + * AuthorizedView etag. + * @member {string} etag + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.etag = ""; + + /** + * AuthorizedView deletionProtection. + * @member {boolean} deletionProtection + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + AuthorizedView.prototype.deletionProtection = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AuthorizedView authorizedView. + * @member {"subsetView"|undefined} authorizedView + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + */ + Object.defineProperty(AuthorizedView.prototype, "authorizedView", { + get: $util.oneOfGetter($oneOfFields = ["subsetView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AuthorizedView instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.IAuthorizedView=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView instance + */ + AuthorizedView.create = function create(properties) { + return new AuthorizedView(properties); + }; + + /** + * Encodes the specified AuthorizedView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.IAuthorizedView} message AuthorizedView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedView.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.subsetView != null && Object.hasOwnProperty.call(message, "subsetView")) + $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.encode(message.subsetView, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deletionProtection); + return writer; + }; + + /** + * Encodes the specified AuthorizedView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.IAuthorizedView} message AuthorizedView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorizedView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedView.decode = 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.bigtable.admin.v2.AuthorizedView(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.decode(reader, reader.uint32()); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 4: { + message.deletionProtection = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorizedView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorizedView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorizedView message. + * @function verify + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorizedView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.subsetView != null && message.hasOwnProperty("subsetView")) { + properties.authorizedView = 1; + { + var error = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.verify(message.subsetView); + if (error) + return "subsetView." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + return null; + }; + + /** + * Creates an AuthorizedView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AuthorizedView} AuthorizedView + */ + AuthorizedView.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView) + return object; + var message = new $root.google.bigtable.admin.v2.AuthorizedView(); + if (object.name != null) + message.name = String(object.name); + if (object.subsetView != null) { + if (typeof object.subsetView !== "object") + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.subsetView: object expected"); + message.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.fromObject(object.subsetView); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + return message; + }; + + /** + * Creates a plain object from an AuthorizedView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView} message AuthorizedView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorizedView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.deletionProtection = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.subsetView != null && message.hasOwnProperty("subsetView")) { + object.subsetView = $root.google.bigtable.admin.v2.AuthorizedView.SubsetView.toObject(message.subsetView, options); + if (options.oneofs) + object.authorizedView = "subsetView"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) + object.deletionProtection = message.deletionProtection; + return object; + }; + + /** + * Converts this AuthorizedView to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AuthorizedView + * @instance + * @returns {Object.} JSON object + */ + AuthorizedView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthorizedView + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AuthorizedView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorizedView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AuthorizedView"; + }; + + AuthorizedView.FamilySubsets = (function() { + + /** + * Properties of a FamilySubsets. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @interface IFamilySubsets + * @property {Array.|null} [qualifiers] FamilySubsets qualifiers + * @property {Array.|null} [qualifierPrefixes] FamilySubsets qualifierPrefixes + */ + + /** + * Constructs a new FamilySubsets. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @classdesc Represents a FamilySubsets. + * @implements IFamilySubsets + * @constructor + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets=} [properties] Properties to set + */ + function FamilySubsets(properties) { + this.qualifiers = []; + this.qualifierPrefixes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FamilySubsets qualifiers. + * @member {Array.} qualifiers + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @instance + */ + FamilySubsets.prototype.qualifiers = $util.emptyArray; + + /** + * FamilySubsets qualifierPrefixes. + * @member {Array.} qualifierPrefixes + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @instance + */ + FamilySubsets.prototype.qualifierPrefixes = $util.emptyArray; + + /** + * Creates a new FamilySubsets instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets instance + */ + FamilySubsets.create = function create(properties) { + return new FamilySubsets(properties); + }; + + /** + * Encodes the specified FamilySubsets message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets} message FamilySubsets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FamilySubsets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qualifiers != null && message.qualifiers.length) + for (var i = 0; i < message.qualifiers.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.qualifiers[i]); + if (message.qualifierPrefixes != null && message.qualifierPrefixes.length) + for (var i = 0; i < message.qualifierPrefixes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.qualifierPrefixes[i]); + return writer; + }; + + /** + * Encodes the specified FamilySubsets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.IFamilySubsets} message FamilySubsets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FamilySubsets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FamilySubsets.decode = 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.bigtable.admin.v2.AuthorizedView.FamilySubsets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.qualifiers && message.qualifiers.length)) + message.qualifiers = []; + message.qualifiers.push(reader.bytes()); + break; + } + case 2: { + if (!(message.qualifierPrefixes && message.qualifierPrefixes.length)) + message.qualifierPrefixes = []; + message.qualifierPrefixes.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FamilySubsets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FamilySubsets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FamilySubsets message. + * @function verify + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FamilySubsets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qualifiers != null && message.hasOwnProperty("qualifiers")) { + if (!Array.isArray(message.qualifiers)) + return "qualifiers: array expected"; + for (var i = 0; i < message.qualifiers.length; ++i) + if (!(message.qualifiers[i] && typeof message.qualifiers[i].length === "number" || $util.isString(message.qualifiers[i]))) + return "qualifiers: buffer[] expected"; + } + if (message.qualifierPrefixes != null && message.hasOwnProperty("qualifierPrefixes")) { + if (!Array.isArray(message.qualifierPrefixes)) + return "qualifierPrefixes: array expected"; + for (var i = 0; i < message.qualifierPrefixes.length; ++i) + if (!(message.qualifierPrefixes[i] && typeof message.qualifierPrefixes[i].length === "number" || $util.isString(message.qualifierPrefixes[i]))) + return "qualifierPrefixes: buffer[] expected"; + } + return null; + }; + + /** + * Creates a FamilySubsets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} FamilySubsets + */ + FamilySubsets.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets) + return object; + var message = new $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets(); + if (object.qualifiers) { + if (!Array.isArray(object.qualifiers)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.FamilySubsets.qualifiers: array expected"); + message.qualifiers = []; + for (var i = 0; i < object.qualifiers.length; ++i) + if (typeof object.qualifiers[i] === "string") + $util.base64.decode(object.qualifiers[i], message.qualifiers[i] = $util.newBuffer($util.base64.length(object.qualifiers[i])), 0); + else if (object.qualifiers[i].length >= 0) + message.qualifiers[i] = object.qualifiers[i]; + } + if (object.qualifierPrefixes) { + if (!Array.isArray(object.qualifierPrefixes)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.FamilySubsets.qualifierPrefixes: array expected"); + message.qualifierPrefixes = []; + for (var i = 0; i < object.qualifierPrefixes.length; ++i) + if (typeof object.qualifierPrefixes[i] === "string") + $util.base64.decode(object.qualifierPrefixes[i], message.qualifierPrefixes[i] = $util.newBuffer($util.base64.length(object.qualifierPrefixes[i])), 0); + else if (object.qualifierPrefixes[i].length >= 0) + message.qualifierPrefixes[i] = object.qualifierPrefixes[i]; + } + return message; + }; + + /** + * Creates a plain object from a FamilySubsets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.FamilySubsets} message FamilySubsets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FamilySubsets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.qualifiers = []; + object.qualifierPrefixes = []; + } + if (message.qualifiers && message.qualifiers.length) { + object.qualifiers = []; + for (var j = 0; j < message.qualifiers.length; ++j) + object.qualifiers[j] = options.bytes === String ? $util.base64.encode(message.qualifiers[j], 0, message.qualifiers[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifiers[j]) : message.qualifiers[j]; + } + if (message.qualifierPrefixes && message.qualifierPrefixes.length) { + object.qualifierPrefixes = []; + for (var j = 0; j < message.qualifierPrefixes.length; ++j) + object.qualifierPrefixes[j] = options.bytes === String ? $util.base64.encode(message.qualifierPrefixes[j], 0, message.qualifierPrefixes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.qualifierPrefixes[j]) : message.qualifierPrefixes[j]; + } + return object; + }; + + /** + * Converts this FamilySubsets to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @instance + * @returns {Object.} JSON object + */ + FamilySubsets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FamilySubsets + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AuthorizedView.FamilySubsets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FamilySubsets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"; + }; + + return FamilySubsets; + })(); + + AuthorizedView.SubsetView = (function() { + + /** + * Properties of a SubsetView. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @interface ISubsetView + * @property {Array.|null} [rowPrefixes] SubsetView rowPrefixes + * @property {Object.|null} [familySubsets] SubsetView familySubsets + */ + + /** + * Constructs a new SubsetView. + * @memberof google.bigtable.admin.v2.AuthorizedView + * @classdesc Represents a SubsetView. + * @implements ISubsetView + * @constructor + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView=} [properties] Properties to set + */ + function SubsetView(properties) { + this.rowPrefixes = []; + this.familySubsets = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubsetView rowPrefixes. + * @member {Array.} rowPrefixes + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @instance + */ + SubsetView.prototype.rowPrefixes = $util.emptyArray; + + /** + * SubsetView familySubsets. + * @member {Object.} familySubsets + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @instance + */ + SubsetView.prototype.familySubsets = $util.emptyObject; + + /** + * Creates a new SubsetView instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView instance + */ + SubsetView.create = function create(properties) { + return new SubsetView(properties); + }; + + /** + * Encodes the specified SubsetView message. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView} message SubsetView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubsetView.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowPrefixes != null && message.rowPrefixes.length) + for (var i = 0; i < message.rowPrefixes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rowPrefixes[i]); + if (message.familySubsets != null && Object.hasOwnProperty.call(message, "familySubsets")) + for (var keys = Object.keys(message.familySubsets), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.encode(message.familySubsets[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified SubsetView message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AuthorizedView.SubsetView.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.ISubsetView} message SubsetView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubsetView.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubsetView message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubsetView.decode = 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.bigtable.admin.v2.AuthorizedView.SubsetView(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rowPrefixes && message.rowPrefixes.length)) + message.rowPrefixes = []; + message.rowPrefixes.push(reader.bytes()); + break; + } + case 2: { + if (message.familySubsets === $util.emptyObject) + message.familySubsets = {}; + 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.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.familySubsets[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubsetView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubsetView.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubsetView message. + * @function verify + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubsetView.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowPrefixes != null && message.hasOwnProperty("rowPrefixes")) { + if (!Array.isArray(message.rowPrefixes)) + return "rowPrefixes: array expected"; + for (var i = 0; i < message.rowPrefixes.length; ++i) + if (!(message.rowPrefixes[i] && typeof message.rowPrefixes[i].length === "number" || $util.isString(message.rowPrefixes[i]))) + return "rowPrefixes: buffer[] expected"; + } + if (message.familySubsets != null && message.hasOwnProperty("familySubsets")) { + if (!$util.isObject(message.familySubsets)) + return "familySubsets: object expected"; + var key = Object.keys(message.familySubsets); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.verify(message.familySubsets[key[i]]); + if (error) + return "familySubsets." + error; + } + } + return null; + }; + + /** + * Creates a SubsetView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AuthorizedView.SubsetView} SubsetView + */ + SubsetView.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.AuthorizedView.SubsetView) + return object; + var message = new $root.google.bigtable.admin.v2.AuthorizedView.SubsetView(); + if (object.rowPrefixes) { + if (!Array.isArray(object.rowPrefixes)) + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.rowPrefixes: array expected"); + message.rowPrefixes = []; + for (var i = 0; i < object.rowPrefixes.length; ++i) + if (typeof object.rowPrefixes[i] === "string") + $util.base64.decode(object.rowPrefixes[i], message.rowPrefixes[i] = $util.newBuffer($util.base64.length(object.rowPrefixes[i])), 0); + else if (object.rowPrefixes[i].length >= 0) + message.rowPrefixes[i] = object.rowPrefixes[i]; + } + if (object.familySubsets) { + if (typeof object.familySubsets !== "object") + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.familySubsets: object expected"); + message.familySubsets = {}; + for (var keys = Object.keys(object.familySubsets), i = 0; i < keys.length; ++i) { + if (typeof object.familySubsets[keys[i]] !== "object") + throw TypeError(".google.bigtable.admin.v2.AuthorizedView.SubsetView.familySubsets: object expected"); + message.familySubsets[keys[i]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.fromObject(object.familySubsets[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a SubsetView message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {google.bigtable.admin.v2.AuthorizedView.SubsetView} message SubsetView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubsetView.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rowPrefixes = []; + if (options.objects || options.defaults) + object.familySubsets = {}; + if (message.rowPrefixes && message.rowPrefixes.length) { + object.rowPrefixes = []; + for (var j = 0; j < message.rowPrefixes.length; ++j) + object.rowPrefixes[j] = options.bytes === String ? $util.base64.encode(message.rowPrefixes[j], 0, message.rowPrefixes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.rowPrefixes[j]) : message.rowPrefixes[j]; + } + var keys2; + if (message.familySubsets && (keys2 = Object.keys(message.familySubsets)).length) { + object.familySubsets = {}; + for (var j = 0; j < keys2.length; ++j) + object.familySubsets[keys2[j]] = $root.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.toObject(message.familySubsets[keys2[j]], options); + } + return object; + }; + + /** + * Converts this SubsetView to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @instance + * @returns {Object.} JSON object + */ + SubsetView.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubsetView + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.AuthorizedView.SubsetView + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubsetView.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.AuthorizedView.SubsetView"; + }; + + return SubsetView; + })(); + + /** + * ResponseView enum. + * @name google.bigtable.admin.v2.AuthorizedView.ResponseView + * @enum {number} + * @property {number} RESPONSE_VIEW_UNSPECIFIED=0 RESPONSE_VIEW_UNSPECIFIED value + * @property {number} NAME_ONLY=1 NAME_ONLY value + * @property {number} BASIC=2 BASIC value + * @property {number} FULL=3 FULL value + */ + AuthorizedView.ResponseView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESPONSE_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "NAME_ONLY"] = 1; + values[valuesById[2] = "BASIC"] = 2; + values[valuesById[3] = "FULL"] = 3; + return values; + })(); + + return AuthorizedView; + })(); + + v2.ColumnFamily = (function() { + + /** + * Properties of a ColumnFamily. + * @memberof google.bigtable.admin.v2 + * @interface IColumnFamily + * @property {google.bigtable.admin.v2.IGcRule|null} [gcRule] ColumnFamily gcRule + * @property {google.bigtable.admin.v2.IType|null} [valueType] ColumnFamily valueType + */ + + /** + * Constructs a new ColumnFamily. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a ColumnFamily. + * @implements IColumnFamily + * @constructor + * @param {google.bigtable.admin.v2.IColumnFamily=} [properties] Properties to set + */ + function ColumnFamily(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnFamily gcRule. + * @member {google.bigtable.admin.v2.IGcRule|null|undefined} gcRule + * @memberof google.bigtable.admin.v2.ColumnFamily + * @instance + */ + ColumnFamily.prototype.gcRule = null; + + /** + * ColumnFamily valueType. + * @member {google.bigtable.admin.v2.IType|null|undefined} valueType + * @memberof google.bigtable.admin.v2.ColumnFamily + * @instance + */ + ColumnFamily.prototype.valueType = null; + + /** + * Creates a new ColumnFamily instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.IColumnFamily=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily instance + */ + ColumnFamily.create = function create(properties) { + return new ColumnFamily(properties); + }; + + /** + * Encodes the specified ColumnFamily message. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.IColumnFamily} message ColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnFamily.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcRule != null && Object.hasOwnProperty.call(message, "gcRule")) + $root.google.bigtable.admin.v2.GcRule.encode(message.gcRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + $root.google.bigtable.admin.v2.Type.encode(message.valueType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ColumnFamily message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ColumnFamily.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.IColumnFamily} message ColumnFamily message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnFamily.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnFamily.decode = 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.bigtable.admin.v2.ColumnFamily(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcRule = $root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.valueType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnFamily message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnFamily.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnFamily message. + * @function verify + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnFamily.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcRule != null && message.hasOwnProperty("gcRule")) { + var error = $root.google.bigtable.admin.v2.GcRule.verify(message.gcRule); + if (error) + return "gcRule." + error; + } + if (message.valueType != null && message.hasOwnProperty("valueType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.valueType); + if (error) + return "valueType." + error; + } + return null; + }; + + /** + * Creates a ColumnFamily message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.ColumnFamily} ColumnFamily + */ + ColumnFamily.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ColumnFamily) + return object; + var message = new $root.google.bigtable.admin.v2.ColumnFamily(); + if (object.gcRule != null) { + if (typeof object.gcRule !== "object") + throw TypeError(".google.bigtable.admin.v2.ColumnFamily.gcRule: object expected"); + message.gcRule = $root.google.bigtable.admin.v2.GcRule.fromObject(object.gcRule); + } + if (object.valueType != null) { + if (typeof object.valueType !== "object") + throw TypeError(".google.bigtable.admin.v2.ColumnFamily.valueType: object expected"); + message.valueType = $root.google.bigtable.admin.v2.Type.fromObject(object.valueType); + } + return message; + }; + + /** + * Creates a plain object from a ColumnFamily message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {google.bigtable.admin.v2.ColumnFamily} message ColumnFamily + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnFamily.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcRule = null; + object.valueType = null; + } + if (message.gcRule != null && message.hasOwnProperty("gcRule")) + object.gcRule = $root.google.bigtable.admin.v2.GcRule.toObject(message.gcRule, options); + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = $root.google.bigtable.admin.v2.Type.toObject(message.valueType, options); + return object; + }; + + /** + * Converts this ColumnFamily to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.ColumnFamily + * @instance + * @returns {Object.} JSON object + */ + ColumnFamily.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnFamily + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.ColumnFamily + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnFamily.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.ColumnFamily"; + }; + + return ColumnFamily; + })(); + + v2.GcRule = (function() { + + /** + * Properties of a GcRule. + * @memberof google.bigtable.admin.v2 + * @interface IGcRule + * @property {number|null} [maxNumVersions] GcRule maxNumVersions + * @property {google.protobuf.IDuration|null} [maxAge] GcRule maxAge + * @property {google.bigtable.admin.v2.GcRule.IIntersection|null} [intersection] GcRule intersection + * @property {google.bigtable.admin.v2.GcRule.IUnion|null} [union] GcRule union + */ + + /** + * Constructs a new GcRule. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a GcRule. + * @implements IGcRule + * @constructor + * @param {google.bigtable.admin.v2.IGcRule=} [properties] Properties to set + */ + function GcRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcRule maxNumVersions. + * @member {number|null|undefined} maxNumVersions + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.maxNumVersions = null; + + /** + * GcRule maxAge. + * @member {google.protobuf.IDuration|null|undefined} maxAge + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.maxAge = null; + + /** + * GcRule intersection. + * @member {google.bigtable.admin.v2.GcRule.IIntersection|null|undefined} intersection + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.intersection = null; + + /** + * GcRule union. + * @member {google.bigtable.admin.v2.GcRule.IUnion|null|undefined} union + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + GcRule.prototype.union = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GcRule rule. + * @member {"maxNumVersions"|"maxAge"|"intersection"|"union"|undefined} rule + * @memberof google.bigtable.admin.v2.GcRule + * @instance + */ + Object.defineProperty(GcRule.prototype, "rule", { + get: $util.oneOfGetter($oneOfFields = ["maxNumVersions", "maxAge", "intersection", "union"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GcRule instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.IGcRule=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GcRule} GcRule instance + */ + GcRule.create = function create(properties) { + return new GcRule(properties); + }; + + /** + * Encodes the specified GcRule message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.IGcRule} message GcRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxNumVersions != null && Object.hasOwnProperty.call(message, "maxNumVersions")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxNumVersions); + if (message.maxAge != null && Object.hasOwnProperty.call(message, "maxAge")) + $root.google.protobuf.Duration.encode(message.maxAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intersection != null && Object.hasOwnProperty.call(message, "intersection")) + $root.google.bigtable.admin.v2.GcRule.Intersection.encode(message.intersection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.union != null && Object.hasOwnProperty.call(message, "union")) + $root.google.bigtable.admin.v2.GcRule.Union.encode(message.union, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GcRule message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.IGcRule} message GcRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcRule message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.GcRule} GcRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcRule.decode = 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.bigtable.admin.v2.GcRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxNumVersions = reader.int32(); + break; + } + case 2: { + message.maxAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.decode(reader, reader.uint32()); + break; + } + case 4: { + message.union = $root.google.bigtable.admin.v2.GcRule.Union.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GcRule} GcRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcRule message. + * @function verify + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { + properties.rule = 1; + if (!$util.isInteger(message.maxNumVersions)) + return "maxNumVersions: integer expected"; + } + if (message.maxAge != null && message.hasOwnProperty("maxAge")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.protobuf.Duration.verify(message.maxAge); + if (error) + return "maxAge." + error; + } + } + if (message.intersection != null && message.hasOwnProperty("intersection")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.bigtable.admin.v2.GcRule.Intersection.verify(message.intersection); + if (error) + return "intersection." + error; + } + } + if (message.union != null && message.hasOwnProperty("union")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.bigtable.admin.v2.GcRule.Union.verify(message.union); + if (error) + return "union." + error; + } + } + return null; + }; + + /** + * Creates a GcRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GcRule} GcRule + */ + GcRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule) + return object; + var message = new $root.google.bigtable.admin.v2.GcRule(); + if (object.maxNumVersions != null) + message.maxNumVersions = object.maxNumVersions | 0; + if (object.maxAge != null) { + if (typeof object.maxAge !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.maxAge: object expected"); + message.maxAge = $root.google.protobuf.Duration.fromObject(object.maxAge); + } + if (object.intersection != null) { + if (typeof object.intersection !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.intersection: object expected"); + message.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.fromObject(object.intersection); + } + if (object.union != null) { + if (typeof object.union !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.union: object expected"); + message.union = $root.google.bigtable.admin.v2.GcRule.Union.fromObject(object.union); + } + return message; + }; + + /** + * Creates a plain object from a GcRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {google.bigtable.admin.v2.GcRule} message GcRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.maxNumVersions != null && message.hasOwnProperty("maxNumVersions")) { + object.maxNumVersions = message.maxNumVersions; + if (options.oneofs) + object.rule = "maxNumVersions"; + } + if (message.maxAge != null && message.hasOwnProperty("maxAge")) { + object.maxAge = $root.google.protobuf.Duration.toObject(message.maxAge, options); + if (options.oneofs) + object.rule = "maxAge"; + } + if (message.intersection != null && message.hasOwnProperty("intersection")) { + object.intersection = $root.google.bigtable.admin.v2.GcRule.Intersection.toObject(message.intersection, options); + if (options.oneofs) + object.rule = "intersection"; + } + if (message.union != null && message.hasOwnProperty("union")) { + object.union = $root.google.bigtable.admin.v2.GcRule.Union.toObject(message.union, options); + if (options.oneofs) + object.rule = "union"; + } + return object; + }; + + /** + * Converts this GcRule to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GcRule + * @instance + * @returns {Object.} JSON object + */ + GcRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcRule + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GcRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule"; + }; + + GcRule.Intersection = (function() { + + /** + * Properties of an Intersection. + * @memberof google.bigtable.admin.v2.GcRule + * @interface IIntersection + * @property {Array.|null} [rules] Intersection rules + */ + + /** + * Constructs a new Intersection. + * @memberof google.bigtable.admin.v2.GcRule + * @classdesc Represents an Intersection. + * @implements IIntersection + * @constructor + * @param {google.bigtable.admin.v2.GcRule.IIntersection=} [properties] Properties to set + */ + function Intersection(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]]; + } + + /** + * Intersection rules. + * @member {Array.} rules + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @instance + */ + Intersection.prototype.rules = $util.emptyArray; + + /** + * Creates a new Intersection instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.IIntersection=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection instance + */ + Intersection.create = function create(properties) { + return new Intersection(properties); + }; + + /** + * Encodes the specified Intersection message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.IIntersection} message Intersection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intersection.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.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Intersection message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Intersection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.IIntersection} message Intersection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intersection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Intersection message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intersection.decode = 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.bigtable.admin.v2.GcRule.Intersection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Intersection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intersection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Intersection message. + * @function verify + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Intersection.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.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an Intersection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GcRule.Intersection} Intersection + */ + Intersection.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule.Intersection) + return object; + var message = new $root.google.bigtable.admin.v2.GcRule.Intersection(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.Intersection.rules: object expected"); + message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Intersection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {google.bigtable.admin.v2.GcRule.Intersection} message Intersection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Intersection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this Intersection to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @instance + * @returns {Object.} JSON object + */ + Intersection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Intersection + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GcRule.Intersection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Intersection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule.Intersection"; + }; + + return Intersection; + })(); + + GcRule.Union = (function() { + + /** + * Properties of an Union. + * @memberof google.bigtable.admin.v2.GcRule + * @interface IUnion + * @property {Array.|null} [rules] Union rules + */ + + /** + * Constructs a new Union. + * @memberof google.bigtable.admin.v2.GcRule + * @classdesc Represents an Union. + * @implements IUnion + * @constructor + * @param {google.bigtable.admin.v2.GcRule.IUnion=} [properties] Properties to set + */ + function Union(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]]; + } + + /** + * Union rules. + * @member {Array.} rules + * @memberof google.bigtable.admin.v2.GcRule.Union + * @instance + */ + Union.prototype.rules = $util.emptyArray; + + /** + * Creates a new Union instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.IUnion=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GcRule.Union} Union instance + */ + Union.create = function create(properties) { + return new Union(properties); + }; + + /** + * Encodes the specified Union message. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.IUnion} message Union message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Union.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.google.bigtable.admin.v2.GcRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Union message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GcRule.Union.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.IUnion} message Union message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Union.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Union message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.GcRule.Union} Union + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Union.decode = 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.bigtable.admin.v2.GcRule.Union(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.bigtable.admin.v2.GcRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Union message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.GcRule.Union} Union + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Union.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Union message. + * @function verify + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Union.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.google.bigtable.admin.v2.GcRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an Union message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.GcRule.Union} Union + */ + Union.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.GcRule.Union) + return object; + var message = new $root.google.bigtable.admin.v2.GcRule.Union(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.GcRule.Union.rules: object expected"); + message.rules[i] = $root.google.bigtable.admin.v2.GcRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Union message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {google.bigtable.admin.v2.GcRule.Union} message Union + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Union.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) object.rules[j] = $root.google.bigtable.admin.v2.GcRule.toObject(message.rules[j], options); } return object; - }; + }; + + /** + * Converts this Union to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.GcRule.Union + * @instance + * @returns {Object.} JSON object + */ + Union.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Union + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.GcRule.Union + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Union.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule.Union"; + }; + + return Union; + })(); + + return GcRule; + })(); + + v2.EncryptionInfo = (function() { + + /** + * Properties of an EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @interface IEncryptionInfo + * @property {google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null} [encryptionType] EncryptionInfo encryptionType + * @property {google.rpc.IStatus|null} [encryptionStatus] EncryptionInfo encryptionStatus + * @property {string|null} [kmsKeyVersion] EncryptionInfo kmsKeyVersion + */ + + /** + * Constructs a new EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an EncryptionInfo. + * @implements IEncryptionInfo + * @constructor + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + */ + function EncryptionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionInfo encryptionType. + * @member {google.bigtable.admin.v2.EncryptionInfo.EncryptionType} encryptionType + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionType = 0; + + /** + * EncryptionInfo encryptionStatus. + * @member {google.rpc.IStatus|null|undefined} encryptionStatus + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionStatus = null; + + /** + * EncryptionInfo kmsKeyVersion. + * @member {string} kmsKeyVersion + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.kmsKeyVersion = ""; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo instance + */ + EncryptionInfo.create = function create(properties) { + return new EncryptionInfo(properties); + }; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyVersion); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encryptionType); + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decode = 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.bigtable.admin.v2.EncryptionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.encryptionType = reader.int32(); + break; + } + case 4: { + message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 2: { + message.kmsKeyVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { + var error = $root.google.rpc.Status.verify(message.encryptionStatus); + if (error) + return "encryptionStatus." + error; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + if (!$util.isString(message.kmsKeyVersion)) + return "kmsKeyVersion: string expected"; + return null; + }; + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + */ + EncryptionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) + return object; + var message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + switch (object.encryptionType) { + default: + if (typeof object.encryptionType === "number") { + message.encryptionType = object.encryptionType; + break; + } + break; + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "GOOGLE_DEFAULT_ENCRYPTION": + case 1: + message.encryptionType = 1; + break; + case "CUSTOMER_MANAGED_ENCRYPTION": + case 2: + message.encryptionType = 2; + break; + } + if (object.encryptionStatus != null) { + if (typeof object.encryptionStatus !== "object") + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); + message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus); + } + if (object.kmsKeyVersion != null) + message.kmsKeyVersion = String(object.kmsKeyVersion); + return message; + }; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.EncryptionInfo} message EncryptionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kmsKeyVersion = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.encryptionStatus = null; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + object.kmsKeyVersion = message.kmsKeyVersion; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) + object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); + return object; + }; + + /** + * Converts this EncryptionInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + * @returns {Object.} JSON object + */ + EncryptionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionInfo + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.EncryptionInfo"; + }; + + /** + * EncryptionType enum. + * @name google.bigtable.admin.v2.EncryptionInfo.EncryptionType + * @enum {number} + * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value + * @property {number} GOOGLE_DEFAULT_ENCRYPTION=1 GOOGLE_DEFAULT_ENCRYPTION value + * @property {number} CUSTOMER_MANAGED_ENCRYPTION=2 CUSTOMER_MANAGED_ENCRYPTION value + */ + EncryptionInfo.EncryptionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_DEFAULT_ENCRYPTION"] = 1; + values[valuesById[2] = "CUSTOMER_MANAGED_ENCRYPTION"] = 2; + return values; + })(); + + return EncryptionInfo; + })(); + + v2.Snapshot = (function() { + + /** + * Properties of a Snapshot. + * @memberof google.bigtable.admin.v2 + * @interface ISnapshot + * @property {string|null} [name] Snapshot name + * @property {google.bigtable.admin.v2.ITable|null} [sourceTable] Snapshot sourceTable + * @property {number|Long|null} [dataSizeBytes] Snapshot dataSizeBytes + * @property {google.protobuf.ITimestamp|null} [createTime] Snapshot createTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Snapshot deleteTime + * @property {google.bigtable.admin.v2.Snapshot.State|null} [state] Snapshot state + * @property {string|null} [description] Snapshot description + */ + + /** + * Constructs a new Snapshot. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {google.bigtable.admin.v2.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.name = ""; + + /** + * Snapshot sourceTable. + * @member {google.bigtable.admin.v2.ITable|null|undefined} sourceTable + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.sourceTable = null; + + /** + * Snapshot dataSizeBytes. + * @member {number|Long} dataSizeBytes + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.dataSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Snapshot createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.createTime = null; + + /** + * Snapshot deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.deleteTime = null; + + /** + * Snapshot state. + * @member {google.bigtable.admin.v2.Snapshot.State} state + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.state = 0; + + /** + * Snapshot description. + * @member {string} description + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + */ + Snapshot.prototype.description = ""; + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.ISnapshot=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.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.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.dataSizeBytes); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = 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.bigtable.admin.v2.Snapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceTable = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dataSizeBytes = reader.int64(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.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.sourceTable != null && message.hasOwnProperty("sourceTable")) { + var error = $root.google.bigtable.admin.v2.Table.verify(message.sourceTable); + if (error) + return "sourceTable." + error; + } + if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) + if (!$util.isInteger(message.dataSizeBytes) && !(message.dataSizeBytes && $util.isInteger(message.dataSizeBytes.low) && $util.isInteger(message.dataSizeBytes.high))) + return "dataSizeBytes: integer|Long expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Snapshot) + return object; + var message = new $root.google.bigtable.admin.v2.Snapshot(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceTable != null) { + if (typeof object.sourceTable !== "object") + throw TypeError(".google.bigtable.admin.v2.Snapshot.sourceTable: object expected"); + message.sourceTable = $root.google.bigtable.admin.v2.Table.fromObject(object.sourceTable); + } + if (object.dataSizeBytes != null) + if ($util.Long) + (message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes)).unsigned = false; + else if (typeof object.dataSizeBytes === "string") + message.dataSizeBytes = parseInt(object.dataSizeBytes, 10); + else if (typeof object.dataSizeBytes === "number") + message.dataSizeBytes = object.dataSizeBytes; + else if (typeof object.dataSizeBytes === "object") + message.dataSizeBytes = new $util.LongBits(object.dataSizeBytes.low >>> 0, object.dataSizeBytes.high >>> 0).toNumber(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Snapshot.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Snapshot.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_NOT_KNOWN": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {google.bigtable.admin.v2.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sourceTable = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataSizeBytes = options.longs === String ? "0" : 0; + object.createTime = null; + object.deleteTime = null; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options); + if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) + if (typeof message.dataSizeBytes === "number") + object.dataSizeBytes = options.longs === String ? String(message.dataSizeBytes) : message.dataSizeBytes; + else + object.dataSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataSizeBytes) : options.longs === Number ? new $util.LongBits(message.dataSizeBytes.low >>> 0, message.dataSizeBytes.high >>> 0).toNumber() : message.dataSizeBytes; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Snapshot.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Snapshot.State[message.state] : message.state; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; - /** - * Converts this Union to JSON. - * @function toJSON - * @memberof google.bigtable.admin.v2.GcRule.Union - * @instance - * @returns {Object.} JSON object - */ - Union.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Union - * @function getTypeUrl - * @memberof google.bigtable.admin.v2.GcRule.Union - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Union.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.admin.v2.GcRule.Union"; - }; + /** + * Gets the default type url for Snapshot + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Snapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Snapshot"; + }; - return Union; + /** + * State enum. + * @name google.bigtable.admin.v2.Snapshot.State + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + */ + Snapshot.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + return values; })(); - return GcRule; + return Snapshot; })(); - v2.EncryptionInfo = (function() { + v2.Backup = (function() { /** - * Properties of an EncryptionInfo. + * Properties of a Backup. * @memberof google.bigtable.admin.v2 - * @interface IEncryptionInfo - * @property {google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null} [encryptionType] EncryptionInfo encryptionType - * @property {google.rpc.IStatus|null} [encryptionStatus] EncryptionInfo encryptionStatus - * @property {string|null} [kmsKeyVersion] EncryptionInfo kmsKeyVersion + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [sourceTable] Backup sourceTable + * @property {string|null} [sourceBackup] Backup sourceBackup + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [startTime] Backup startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime + * @property {number|Long|null} [sizeBytes] Backup sizeBytes + * @property {google.bigtable.admin.v2.Backup.State|null} [state] Backup state + * @property {google.bigtable.admin.v2.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo */ /** - * Constructs a new EncryptionInfo. + * Constructs a new Backup. * @memberof google.bigtable.admin.v2 - * @classdesc Represents an EncryptionInfo. - * @implements IEncryptionInfo + * @classdesc Represents a Backup. + * @implements IBackup * @constructor - * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IBackup=} [properties] Properties to set */ - function EncryptionInfo(properties) { + function Backup(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23880,103 +28769,187 @@ } /** - * EncryptionInfo encryptionType. - * @member {google.bigtable.admin.v2.EncryptionInfo.EncryptionType} encryptionType - * @memberof google.bigtable.admin.v2.EncryptionInfo + * Backup name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Backup * @instance */ - EncryptionInfo.prototype.encryptionType = 0; + Backup.prototype.name = ""; /** - * EncryptionInfo encryptionStatus. - * @member {google.rpc.IStatus|null|undefined} encryptionStatus - * @memberof google.bigtable.admin.v2.EncryptionInfo + * Backup sourceTable. + * @member {string} sourceTable + * @memberof google.bigtable.admin.v2.Backup * @instance */ - EncryptionInfo.prototype.encryptionStatus = null; + Backup.prototype.sourceTable = ""; /** - * EncryptionInfo kmsKeyVersion. - * @member {string} kmsKeyVersion - * @memberof google.bigtable.admin.v2.EncryptionInfo + * Backup sourceBackup. + * @member {string} sourceBackup + * @memberof google.bigtable.admin.v2.Backup * @instance */ - EncryptionInfo.prototype.kmsKeyVersion = ""; + Backup.prototype.sourceBackup = ""; /** - * Creates a new EncryptionInfo instance using the specified properties. + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.expireTime = null; + + /** + * Backup startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.startTime = null; + + /** + * Backup endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.endTime = null; + + /** + * Backup sizeBytes. + * @member {number|Long} sizeBytes + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Backup state. + * @member {google.bigtable.admin.v2.Backup.State} state + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup encryptionInfo. + * @member {google.bigtable.admin.v2.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.encryptionInfo = null; + + /** + * Creates a new Backup instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static - * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo instance + * @param {google.bigtable.admin.v2.IBackup=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Backup} Backup instance */ - EncryptionInfo.create = function create(properties) { - return new EncryptionInfo(properties); + Backup.create = function create(properties) { + return new Backup(properties); }; /** - * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * Encodes the specified Backup message. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static - * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {google.bigtable.admin.v2.IBackup} message Backup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncryptionInfo.encode = function encode(message, writer) { + Backup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyVersion); - if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encryptionType); - if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) - $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceTable); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sizeBytes); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); return writer; }; /** - * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static - * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {google.bigtable.admin.v2.IBackup} message Backup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { + Backup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EncryptionInfo message from the specified reader or buffer. + * Decodes a Backup message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @returns {google.bigtable.admin.v2.Backup} Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncryptionInfo.decode = function decode(reader, length) { + Backup.decode = 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.bigtable.admin.v2.EncryptionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Backup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sourceTable = reader.string(); + break; + } + case 10: { + message.sourceBackup = reader.string(); + break; + } case 3: { - message.encryptionType = reader.int32(); + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 2: { - message.kmsKeyVersion = reader.string(); + case 5: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.sizeBytes = reader.int64(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 9: { + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32()); break; } default: @@ -23988,190 +28961,265 @@ }; /** - * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * Decodes a Backup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @returns {google.bigtable.admin.v2.Backup} Backup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncryptionInfo.decodeDelimited = function decodeDelimited(reader) { + Backup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EncryptionInfo message. + * Verifies a Backup message. * @function verify - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EncryptionInfo.verify = function verify(message) { + Backup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - switch (message.encryptionType) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) + return "sizeBytes: integer|Long expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "encryptionType: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: break; } - if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { - var error = $root.google.rpc.Status.verify(message.encryptionStatus); + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo); if (error) - return "encryptionStatus." + error; + return "encryptionInfo." + error; } - if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) - if (!$util.isString(message.kmsKeyVersion)) - return "kmsKeyVersion: string expected"; return null; }; /** - * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Backup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @returns {google.bigtable.admin.v2.Backup} Backup */ - EncryptionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Backup) return object; - var message = new $root.google.bigtable.admin.v2.EncryptionInfo(); - switch (object.encryptionType) { + var message = new $root.google.bigtable.admin.v2.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.sourceTable != null) + message.sourceTable = String(object.sourceTable); + if (object.sourceBackup != null) + message.sourceBackup = String(object.sourceBackup); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.sizeBytes != null) + if ($util.Long) + (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; + else if (typeof object.sizeBytes === "string") + message.sizeBytes = parseInt(object.sizeBytes, 10); + else if (typeof object.sizeBytes === "number") + message.sizeBytes = object.sizeBytes; + else if (typeof object.sizeBytes === "object") + message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); + switch (object.state) { default: - if (typeof object.encryptionType === "number") { - message.encryptionType = object.encryptionType; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "ENCRYPTION_TYPE_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.encryptionType = 0; + message.state = 0; break; - case "GOOGLE_DEFAULT_ENCRYPTION": + case "CREATING": case 1: - message.encryptionType = 1; + message.state = 1; break; - case "CUSTOMER_MANAGED_ENCRYPTION": + case "READY": case 2: - message.encryptionType = 2; + message.state = 2; break; } - if (object.encryptionStatus != null) { - if (typeof object.encryptionStatus !== "object") - throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); - message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus); + if (object.encryptionInfo != null) { + if (typeof object.encryptionInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); } - if (object.kmsKeyVersion != null) - message.kmsKeyVersion = String(object.kmsKeyVersion); return message; }; /** - * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * Creates a plain object from a Backup message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static - * @param {google.bigtable.admin.v2.EncryptionInfo} message EncryptionInfo + * @param {google.bigtable.admin.v2.Backup} message Backup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EncryptionInfo.toObject = function toObject(message, options) { + Backup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kmsKeyVersion = ""; - object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; - object.encryptionStatus = null; + object.name = ""; + object.sourceTable = ""; + object.expireTime = null; + object.startTime = null; + object.endTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sizeBytes = options.longs === String ? "0" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.encryptionInfo = null; + object.sourceBackup = ""; } - if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) - object.kmsKeyVersion = message.kmsKeyVersion; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - object.encryptionType = options.enums === String ? $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] : message.encryptionType; - if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) - object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = message.sourceTable; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) + if (typeof message.sizeBytes === "number") + object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; + else + object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Backup.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Backup.State[message.state] : message.state; + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + object.sourceBackup = message.sourceBackup; return object; }; /** - * Converts this EncryptionInfo to JSON. + * Converts this Backup to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @instance * @returns {Object.} JSON object */ - EncryptionInfo.prototype.toJSON = function toJSON() { + Backup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EncryptionInfo + * Gets the default type url for Backup * @function getTypeUrl - * @memberof google.bigtable.admin.v2.EncryptionInfo + * @memberof google.bigtable.admin.v2.Backup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EncryptionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.EncryptionInfo"; + return typeUrlPrefix + "/google.bigtable.admin.v2.Backup"; }; /** - * EncryptionType enum. - * @name google.bigtable.admin.v2.EncryptionInfo.EncryptionType + * State enum. + * @name google.bigtable.admin.v2.Backup.State * @enum {number} - * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value - * @property {number} GOOGLE_DEFAULT_ENCRYPTION=1 GOOGLE_DEFAULT_ENCRYPTION value - * @property {number} CUSTOMER_MANAGED_ENCRYPTION=2 CUSTOMER_MANAGED_ENCRYPTION value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value */ - EncryptionInfo.EncryptionType = (function() { + Backup.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GOOGLE_DEFAULT_ENCRYPTION"] = 1; - values[valuesById[2] = "CUSTOMER_MANAGED_ENCRYPTION"] = 2; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; return values; })(); - return EncryptionInfo; + return Backup; })(); - v2.Snapshot = (function() { + v2.BackupInfo = (function() { /** - * Properties of a Snapshot. + * Properties of a BackupInfo. * @memberof google.bigtable.admin.v2 - * @interface ISnapshot - * @property {string|null} [name] Snapshot name - * @property {google.bigtable.admin.v2.ITable|null} [sourceTable] Snapshot sourceTable - * @property {number|Long|null} [dataSizeBytes] Snapshot dataSizeBytes - * @property {google.protobuf.ITimestamp|null} [createTime] Snapshot createTime - * @property {google.protobuf.ITimestamp|null} [deleteTime] Snapshot deleteTime - * @property {google.bigtable.admin.v2.Snapshot.State|null} [state] Snapshot state - * @property {string|null} [description] Snapshot description + * @interface IBackupInfo + * @property {string|null} [backup] BackupInfo backup + * @property {google.protobuf.ITimestamp|null} [startTime] BackupInfo startTime + * @property {google.protobuf.ITimestamp|null} [endTime] BackupInfo endTime + * @property {string|null} [sourceTable] BackupInfo sourceTable + * @property {string|null} [sourceBackup] BackupInfo sourceBackup */ /** - * Constructs a new Snapshot. + * Constructs a new BackupInfo. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a Snapshot. - * @implements ISnapshot + * @classdesc Represents a BackupInfo. + * @implements IBackupInfo * @constructor - * @param {google.bigtable.admin.v2.ISnapshot=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IBackupInfo=} [properties] Properties to set */ - function Snapshot(properties) { + function BackupInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24179,159 +29227,131 @@ } /** - * Snapshot name. - * @member {string} name - * @memberof google.bigtable.admin.v2.Snapshot - * @instance - */ - Snapshot.prototype.name = ""; - - /** - * Snapshot sourceTable. - * @member {google.bigtable.admin.v2.ITable|null|undefined} sourceTable - * @memberof google.bigtable.admin.v2.Snapshot - * @instance - */ - Snapshot.prototype.sourceTable = null; - - /** - * Snapshot dataSizeBytes. - * @member {number|Long} dataSizeBytes - * @memberof google.bigtable.admin.v2.Snapshot + * BackupInfo backup. + * @member {string} backup + * @memberof google.bigtable.admin.v2.BackupInfo * @instance */ - Snapshot.prototype.dataSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupInfo.prototype.backup = ""; /** - * Snapshot createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.bigtable.admin.v2.Snapshot + * BackupInfo startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.bigtable.admin.v2.BackupInfo * @instance */ - Snapshot.prototype.createTime = null; + BackupInfo.prototype.startTime = null; /** - * Snapshot deleteTime. - * @member {google.protobuf.ITimestamp|null|undefined} deleteTime - * @memberof google.bigtable.admin.v2.Snapshot + * BackupInfo endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.bigtable.admin.v2.BackupInfo * @instance */ - Snapshot.prototype.deleteTime = null; + BackupInfo.prototype.endTime = null; /** - * Snapshot state. - * @member {google.bigtable.admin.v2.Snapshot.State} state - * @memberof google.bigtable.admin.v2.Snapshot + * BackupInfo sourceTable. + * @member {string} sourceTable + * @memberof google.bigtable.admin.v2.BackupInfo * @instance */ - Snapshot.prototype.state = 0; + BackupInfo.prototype.sourceTable = ""; /** - * Snapshot description. - * @member {string} description - * @memberof google.bigtable.admin.v2.Snapshot + * BackupInfo sourceBackup. + * @member {string} sourceBackup + * @memberof google.bigtable.admin.v2.BackupInfo * @instance */ - Snapshot.prototype.description = ""; + BackupInfo.prototype.sourceBackup = ""; /** - * Creates a new Snapshot instance using the specified properties. + * Creates a new BackupInfo instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static - * @param {google.bigtable.admin.v2.ISnapshot=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Snapshot} Snapshot instance + * @param {google.bigtable.admin.v2.IBackupInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo instance */ - Snapshot.create = function create(properties) { - return new Snapshot(properties); + BackupInfo.create = function create(properties) { + return new BackupInfo(properties); }; /** - * Encodes the specified Snapshot message. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * Encodes the specified BackupInfo message. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static - * @param {google.bigtable.admin.v2.ISnapshot} message Snapshot message or plain object to encode + * @param {google.bigtable.admin.v2.IBackupInfo} message BackupInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Snapshot.encode = function encode(message, writer) { + 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.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) - $root.google.bigtable.admin.v2.Table.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dataSizeBytes != null && Object.hasOwnProperty.call(message, "dataSizeBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.dataSizeBytes); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceTable); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); return writer; }; /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Snapshot.verify|verify} messages. + * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static - * @param {google.bigtable.admin.v2.ISnapshot} message Snapshot message or plain object to encode + * @param {google.bigtable.admin.v2.IBackupInfo} message BackupInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + BackupInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Snapshot message from the specified reader or buffer. + * Decodes a BackupInfo message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Snapshot.decode = function decode(reader, length) { + 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.google.bigtable.admin.v2.Snapshot(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.BackupInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.backup = reader.string(); break; } case 2: { - message.sourceTable = $root.google.bigtable.admin.v2.Table.decode(reader, reader.uint32()); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.dataSizeBytes = reader.int64(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.state = reader.int32(); + message.sourceTable = reader.string(); break; } - case 7: { - message.description = reader.string(); + case 10: { + message.sourceBackup = reader.string(); break; } default: @@ -24343,248 +29363,181 @@ }; /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * Decodes a BackupInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Snapshot.decodeDelimited = function decodeDelimited(reader) { + BackupInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Snapshot message. + * Verifies a BackupInfo message. * @function verify - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Snapshot.verify = function verify(message) { + 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.sourceTable != null && message.hasOwnProperty("sourceTable")) { - var error = $root.google.bigtable.admin.v2.Table.verify(message.sourceTable); - if (error) - return "sourceTable." + error; - } - if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) - if (!$util.isInteger(message.dataSizeBytes) && !(message.dataSizeBytes && $util.isInteger(message.dataSizeBytes.low) && $util.isInteger(message.dataSizeBytes.high))) - return "dataSizeBytes: integer|Long expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "createTime." + error; + return "startTime." + error; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); if (error) - return "deleteTime." + error; + return "endTime." + error; } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + if (!$util.isString(message.sourceTable)) + return "sourceTable: string expected"; + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; return null; }; /** - * Creates a Snapshot 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. * @function fromObject - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Snapshot} Snapshot + * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo */ - Snapshot.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Snapshot) + BackupInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.BackupInfo) return object; - var message = new $root.google.bigtable.admin.v2.Snapshot(); - if (object.name != null) - message.name = String(object.name); - if (object.sourceTable != null) { - if (typeof object.sourceTable !== "object") - throw TypeError(".google.bigtable.admin.v2.Snapshot.sourceTable: object expected"); - message.sourceTable = $root.google.bigtable.admin.v2.Table.fromObject(object.sourceTable); - } - if (object.dataSizeBytes != null) - if ($util.Long) - (message.dataSizeBytes = $util.Long.fromValue(object.dataSizeBytes)).unsigned = false; - else if (typeof object.dataSizeBytes === "string") - message.dataSizeBytes = parseInt(object.dataSizeBytes, 10); - else if (typeof object.dataSizeBytes === "number") - message.dataSizeBytes = object.dataSizeBytes; - else if (typeof object.dataSizeBytes === "object") - message.dataSizeBytes = new $util.LongBits(object.dataSizeBytes.low >>> 0, object.dataSizeBytes.high >>> 0).toNumber(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Snapshot.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Snapshot.deleteTime: object expected"); - message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + var message = new $root.google.bigtable.admin.v2.BackupInfo(); + if (object.backup != null) + message.backup = String(object.backup); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.bigtable.admin.v2.BackupInfo.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_NOT_KNOWN": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.bigtable.admin.v2.BackupInfo.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } - if (object.description != null) - message.description = String(object.description); + if (object.sourceTable != null) + message.sourceTable = String(object.sourceTable); + if (object.sourceBackup != null) + message.sourceBackup = String(object.sourceBackup); return message; }; /** - * Creates a plain object from a Snapshot 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 google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static - * @param {google.bigtable.admin.v2.Snapshot} message Snapshot + * @param {google.bigtable.admin.v2.BackupInfo} message BackupInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Snapshot.toObject = function toObject(message, options) { + BackupInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.sourceTable = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataSizeBytes = options.longs === String ? "0" : 0; - object.createTime = null; - object.deleteTime = null; - object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; - object.description = ""; + object.backup = ""; + object.startTime = null; + object.endTime = null; + object.sourceTable = ""; + object.sourceBackup = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = $root.google.bigtable.admin.v2.Table.toObject(message.sourceTable, options); - if (message.dataSizeBytes != null && message.hasOwnProperty("dataSizeBytes")) - if (typeof message.dataSizeBytes === "number") - object.dataSizeBytes = options.longs === String ? String(message.dataSizeBytes) : message.dataSizeBytes; - else - object.dataSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataSizeBytes) : options.longs === Number ? new $util.LongBits(message.dataSizeBytes.low >>> 0, message.dataSizeBytes.high >>> 0).toNumber() : message.dataSizeBytes; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.bigtable.admin.v2.Snapshot.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Snapshot.State[message.state] : message.state; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + object.sourceTable = message.sourceTable; + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) + object.sourceBackup = message.sourceBackup; return object; }; /** - * Converts this Snapshot to JSON. + * Converts this BackupInfo to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @instance * @returns {Object.} JSON object */ - Snapshot.prototype.toJSON = function toJSON() { + BackupInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Snapshot + * Gets the default type url for BackupInfo * @function getTypeUrl - * @memberof google.bigtable.admin.v2.Snapshot + * @memberof google.bigtable.admin.v2.BackupInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.Snapshot"; + return typeUrlPrefix + "/google.bigtable.admin.v2.BackupInfo"; }; - /** - * State enum. - * @name google.bigtable.admin.v2.Snapshot.State - * @enum {number} - * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value - * @property {number} READY=1 READY value - * @property {number} CREATING=2 CREATING value - */ - Snapshot.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "CREATING"] = 2; - return values; - })(); + return BackupInfo; + })(); - return Snapshot; + /** + * RestoreSourceType enum. + * @name google.bigtable.admin.v2.RestoreSourceType + * @enum {number} + * @property {number} RESTORE_SOURCE_TYPE_UNSPECIFIED=0 RESTORE_SOURCE_TYPE_UNSPECIFIED value + * @property {number} BACKUP=1 BACKUP value + */ + v2.RestoreSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTORE_SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP"] = 1; + return values; })(); - v2.Backup = (function() { + v2.Type = (function() { /** - * Properties of a Backup. + * Properties of a Type. * @memberof google.bigtable.admin.v2 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {string|null} [sourceTable] Backup sourceTable - * @property {string|null} [sourceBackup] Backup sourceBackup - * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime - * @property {google.protobuf.ITimestamp|null} [startTime] Backup startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime - * @property {number|Long|null} [sizeBytes] Backup sizeBytes - * @property {google.bigtable.admin.v2.Backup.State|null} [state] Backup state - * @property {google.bigtable.admin.v2.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo + * @interface IType + * @property {google.bigtable.admin.v2.Type.IBytes|null} [bytesType] Type bytesType + * @property {google.bigtable.admin.v2.Type.IInt64|null} [int64Type] Type int64Type + * @property {google.bigtable.admin.v2.Type.IAggregate|null} [aggregateType] Type aggregateType */ /** - * Constructs a new Backup. + * Constructs a new Type. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a Backup. - * @implements IBackup + * @classdesc Represents a Type. + * @implements IType * @constructor - * @param {google.bigtable.admin.v2.IBackup=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IType=} [properties] Properties to set */ - function Backup(properties) { + function Type(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24592,187 +29545,117 @@ } /** - * Backup name. - * @member {string} name - * @memberof google.bigtable.admin.v2.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup sourceTable. - * @member {string} sourceTable - * @memberof google.bigtable.admin.v2.Backup - * @instance - */ - Backup.prototype.sourceTable = ""; - - /** - * Backup sourceBackup. - * @member {string} sourceBackup - * @memberof google.bigtable.admin.v2.Backup - * @instance - */ - Backup.prototype.sourceBackup = ""; - - /** - * Backup expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.bigtable.admin.v2.Backup - * @instance - */ - Backup.prototype.expireTime = null; - - /** - * Backup startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.bigtable.admin.v2.Backup + * Type bytesType. + * @member {google.bigtable.admin.v2.Type.IBytes|null|undefined} bytesType + * @memberof google.bigtable.admin.v2.Type * @instance */ - Backup.prototype.startTime = null; + Type.prototype.bytesType = null; /** - * Backup endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.bigtable.admin.v2.Backup + * Type int64Type. + * @member {google.bigtable.admin.v2.Type.IInt64|null|undefined} int64Type + * @memberof google.bigtable.admin.v2.Type * @instance */ - Backup.prototype.endTime = null; + Type.prototype.int64Type = null; /** - * Backup sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.bigtable.admin.v2.Backup + * Type aggregateType. + * @member {google.bigtable.admin.v2.Type.IAggregate|null|undefined} aggregateType + * @memberof google.bigtable.admin.v2.Type * @instance */ - Backup.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Type.prototype.aggregateType = null; - /** - * Backup state. - * @member {google.bigtable.admin.v2.Backup.State} state - * @memberof google.bigtable.admin.v2.Backup - * @instance - */ - Backup.prototype.state = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Backup encryptionInfo. - * @member {google.bigtable.admin.v2.IEncryptionInfo|null|undefined} encryptionInfo - * @memberof google.bigtable.admin.v2.Backup + * Type kind. + * @member {"bytesType"|"int64Type"|"aggregateType"|undefined} kind + * @memberof google.bigtable.admin.v2.Type * @instance */ - Backup.prototype.encryptionInfo = null; + Object.defineProperty(Type.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["bytesType", "int64Type", "aggregateType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Backup instance using the specified properties. + * Creates a new Type instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static - * @param {google.bigtable.admin.v2.IBackup=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Backup} Backup instance + * @param {google.bigtable.admin.v2.IType=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type} Type instance */ - Backup.create = function create(properties) { - return new Backup(properties); + Type.create = function create(properties) { + return new Type(properties); }; /** - * Encodes the specified Backup message. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * Encodes the specified Type message. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static - * @param {google.bigtable.admin.v2.IBackup} message Backup message or plain object to encode + * @param {google.bigtable.admin.v2.IType} message Type message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encode = function encode(message, writer) { + Type.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.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceTable); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sizeBytes); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) - $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.int64Type != null && Object.hasOwnProperty.call(message, "int64Type")) + $root.google.bigtable.admin.v2.Type.Int64.encode(message.int64Type, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.aggregateType != null && Object.hasOwnProperty.call(message, "aggregateType")) + $root.google.bigtable.admin.v2.Type.Aggregate.encode(message.aggregateType, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Backup.verify|verify} messages. + * Encodes the specified Type message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static - * @param {google.bigtable.admin.v2.IBackup} message Backup message or plain object to encode + * @param {google.bigtable.admin.v2.IType} message Type message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { + Type.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.admin.v2.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decode = 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.bigtable.admin.v2.Backup(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.sourceTable = reader.string(); - break; - } - case 10: { - message.sourceBackup = reader.string(); - break; - } - case 3: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + + /** + * Decodes a Type message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type} Type + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Type.decode = 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.bigtable.admin.v2.Type(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32()); break; } case 5: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.decode(reader, reader.uint32()); break; } case 6: { - message.sizeBytes = reader.int64(); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 9: { - message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32()); + message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.decode(reader, reader.uint32()); break; } default: @@ -24784,561 +29667,1865 @@ }; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a Type message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.Backup} Backup + * @returns {google.bigtable.admin.v2.Type} Type * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decodeDelimited = function decodeDelimited(reader) { + Type.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Backup message. + * Verifies a Type message. * @function verify - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backup.verify = function verify(message) { + Type.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.sourceTable != null && message.hasOwnProperty("sourceTable")) - if (!$util.isString(message.sourceTable)) - return "sourceTable: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - if (!$util.isString(message.sourceBackup)) - return "sourceBackup: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; + var properties = {}; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType); + if (error) + return "bytesType." + error; + } } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.verify(message.int64Type); + if (error) + return "int64Type." + error; + } } - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) - return "sizeBytes: integer|Long expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.verify(message.aggregateType); + if (error) + return "aggregateType." + error; } - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { - var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo); - if (error) - return "encryptionInfo." + error; } return null; }; /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a Type message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Backup} Backup + * @returns {google.bigtable.admin.v2.Type} Type */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Backup) + Type.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type) return object; - var message = new $root.google.bigtable.admin.v2.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.sourceTable != null) - message.sourceTable = String(object.sourceTable); - if (object.sourceBackup != null) - message.sourceBackup = String(object.sourceBackup); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.sizeBytes != null) - if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; - else if (typeof object.sizeBytes === "string") - message.sizeBytes = parseInt(object.sizeBytes, 10); - else if (typeof object.sizeBytes === "number") - message.sizeBytes = object.sizeBytes; - else if (typeof object.sizeBytes === "object") - message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - } - if (object.encryptionInfo != null) { - if (typeof object.encryptionInfo !== "object") - throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); - message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); + var message = new $root.google.bigtable.admin.v2.Type(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.bytesType: object expected"); + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType); + } + if (object.int64Type != null) { + if (typeof object.int64Type !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.int64Type: object expected"); + message.int64Type = $root.google.bigtable.admin.v2.Type.Int64.fromObject(object.int64Type); + } + if (object.aggregateType != null) { + if (typeof object.aggregateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.aggregateType: object expected"); + message.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.fromObject(object.aggregateType); } return message; }; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. + * Creates a plain object from a Type message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static - * @param {google.bigtable.admin.v2.Backup} message Backup + * @param {google.bigtable.admin.v2.Type} message Type * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Backup.toObject = function toObject(message, options) { + Type.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.sourceTable = ""; - object.expireTime = null; - object.startTime = null; - object.endTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sizeBytes = options.longs === String ? "0" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.encryptionInfo = null; - object.sourceBackup = ""; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); + if (options.oneofs) + object.kind = "bytesType"; + } + if (message.int64Type != null && message.hasOwnProperty("int64Type")) { + object.int64Type = $root.google.bigtable.admin.v2.Type.Int64.toObject(message.int64Type, options); + if (options.oneofs) + object.kind = "int64Type"; + } + if (message.aggregateType != null && message.hasOwnProperty("aggregateType")) { + object.aggregateType = $root.google.bigtable.admin.v2.Type.Aggregate.toObject(message.aggregateType, options); + if (options.oneofs) + object.kind = "aggregateType"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = message.sourceTable; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") - object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; - else - object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.bigtable.admin.v2.Backup.State[message.state] === undefined ? message.state : $root.google.bigtable.admin.v2.Backup.State[message.state] : message.state; - if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) - object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - object.sourceBackup = message.sourceBackup; return object; }; /** - * Converts this Backup to JSON. + * Converts this Type to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @instance * @returns {Object.} JSON object */ - Backup.prototype.toJSON = function toJSON() { + Type.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Backup + * Gets the default type url for Type * @function getTypeUrl - * @memberof google.bigtable.admin.v2.Backup + * @memberof google.bigtable.admin.v2.Type * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Type.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.bigtable.admin.v2.Backup"; + return typeUrlPrefix + "/google.bigtable.admin.v2.Type"; }; - /** - * State enum. - * @name google.bigtable.admin.v2.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - return values; + Type.Bytes = (function() { + + /** + * Properties of a Bytes. + * @memberof google.bigtable.admin.v2.Type + * @interface IBytes + * @property {google.bigtable.admin.v2.Type.Bytes.IEncoding|null} [encoding] Bytes encoding + */ + + /** + * Constructs a new Bytes. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents a Bytes. + * @implements IBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.IBytes=} [properties] Properties to set + */ + function Bytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Bytes encoding. + * @member {google.bigtable.admin.v2.Type.Bytes.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Bytes + * @instance + */ + Bytes.prototype.encoding = null; + + /** + * Creates a new Bytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.IBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes instance + */ + Bytes.create = function create(properties) { + return new Bytes(properties); + }; + + /** + * Encodes the specified Bytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.IBytes} message Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bytes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.Bytes.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Bytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.IBytes} message Bytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Bytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bytes.decode = 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.bigtable.admin.v2.Type.Bytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Bytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bytes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.verify(message.encoding); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates a Bytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bytes} Bytes + */ + Bytes.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Bytes(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.fromObject(object.encoding); + } + return message; + }; + + /** + * Creates a plain object from a Bytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {google.bigtable.admin.v2.Type.Bytes} message Bytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bytes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.toObject(message.encoding, options); + return object; + }; + + /** + * Converts this Bytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bytes + * @instance + * @returns {Object.} JSON object + */ + Bytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Bytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bytes"; + }; + + Bytes.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.Bytes + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null} [raw] Encoding raw + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.Bytes + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding raw. + * @member {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw|null|undefined} raw + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @instance + */ + Encoding.prototype.raw = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"raw"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["raw"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.raw != null && Object.hasOwnProperty.call(message, "raw")) + $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.encode(message.raw, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = 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.bigtable.admin.v2.Type.Bytes.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify(message.raw); + if (error) + return "raw." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Bytes.Encoding(); + if (object.raw != null) { + if (typeof object.raw !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Bytes.Encoding.raw: object expected"); + message.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.fromObject(object.raw); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.raw != null && message.hasOwnProperty("raw")) { + object.raw = $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.toObject(message.raw, options); + if (options.oneofs) + object.encoding = "raw"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bytes.Encoding"; + }; + + Encoding.Raw = (function() { + + /** + * Properties of a Raw. + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @interface IRaw + */ + + /** + * Constructs a new Raw. + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding + * @classdesc Represents a Raw. + * @implements IRaw + * @constructor + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw=} [properties] Properties to set + */ + function Raw(properties) { + if (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 Raw instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw instance + */ + Raw.create = function create(properties) { + return new Raw(properties); + }; + + /** + * Encodes the specified Raw message. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw} message Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Raw.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Raw message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.IRaw} message Raw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Raw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Raw message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Raw.decode = 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Raw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Raw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Raw message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Raw.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Raw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} Raw + */ + Raw.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) + return object; + return new $root.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw(); + }; + + /** + * Creates a plain object from a Raw message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} message Raw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Raw.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Raw to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @instance + * @returns {Object.} JSON object + */ + Raw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Raw + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Raw.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"; + }; + + return Raw; + })(); + + return Encoding; + })(); + + return Bytes; })(); - return Backup; - })(); + Type.Int64 = (function() { + + /** + * Properties of an Int64. + * @memberof google.bigtable.admin.v2.Type + * @interface IInt64 + * @property {google.bigtable.admin.v2.Type.Int64.IEncoding|null} [encoding] Int64 encoding + */ + + /** + * Constructs a new Int64. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents an Int64. + * @implements IInt64 + * @constructor + * @param {google.bigtable.admin.v2.Type.IInt64=} [properties] Properties to set + */ + function Int64(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64 encoding. + * @member {google.bigtable.admin.v2.Type.Int64.IEncoding|null|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Int64 + * @instance + */ + Int64.prototype.encoding = null; + + /** + * Creates a new Int64 instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.IInt64=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 instance + */ + Int64.create = function create(properties) { + return new Int64(properties); + }; + + /** + * Encodes the specified Int64 message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.IInt64} message Int64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + $root.google.bigtable.admin.v2.Type.Int64.Encoding.encode(message.encoding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Int64 message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.IInt64} message Int64 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64 message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64.decode = 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.bigtable.admin.v2.Type.Int64(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64 message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.verify(message.encoding); + if (error) + return "encoding." + error; + } + return null; + }; + + /** + * Creates an Int64 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64} Int64 + */ + Int64.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Int64(); + if (object.encoding != null) { + if (typeof object.encoding !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Int64.encoding: object expected"); + message.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.fromObject(object.encoding); + } + return message; + }; + + /** + * Creates a plain object from an Int64 message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {google.bigtable.admin.v2.Type.Int64} message Int64 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.encoding = null; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = $root.google.bigtable.admin.v2.Type.Int64.Encoding.toObject(message.encoding, options); + return object; + }; + + /** + * Converts this Int64 to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64 + * @instance + * @returns {Object.} JSON object + */ + Int64.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64 + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64"; + }; + + Int64.Encoding = (function() { + + /** + * Properties of an Encoding. + * @memberof google.bigtable.admin.v2.Type.Int64 + * @interface IEncoding + * @property {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null} [bigEndianBytes] Encoding bigEndianBytes + */ + + /** + * Constructs a new Encoding. + * @memberof google.bigtable.admin.v2.Type.Int64 + * @classdesc Represents an Encoding. + * @implements IEncoding + * @constructor + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding=} [properties] Properties to set + */ + function Encoding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Encoding bigEndianBytes. + * @member {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes|null|undefined} bigEndianBytes + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + */ + Encoding.prototype.bigEndianBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Encoding encoding. + * @member {"bigEndianBytes"|undefined} encoding + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + */ + Object.defineProperty(Encoding.prototype, "encoding", { + get: $util.oneOfGetter($oneOfFields = ["bigEndianBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Encoding instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding instance + */ + Encoding.create = function create(properties) { + return new Encoding(properties); + }; + + /** + * Encodes the specified Encoding message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigEndianBytes != null && Object.hasOwnProperty.call(message, "bigEndianBytes")) + $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.encode(message.bigEndianBytes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Encoding message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.IEncoding} message Encoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Encoding message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decode = 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.bigtable.admin.v2.Type.Int64.Encoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Encoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encoding message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encoding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + properties.encoding = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify(message.bigEndianBytes); + if (error) + return "bigEndianBytes." + error; + } + } + return null; + }; + + /** + * Creates an Encoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding} Encoding + */ + Encoding.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding(); + if (object.bigEndianBytes != null) { + if (typeof object.bigEndianBytes !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.bigEndianBytes: object expected"); + message.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.fromObject(object.bigEndianBytes); + } + return message; + }; + + /** + * Creates a plain object from an Encoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding} message Encoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encoding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bigEndianBytes != null && message.hasOwnProperty("bigEndianBytes")) { + object.bigEndianBytes = $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.toObject(message.bigEndianBytes, options); + if (options.oneofs) + object.encoding = "bigEndianBytes"; + } + return object; + }; + + /** + * Converts this Encoding to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @instance + * @returns {Object.} JSON object + */ + Encoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encoding + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64.Encoding"; + }; + + Encoding.BigEndianBytes = (function() { + + /** + * Properties of a BigEndianBytes. + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @interface IBigEndianBytes + * @property {google.bigtable.admin.v2.Type.IBytes|null} [bytesType] BigEndianBytes bytesType + */ + + /** + * Constructs a new BigEndianBytes. + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding + * @classdesc Represents a BigEndianBytes. + * @implements IBigEndianBytes + * @constructor + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes=} [properties] Properties to set + */ + function BigEndianBytes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigEndianBytes bytesType. + * @member {google.bigtable.admin.v2.Type.IBytes|null|undefined} bytesType + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @instance + */ + BigEndianBytes.prototype.bytesType = null; + + /** + * Creates a new BigEndianBytes instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes instance + */ + BigEndianBytes.create = function create(properties) { + return new BigEndianBytes(properties); + }; + + /** + * Encodes the specified BigEndianBytes message. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes} message BigEndianBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigEndianBytes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bytesType != null && Object.hasOwnProperty.call(message, "bytesType")) + $root.google.bigtable.admin.v2.Type.Bytes.encode(message.bytesType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigEndianBytes message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.IBigEndianBytes} message BigEndianBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigEndianBytes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigEndianBytes.decode = 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigEndianBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigEndianBytes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigEndianBytes message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigEndianBytes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) { + var error = $root.google.bigtable.admin.v2.Type.Bytes.verify(message.bytesType); + if (error) + return "bytesType." + error; + } + return null; + }; + + /** + * Creates a BigEndianBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} BigEndianBytes + */ + BigEndianBytes.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes(); + if (object.bytesType != null) { + if (typeof object.bytesType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytesType: object expected"); + message.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.fromObject(object.bytesType); + } + return message; + }; + + /** + * Creates a plain object from a BigEndianBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} message BigEndianBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigEndianBytes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bytesType = null; + if (message.bytesType != null && message.hasOwnProperty("bytesType")) + object.bytesType = $root.google.bigtable.admin.v2.Type.Bytes.toObject(message.bytesType, options); + return object; + }; + + /** + * Converts this BigEndianBytes to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @instance + * @returns {Object.} JSON object + */ + BigEndianBytes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigEndianBytes + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigEndianBytes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"; + }; + + return BigEndianBytes; + })(); - v2.BackupInfo = (function() { + return Encoding; + })(); - /** - * Properties of a BackupInfo. - * @memberof google.bigtable.admin.v2 - * @interface IBackupInfo - * @property {string|null} [backup] BackupInfo backup - * @property {google.protobuf.ITimestamp|null} [startTime] BackupInfo startTime - * @property {google.protobuf.ITimestamp|null} [endTime] BackupInfo endTime - * @property {string|null} [sourceTable] BackupInfo sourceTable - * @property {string|null} [sourceBackup] BackupInfo sourceBackup - */ + return Int64; + })(); - /** - * Constructs a new BackupInfo. - * @memberof google.bigtable.admin.v2 - * @classdesc Represents a BackupInfo. - * @implements IBackupInfo - * @constructor - * @param {google.bigtable.admin.v2.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]]; - } + Type.Aggregate = (function() { - /** - * BackupInfo backup. - * @member {string} backup - * @memberof google.bigtable.admin.v2.BackupInfo - * @instance - */ - BackupInfo.prototype.backup = ""; + /** + * Properties of an Aggregate. + * @memberof google.bigtable.admin.v2.Type + * @interface IAggregate + * @property {google.bigtable.admin.v2.IType|null} [inputType] Aggregate inputType + * @property {google.bigtable.admin.v2.IType|null} [stateType] Aggregate stateType + * @property {google.bigtable.admin.v2.Type.Aggregate.ISum|null} [sum] Aggregate sum + */ - /** - * BackupInfo startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.bigtable.admin.v2.BackupInfo - * @instance - */ - BackupInfo.prototype.startTime = null; + /** + * Constructs a new Aggregate. + * @memberof google.bigtable.admin.v2.Type + * @classdesc Represents an Aggregate. + * @implements IAggregate + * @constructor + * @param {google.bigtable.admin.v2.Type.IAggregate=} [properties] Properties to set + */ + function Aggregate(properties) { + if (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 endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.bigtable.admin.v2.BackupInfo - * @instance - */ - BackupInfo.prototype.endTime = null; + /** + * Aggregate inputType. + * @member {google.bigtable.admin.v2.IType|null|undefined} inputType + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.inputType = null; - /** - * BackupInfo sourceTable. - * @member {string} sourceTable - * @memberof google.bigtable.admin.v2.BackupInfo - * @instance - */ - BackupInfo.prototype.sourceTable = ""; + /** + * Aggregate stateType. + * @member {google.bigtable.admin.v2.IType|null|undefined} stateType + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.stateType = null; - /** - * BackupInfo sourceBackup. - * @member {string} sourceBackup - * @memberof google.bigtable.admin.v2.BackupInfo - * @instance - */ - BackupInfo.prototype.sourceBackup = ""; + /** + * Aggregate sum. + * @member {google.bigtable.admin.v2.Type.Aggregate.ISum|null|undefined} sum + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Aggregate.prototype.sum = null; - /** - * Creates a new BackupInfo instance using the specified properties. - * @function create - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {google.bigtable.admin.v2.IBackupInfo=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo instance - */ - BackupInfo.create = function create(properties) { - return new BackupInfo(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified BackupInfo message. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. - * @function encode - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {google.bigtable.admin.v2.IBackupInfo} message BackupInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceTable); - if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.sourceBackup); - return writer; - }; + /** + * Aggregate aggregator. + * @member {"sum"|undefined} aggregator + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + */ + Object.defineProperty(Aggregate.prototype, "aggregator", { + get: $util.oneOfGetter($oneOfFields = ["sum"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified BackupInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.BackupInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {google.bigtable.admin.v2.IBackupInfo} message BackupInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Aggregate instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.IAggregate=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate instance + */ + Aggregate.create = function create(properties) { + return new Aggregate(properties); + }; - /** - * Decodes a BackupInfo message from the specified reader or buffer. - * @function decode - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.google.bigtable.admin.v2.BackupInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backup = reader.string(); - break; - } - case 2: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sourceTable = reader.string(); - break; - } - case 10: { - message.sourceBackup = reader.string(); + /** + * Encodes the specified Aggregate message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + $root.google.bigtable.admin.v2.Type.encode(message.inputType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.stateType != null && Object.hasOwnProperty.call(message, "stateType")) + $root.google.bigtable.admin.v2.Type.encode(message.stateType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.google.bigtable.admin.v2.Type.Aggregate.Sum.encode(message.sum, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Aggregate message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.IAggregate} message Aggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aggregate message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregate.decode = 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.bigtable.admin.v2.Type.Aggregate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.inputType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 2: { + message.stateType = $root.google.bigtable.admin.v2.Type.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a BackupInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Aggregate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregate.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 google.bigtable.admin.v2.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.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - if (!$util.isString(message.sourceTable)) - return "sourceTable: string expected"; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - if (!$util.isString(message.sourceBackup)) - return "sourceBackup: string expected"; - return null; - }; + /** + * Verifies an Aggregate message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inputType != null && message.hasOwnProperty("inputType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.inputType); + if (error) + return "inputType." + error; + } + if (message.stateType != null && message.hasOwnProperty("stateType")) { + var error = $root.google.bigtable.admin.v2.Type.verify(message.stateType); + if (error) + return "stateType." + error; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + properties.aggregator = 1; + { + var error = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + return null; + }; - /** - * Creates a BackupInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.BackupInfo} BackupInfo - */ - BackupInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.BackupInfo) + /** + * Creates an Aggregate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate} Aggregate + */ + Aggregate.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate) + return object; + var message = new $root.google.bigtable.admin.v2.Type.Aggregate(); + if (object.inputType != null) { + if (typeof object.inputType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.inputType: object expected"); + message.inputType = $root.google.bigtable.admin.v2.Type.fromObject(object.inputType); + } + if (object.stateType != null) { + if (typeof object.stateType !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.stateType: object expected"); + message.stateType = $root.google.bigtable.admin.v2.Type.fromObject(object.stateType); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".google.bigtable.admin.v2.Type.Aggregate.sum: object expected"); + message.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.fromObject(object.sum); + } + return message; + }; + + /** + * Creates a plain object from an Aggregate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate} message Aggregate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputType = null; + object.stateType = null; + } + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = $root.google.bigtable.admin.v2.Type.toObject(message.inputType, options); + if (message.stateType != null && message.hasOwnProperty("stateType")) + object.stateType = $root.google.bigtable.admin.v2.Type.toObject(message.stateType, options); + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.google.bigtable.admin.v2.Type.Aggregate.Sum.toObject(message.sum, options); + if (options.oneofs) + object.aggregator = "sum"; + } return object; - var message = new $root.google.bigtable.admin.v2.BackupInfo(); - if (object.backup != null) - message.backup = String(object.backup); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.bigtable.admin.v2.BackupInfo.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.bigtable.admin.v2.BackupInfo.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.sourceTable != null) - message.sourceTable = String(object.sourceTable); - if (object.sourceBackup != null) - message.sourceBackup = String(object.sourceBackup); - return message; - }; + }; - /** - * Creates a plain object from a BackupInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {google.bigtable.admin.v2.BackupInfo} message BackupInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backup = ""; - object.startTime = null; - object.endTime = null; - object.sourceTable = ""; - object.sourceBackup = ""; - } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) - object.sourceTable = message.sourceTable; - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) - object.sourceBackup = message.sourceBackup; - return object; - }; + /** + * Converts this Aggregate to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @instance + * @returns {Object.} JSON object + */ + Aggregate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this BackupInfo to JSON. - * @function toJSON - * @memberof google.bigtable.admin.v2.BackupInfo - * @instance - * @returns {Object.} JSON object - */ - BackupInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Aggregate + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate"; + }; - /** - * Gets the default type url for BackupInfo - * @function getTypeUrl - * @memberof google.bigtable.admin.v2.BackupInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.bigtable.admin.v2.BackupInfo"; - }; + Aggregate.Sum = (function() { + + /** + * Properties of a Sum. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @interface ISum + */ + + /** + * Constructs a new Sum. + * @memberof google.bigtable.admin.v2.Type.Aggregate + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum=} [properties] Properties to set + */ + function Sum(properties) { + if (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 BackupInfo; - })(); + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; + + /** + * Encodes the specified Sum message. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Type.Aggregate.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = 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.bigtable.admin.v2.Type.Aggregate.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sum message. + * @function verify + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Type.Aggregate.Sum} Sum + */ + Sum.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Type.Aggregate.Sum) + return object; + return new $root.google.bigtable.admin.v2.Type.Aggregate.Sum(); + }; + + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {google.bigtable.admin.v2.Type.Aggregate.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof google.bigtable.admin.v2.Type.Aggregate.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.admin.v2.Type.Aggregate.Sum"; + }; - /** - * RestoreSourceType enum. - * @name google.bigtable.admin.v2.RestoreSourceType - * @enum {number} - * @property {number} RESTORE_SOURCE_TYPE_UNSPECIFIED=0 RESTORE_SOURCE_TYPE_UNSPECIFIED value - * @property {number} BACKUP=1 BACKUP value - */ - v2.RestoreSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTORE_SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP"] = 1; - return values; + return Sum; + })(); + + return Aggregate; + })(); + + return Type; })(); return v2; @@ -25695,6 +31882,7 @@ * @memberof google.bigtable.v2 * @interface IReadRowsRequest * @property {string|null} [tableName] ReadRowsRequest tableName + * @property {string|null} [authorizedViewName] ReadRowsRequest authorizedViewName * @property {string|null} [appProfileId] ReadRowsRequest appProfileId * @property {google.bigtable.v2.IRowSet|null} [rows] ReadRowsRequest rows * @property {google.bigtable.v2.IRowFilter|null} [filter] ReadRowsRequest filter @@ -25726,6 +31914,14 @@ */ ReadRowsRequest.prototype.tableName = ""; + /** + * ReadRowsRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.ReadRowsRequest + * @instance + */ + ReadRowsRequest.prototype.authorizedViewName = ""; + /** * ReadRowsRequest appProfileId. * @member {string} appProfileId @@ -25812,6 +32008,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.requestStatsView); if (message.reversed != null && Object.hasOwnProperty.call(message, "reversed")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.reversed); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.authorizedViewName); return writer; }; @@ -25850,6 +32048,10 @@ message.tableName = reader.string(); break; } + case 9: { + message.authorizedViewName = reader.string(); + break; + } case 5: { message.appProfileId = reader.string(); break; @@ -25912,6 +32114,9 @@ if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; @@ -25957,6 +32162,8 @@ var message = new $root.google.bigtable.v2.ReadRowsRequest(); if (object.tableName != null) message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.rows != null) { @@ -26028,6 +32235,7 @@ object.appProfileId = ""; object.requestStatsView = options.enums === String ? "REQUEST_STATS_VIEW_UNSPECIFIED" : 0; object.reversed = false; + object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; @@ -26046,6 +32254,8 @@ object.requestStatsView = options.enums === String ? $root.google.bigtable.v2.ReadRowsRequest.RequestStatsView[message.requestStatsView] === undefined ? message.requestStatsView : $root.google.bigtable.v2.ReadRowsRequest.RequestStatsView[message.requestStatsView] : message.requestStatsView; if (message.reversed != null && message.hasOwnProperty("reversed")) object.reversed = message.reversed; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; @@ -26859,6 +33069,7 @@ * @memberof google.bigtable.v2 * @interface ISampleRowKeysRequest * @property {string|null} [tableName] SampleRowKeysRequest tableName + * @property {string|null} [authorizedViewName] SampleRowKeysRequest authorizedViewName * @property {string|null} [appProfileId] SampleRowKeysRequest appProfileId */ @@ -26885,6 +33096,14 @@ */ SampleRowKeysRequest.prototype.tableName = ""; + /** + * SampleRowKeysRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.SampleRowKeysRequest + * @instance + */ + SampleRowKeysRequest.prototype.authorizedViewName = ""; + /** * SampleRowKeysRequest appProfileId. * @member {string} appProfileId @@ -26921,6 +33140,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.tableName); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.authorizedViewName); return writer; }; @@ -26959,6 +33180,10 @@ message.tableName = reader.string(); break; } + case 4: { + message.authorizedViewName = reader.string(); + break; + } case 2: { message.appProfileId = reader.string(); break; @@ -27001,6 +33226,9 @@ if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; @@ -27021,6 +33249,8 @@ var message = new $root.google.bigtable.v2.SampleRowKeysRequest(); if (object.tableName != null) message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); return message; @@ -27042,11 +33272,14 @@ if (options.defaults) { object.tableName = ""; object.appProfileId = ""; + object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; @@ -27336,6 +33569,7 @@ * @memberof google.bigtable.v2 * @interface IMutateRowRequest * @property {string|null} [tableName] MutateRowRequest tableName + * @property {string|null} [authorizedViewName] MutateRowRequest authorizedViewName * @property {string|null} [appProfileId] MutateRowRequest appProfileId * @property {Uint8Array|null} [rowKey] MutateRowRequest rowKey * @property {Array.|null} [mutations] MutateRowRequest mutations @@ -27365,6 +33599,14 @@ */ MutateRowRequest.prototype.tableName = ""; + /** + * MutateRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.MutateRowRequest + * @instance + */ + MutateRowRequest.prototype.authorizedViewName = ""; + /** * MutateRowRequest appProfileId. * @member {string} appProfileId @@ -27422,6 +33664,8 @@ $root.google.bigtable.v2.Mutation.encode(message.mutations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorizedViewName); return writer; }; @@ -27460,6 +33704,10 @@ message.tableName = reader.string(); break; } + case 6: { + message.authorizedViewName = reader.string(); + break; + } case 4: { message.appProfileId = reader.string(); break; @@ -27512,6 +33760,9 @@ if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; @@ -27544,6 +33795,8 @@ var message = new $root.google.bigtable.v2.MutateRowRequest(); if (object.tableName != null) message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.rowKey != null) @@ -27589,6 +33842,7 @@ object.rowKey = $util.newBuffer(object.rowKey); } object.appProfileId = ""; + object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; @@ -27601,6 +33855,8 @@ } if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; @@ -27815,6 +34071,7 @@ * @memberof google.bigtable.v2 * @interface IMutateRowsRequest * @property {string|null} [tableName] MutateRowsRequest tableName + * @property {string|null} [authorizedViewName] MutateRowsRequest authorizedViewName * @property {string|null} [appProfileId] MutateRowsRequest appProfileId * @property {Array.|null} [entries] MutateRowsRequest entries */ @@ -27843,6 +34100,14 @@ */ MutateRowsRequest.prototype.tableName = ""; + /** + * MutateRowsRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.MutateRowsRequest + * @instance + */ + MutateRowsRequest.prototype.authorizedViewName = ""; + /** * MutateRowsRequest appProfileId. * @member {string} appProfileId @@ -27890,6 +34155,8 @@ $root.google.bigtable.v2.MutateRowsRequest.Entry.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.authorizedViewName); return writer; }; @@ -27928,6 +34195,10 @@ message.tableName = reader.string(); break; } + case 5: { + message.authorizedViewName = reader.string(); + break; + } case 3: { message.appProfileId = reader.string(); break; @@ -27976,6 +34247,9 @@ if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; @@ -28005,6 +34279,8 @@ var message = new $root.google.bigtable.v2.MutateRowsRequest(); if (object.tableName != null) message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.entries) { @@ -28038,6 +34314,7 @@ if (options.defaults) { object.tableName = ""; object.appProfileId = ""; + object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; @@ -28048,6 +34325,8 @@ } if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; @@ -29094,6 +35373,7 @@ * @memberof google.bigtable.v2 * @interface ICheckAndMutateRowRequest * @property {string|null} [tableName] CheckAndMutateRowRequest tableName + * @property {string|null} [authorizedViewName] CheckAndMutateRowRequest authorizedViewName * @property {string|null} [appProfileId] CheckAndMutateRowRequest appProfileId * @property {Uint8Array|null} [rowKey] CheckAndMutateRowRequest rowKey * @property {google.bigtable.v2.IRowFilter|null} [predicateFilter] CheckAndMutateRowRequest predicateFilter @@ -29126,6 +35406,14 @@ */ CheckAndMutateRowRequest.prototype.tableName = ""; + /** + * CheckAndMutateRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.CheckAndMutateRowRequest + * @instance + */ + CheckAndMutateRowRequest.prototype.authorizedViewName = ""; + /** * CheckAndMutateRowRequest appProfileId. * @member {string} appProfileId @@ -29204,6 +35492,8 @@ $root.google.bigtable.v2.RowFilter.encode(message.predicateFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.authorizedViewName); return writer; }; @@ -29242,6 +35532,10 @@ message.tableName = reader.string(); break; } + case 9: { + message.authorizedViewName = reader.string(); + break; + } case 7: { message.appProfileId = reader.string(); break; @@ -29304,6 +35598,9 @@ if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; @@ -29350,6 +35647,8 @@ var message = new $root.google.bigtable.v2.CheckAndMutateRowRequest(); if (object.tableName != null) message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.rowKey != null) @@ -29413,6 +35712,7 @@ } object.predicateFilter = null; object.appProfileId = ""; + object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; @@ -29432,6 +35732,8 @@ object.predicateFilter = $root.google.bigtable.v2.RowFilter.toObject(message.predicateFilter, options); if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; @@ -30076,6 +36378,7 @@ * @memberof google.bigtable.v2 * @interface IReadModifyWriteRowRequest * @property {string|null} [tableName] ReadModifyWriteRowRequest tableName + * @property {string|null} [authorizedViewName] ReadModifyWriteRowRequest authorizedViewName * @property {string|null} [appProfileId] ReadModifyWriteRowRequest appProfileId * @property {Uint8Array|null} [rowKey] ReadModifyWriteRowRequest rowKey * @property {Array.|null} [rules] ReadModifyWriteRowRequest rules @@ -30105,6 +36408,14 @@ */ ReadModifyWriteRowRequest.prototype.tableName = ""; + /** + * ReadModifyWriteRowRequest authorizedViewName. + * @member {string} authorizedViewName + * @memberof google.bigtable.v2.ReadModifyWriteRowRequest + * @instance + */ + ReadModifyWriteRowRequest.prototype.authorizedViewName = ""; + /** * ReadModifyWriteRowRequest appProfileId. * @member {string} appProfileId @@ -30162,6 +36473,8 @@ $root.google.bigtable.v2.ReadModifyWriteRule.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.appProfileId); + if (message.authorizedViewName != null && Object.hasOwnProperty.call(message, "authorizedViewName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorizedViewName); return writer; }; @@ -30200,6 +36513,10 @@ message.tableName = reader.string(); break; } + case 6: { + message.authorizedViewName = reader.string(); + break; + } case 4: { message.appProfileId = reader.string(); break; @@ -30252,6 +36569,9 @@ if (message.tableName != null && message.hasOwnProperty("tableName")) if (!$util.isString(message.tableName)) return "tableName: string expected"; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + if (!$util.isString(message.authorizedViewName)) + return "authorizedViewName: string expected"; if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) if (!$util.isString(message.appProfileId)) return "appProfileId: string expected"; @@ -30284,6 +36604,8 @@ var message = new $root.google.bigtable.v2.ReadModifyWriteRowRequest(); if (object.tableName != null) message.tableName = String(object.tableName); + if (object.authorizedViewName != null) + message.authorizedViewName = String(object.authorizedViewName); if (object.appProfileId != null) message.appProfileId = String(object.appProfileId); if (object.rowKey != null) @@ -30329,6 +36651,7 @@ object.rowKey = $util.newBuffer(object.rowKey); } object.appProfileId = ""; + object.authorizedViewName = ""; } if (message.tableName != null && message.hasOwnProperty("tableName")) object.tableName = message.tableName; @@ -30341,6 +36664,8 @@ } if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) object.appProfileId = message.appProfileId; + if (message.authorizedViewName != null && message.hasOwnProperty("authorizedViewName")) + object.authorizedViewName = message.authorizedViewName; return object; }; @@ -34257,6 +40582,308 @@ return Cell; })(); + v2.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.bigtable.v2 + * @interface IValue + * @property {Uint8Array|null} [rawValue] Value rawValue + * @property {number|Long|null} [rawTimestampMicros] Value rawTimestampMicros + * @property {number|Long|null} [intValue] Value intValue + */ + + /** + * Constructs a new Value. + * @memberof google.bigtable.v2 + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.bigtable.v2.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 rawValue. + * @member {Uint8Array|null|undefined} rawValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.rawValue = null; + + /** + * Value rawTimestampMicros. + * @member {number|Long|null|undefined} rawTimestampMicros + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.rawTimestampMicros = null; + + /** + * Value intValue. + * @member {number|Long|null|undefined} intValue + * @memberof google.bigtable.v2.Value + * @instance + */ + Value.prototype.intValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"rawValue"|"rawTimestampMicros"|"intValue"|undefined} kind + * @memberof google.bigtable.v2.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["rawValue", "rawTimestampMicros", "intValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.IValue=} [properties] Properties to set + * @returns {google.bigtable.v2.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.bigtable.v2.Value.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.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.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.intValue); + if (message.rawValue != null && Object.hasOwnProperty.call(message, "rawValue")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.rawValue); + if (message.rawTimestampMicros != null && Object.hasOwnProperty.call(message, "rawTimestampMicros")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.rawTimestampMicros); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.bigtable.v2.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.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 google.bigtable.v2.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.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.google.bigtable.v2.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: { + message.rawValue = reader.bytes(); + break; + } + case 9: { + message.rawTimestampMicros = reader.int64(); + break; + } + case 6: { + message.intValue = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.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 google.bigtable.v2.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"; + var properties = {}; + if (message.rawValue != null && message.hasOwnProperty("rawValue")) { + properties.kind = 1; + if (!(message.rawValue && typeof message.rawValue.length === "number" || $util.isString(message.rawValue))) + return "rawValue: buffer expected"; + } + if (message.rawTimestampMicros != null && message.hasOwnProperty("rawTimestampMicros")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isInteger(message.rawTimestampMicros) && !(message.rawTimestampMicros && $util.isInteger(message.rawTimestampMicros.low) && $util.isInteger(message.rawTimestampMicros.high))) + return "rawTimestampMicros: integer|Long expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Value + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Value) + return object; + var message = new $root.google.bigtable.v2.Value(); + if (object.rawValue != null) + if (typeof object.rawValue === "string") + $util.base64.decode(object.rawValue, message.rawValue = $util.newBuffer($util.base64.length(object.rawValue)), 0); + else if (object.rawValue.length >= 0) + message.rawValue = object.rawValue; + if (object.rawTimestampMicros != null) + if ($util.Long) + (message.rawTimestampMicros = $util.Long.fromValue(object.rawTimestampMicros)).unsigned = false; + else if (typeof object.rawTimestampMicros === "string") + message.rawTimestampMicros = parseInt(object.rawTimestampMicros, 10); + else if (typeof object.rawTimestampMicros === "number") + message.rawTimestampMicros = object.rawTimestampMicros; + else if (typeof object.rawTimestampMicros === "object") + message.rawTimestampMicros = new $util.LongBits(object.rawTimestampMicros.low >>> 0, object.rawTimestampMicros.high >>> 0).toNumber(); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Value + * @static + * @param {google.bigtable.v2.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 (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.kind = "intValue"; + } + if (message.rawValue != null && message.hasOwnProperty("rawValue")) { + object.rawValue = options.bytes === String ? $util.base64.encode(message.rawValue, 0, message.rawValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawValue) : message.rawValue; + if (options.oneofs) + object.kind = "rawValue"; + } + if (message.rawTimestampMicros != null && message.hasOwnProperty("rawTimestampMicros")) { + if (typeof message.rawTimestampMicros === "number") + object.rawTimestampMicros = options.longs === String ? String(message.rawTimestampMicros) : message.rawTimestampMicros; + else + object.rawTimestampMicros = options.longs === String ? $util.Long.prototype.toString.call(message.rawTimestampMicros) : options.longs === Number ? new $util.LongBits(message.rawTimestampMicros.low >>> 0, message.rawTimestampMicros.high >>> 0).toNumber() : message.rawTimestampMicros; + if (options.oneofs) + object.kind = "rawTimestampMicros"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.bigtable.v2.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Value"; + }; + + return Value; + })(); + v2.RowRange = (function() { /** @@ -37298,6 +43925,7 @@ * @memberof google.bigtable.v2 * @interface IMutation * @property {google.bigtable.v2.Mutation.ISetCell|null} [setCell] Mutation setCell + * @property {google.bigtable.v2.Mutation.IAddToCell|null} [addToCell] Mutation addToCell * @property {google.bigtable.v2.Mutation.IDeleteFromColumn|null} [deleteFromColumn] Mutation deleteFromColumn * @property {google.bigtable.v2.Mutation.IDeleteFromFamily|null} [deleteFromFamily] Mutation deleteFromFamily * @property {google.bigtable.v2.Mutation.IDeleteFromRow|null} [deleteFromRow] Mutation deleteFromRow @@ -37326,6 +43954,14 @@ */ Mutation.prototype.setCell = null; + /** + * Mutation addToCell. + * @member {google.bigtable.v2.Mutation.IAddToCell|null|undefined} addToCell + * @memberof google.bigtable.v2.Mutation + * @instance + */ + Mutation.prototype.addToCell = null; + /** * Mutation deleteFromColumn. * @member {google.bigtable.v2.Mutation.IDeleteFromColumn|null|undefined} deleteFromColumn @@ -37355,12 +43991,12 @@ /** * Mutation mutation. - * @member {"setCell"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"|undefined} mutation + * @member {"setCell"|"addToCell"|"deleteFromColumn"|"deleteFromFamily"|"deleteFromRow"|undefined} mutation * @memberof google.bigtable.v2.Mutation * @instance */ Object.defineProperty(Mutation.prototype, "mutation", { - get: $util.oneOfGetter($oneOfFields = ["setCell", "deleteFromColumn", "deleteFromFamily", "deleteFromRow"]), + get: $util.oneOfGetter($oneOfFields = ["setCell", "addToCell", "deleteFromColumn", "deleteFromFamily", "deleteFromRow"]), set: $util.oneOfSetter($oneOfFields) }); @@ -37396,6 +44032,8 @@ $root.google.bigtable.v2.Mutation.DeleteFromFamily.encode(message.deleteFromFamily, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.deleteFromRow != null && Object.hasOwnProperty.call(message, "deleteFromRow")) $root.google.bigtable.v2.Mutation.DeleteFromRow.encode(message.deleteFromRow, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.addToCell != null && Object.hasOwnProperty.call(message, "addToCell")) + $root.google.bigtable.v2.Mutation.AddToCell.encode(message.addToCell, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -37434,6 +44072,10 @@ message.setCell = $root.google.bigtable.v2.Mutation.SetCell.decode(reader, reader.uint32()); break; } + case 5: { + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.decode(reader, reader.uint32()); + break; + } case 2: { message.deleteFromColumn = $root.google.bigtable.v2.Mutation.DeleteFromColumn.decode(reader, reader.uint32()); break; @@ -37490,6 +44132,16 @@ return "setCell." + error; } } + if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + if (properties.mutation === 1) + return "mutation: multiple values"; + properties.mutation = 1; + { + var error = $root.google.bigtable.v2.Mutation.AddToCell.verify(message.addToCell); + if (error) + return "addToCell." + error; + } + } if (message.deleteFromColumn != null && message.hasOwnProperty("deleteFromColumn")) { if (properties.mutation === 1) return "mutation: multiple values"; @@ -37540,6 +44192,11 @@ throw TypeError(".google.bigtable.v2.Mutation.setCell: object expected"); message.setCell = $root.google.bigtable.v2.Mutation.SetCell.fromObject(object.setCell); } + if (object.addToCell != null) { + if (typeof object.addToCell !== "object") + throw TypeError(".google.bigtable.v2.Mutation.addToCell: object expected"); + message.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.fromObject(object.addToCell); + } if (object.deleteFromColumn != null) { if (typeof object.deleteFromColumn !== "object") throw TypeError(".google.bigtable.v2.Mutation.deleteFromColumn: object expected"); @@ -37591,6 +44248,11 @@ if (options.oneofs) object.mutation = "deleteFromRow"; } + if (message.addToCell != null && message.hasOwnProperty("addToCell")) { + object.addToCell = $root.google.bigtable.v2.Mutation.AddToCell.toObject(message.addToCell, options); + if (options.oneofs) + object.mutation = "addToCell"; + } return object; }; @@ -37925,6 +44587,294 @@ return SetCell; })(); + Mutation.AddToCell = (function() { + + /** + * Properties of an AddToCell. + * @memberof google.bigtable.v2.Mutation + * @interface IAddToCell + * @property {string|null} [familyName] AddToCell familyName + * @property {google.bigtable.v2.IValue|null} [columnQualifier] AddToCell columnQualifier + * @property {google.bigtable.v2.IValue|null} [timestamp] AddToCell timestamp + * @property {google.bigtable.v2.IValue|null} [input] AddToCell input + */ + + /** + * Constructs a new AddToCell. + * @memberof google.bigtable.v2.Mutation + * @classdesc Represents an AddToCell. + * @implements IAddToCell + * @constructor + * @param {google.bigtable.v2.Mutation.IAddToCell=} [properties] Properties to set + */ + function AddToCell(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddToCell familyName. + * @member {string} familyName + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.familyName = ""; + + /** + * AddToCell columnQualifier. + * @member {google.bigtable.v2.IValue|null|undefined} columnQualifier + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.columnQualifier = null; + + /** + * AddToCell timestamp. + * @member {google.bigtable.v2.IValue|null|undefined} timestamp + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.timestamp = null; + + /** + * AddToCell input. + * @member {google.bigtable.v2.IValue|null|undefined} input + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + */ + AddToCell.prototype.input = null; + + /** + * Creates a new AddToCell instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.IAddToCell=} [properties] Properties to set + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell instance + */ + AddToCell.create = function create(properties) { + return new AddToCell(properties); + }; + + /** + * Encodes the specified AddToCell message. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.IAddToCell} message AddToCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddToCell.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.familyName != null && Object.hasOwnProperty.call(message, "familyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.familyName); + if (message.columnQualifier != null && Object.hasOwnProperty.call(message, "columnQualifier")) + $root.google.bigtable.v2.Value.encode(message.columnQualifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.bigtable.v2.Value.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.bigtable.v2.Value.encode(message.input, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddToCell message, length delimited. Does not implicitly {@link google.bigtable.v2.Mutation.AddToCell.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.IAddToCell} message AddToCell message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddToCell.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddToCell message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddToCell.decode = 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.bigtable.v2.Mutation.AddToCell(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.familyName = reader.string(); + break; + } + case 2: { + message.columnQualifier = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timestamp = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.input = $root.google.bigtable.v2.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddToCell message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddToCell.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddToCell message. + * @function verify + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddToCell.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.familyName != null && message.hasOwnProperty("familyName")) + if (!$util.isString(message.familyName)) + return "familyName: string expected"; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) { + var error = $root.google.bigtable.v2.Value.verify(message.columnQualifier); + if (error) + return "columnQualifier." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.bigtable.v2.Value.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.bigtable.v2.Value.verify(message.input); + if (error) + return "input." + error; + } + return null; + }; + + /** + * Creates an AddToCell message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.Mutation.AddToCell} AddToCell + */ + AddToCell.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.Mutation.AddToCell) + return object; + var message = new $root.google.bigtable.v2.Mutation.AddToCell(); + if (object.familyName != null) + message.familyName = String(object.familyName); + if (object.columnQualifier != null) { + if (typeof object.columnQualifier !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.columnQualifier: object expected"); + message.columnQualifier = $root.google.bigtable.v2.Value.fromObject(object.columnQualifier); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.timestamp: object expected"); + message.timestamp = $root.google.bigtable.v2.Value.fromObject(object.timestamp); + } + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.bigtable.v2.Mutation.AddToCell.input: object expected"); + message.input = $root.google.bigtable.v2.Value.fromObject(object.input); + } + return message; + }; + + /** + * Creates a plain object from an AddToCell message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {google.bigtable.v2.Mutation.AddToCell} message AddToCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddToCell.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.familyName = ""; + object.columnQualifier = null; + object.timestamp = null; + object.input = null; + } + if (message.familyName != null && message.hasOwnProperty("familyName")) + object.familyName = message.familyName; + if (message.columnQualifier != null && message.hasOwnProperty("columnQualifier")) + object.columnQualifier = $root.google.bigtable.v2.Value.toObject(message.columnQualifier, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.bigtable.v2.Value.toObject(message.timestamp, options); + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.bigtable.v2.Value.toObject(message.input, options); + return object; + }; + + /** + * Converts this AddToCell to JSON. + * @function toJSON + * @memberof google.bigtable.v2.Mutation.AddToCell + * @instance + * @returns {Object.} JSON object + */ + AddToCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddToCell + * @function getTypeUrl + * @memberof google.bigtable.v2.Mutation.AddToCell + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddToCell.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.Mutation.AddToCell"; + }; + + return AddToCell; + })(); + Mutation.DeleteFromColumn = (function() { /** @@ -40567,6 +47517,7 @@ * @property {boolean|null} [lastScannedRowResponses] FeatureFlags lastScannedRowResponses * @property {boolean|null} [routingCookie] FeatureFlags routingCookie * @property {boolean|null} [retryInfo] FeatureFlags retryInfo + * @property {boolean|null} [clientSideMetricsEnabled] FeatureFlags clientSideMetricsEnabled */ /** @@ -40632,6 +47583,14 @@ */ FeatureFlags.prototype.retryInfo = false; + /** + * FeatureFlags clientSideMetricsEnabled. + * @member {boolean} clientSideMetricsEnabled + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.clientSideMetricsEnabled = false; + /** * Creates a new FeatureFlags instance using the specified properties. * @function create @@ -40668,6 +47627,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.routingCookie); if (message.retryInfo != null && Object.hasOwnProperty.call(message, "retryInfo")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.retryInfo); + if (message.clientSideMetricsEnabled != null && Object.hasOwnProperty.call(message, "clientSideMetricsEnabled")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.clientSideMetricsEnabled); return writer; }; @@ -40726,6 +47687,10 @@ message.retryInfo = reader.bool(); break; } + case 8: { + message.clientSideMetricsEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -40779,6 +47744,9 @@ if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) if (typeof message.retryInfo !== "boolean") return "retryInfo: boolean expected"; + if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) + if (typeof message.clientSideMetricsEnabled !== "boolean") + return "clientSideMetricsEnabled: boolean expected"; return null; }; @@ -40806,6 +47774,8 @@ message.routingCookie = Boolean(object.routingCookie); if (object.retryInfo != null) message.retryInfo = Boolean(object.retryInfo); + if (object.clientSideMetricsEnabled != null) + message.clientSideMetricsEnabled = Boolean(object.clientSideMetricsEnabled); return message; }; @@ -40829,6 +47799,7 @@ object.mutateRowsRateLimit2 = false; object.routingCookie = false; object.retryInfo = false; + object.clientSideMetricsEnabled = false; } if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) object.reverseScans = message.reverseScans; @@ -40842,6 +47813,8 @@ object.routingCookie = message.routingCookie; if (message.retryInfo != null && message.hasOwnProperty("retryInfo")) object.retryInfo = message.retryInfo; + if (message.clientSideMetricsEnabled != null && message.hasOwnProperty("clientSideMetricsEnabled")) + object.clientSideMetricsEnabled = message.clientSideMetricsEnabled; return object; }; diff --git a/protos/protos.json b/protos/protos.json index 8d59140e2..d0b03646f 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -11,7 +11,7 @@ "csharp_namespace": "Google.Cloud.Bigtable.Admin.V2", "go_package": "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin", "java_multiple_files": true, - "java_outer_classname": "TableProto", + "java_outer_classname": "TypesProto", "java_package": "com.google.bigtable.admin.v2", "php_namespace": "Google\\Cloud\\Bigtable\\Admin\\V2", "ruby_package": "Google::Cloud::Bigtable::Admin::V2", @@ -1177,7 +1177,8 @@ "isolation": { "oneof": [ "priority", - "standardIsolation" + "standardIsolation", + "dataBoostIsolationReadOnly" ] } }, @@ -1212,6 +1213,10 @@ "standardIsolation": { "type": "StandardIsolation", "id": 11 + }, + "dataBoostIsolationReadOnly": { + "type": "DataBoostIsolationReadOnly", + "id": 10 } }, "nested": { @@ -1251,6 +1256,32 @@ "id": 1 } } + }, + "DataBoostIsolationReadOnly": { + "oneofs": { + "_computeBillingOwner": { + "oneof": [ + "computeBillingOwner" + ] + } + }, + "fields": { + "computeBillingOwner": { + "type": "ComputeBillingOwner", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "ComputeBillingOwner": { + "values": { + "COMPUTE_BILLING_OWNER_UNSPECIFIED": 0, + "HOST_PAYS": 1 + } + } + } } } }, @@ -1489,6 +1520,116 @@ } ] }, + "CreateAuthorizedView": { + "requestType": "CreateAuthorizedViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews", + "(google.api.http).body": "authorized_view", + "(google.api.method_signature)": "parent,authorized_view,authorized_view_id", + "(google.longrunning.operation_info).response_type": "AuthorizedView", + "(google.longrunning.operation_info).metadata_type": "CreateAuthorizedViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews", + "body": "authorized_view" + } + }, + { + "(google.api.method_signature)": "parent,authorized_view,authorized_view_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AuthorizedView", + "metadata_type": "CreateAuthorizedViewMetadata" + } + } + ] + }, + "ListAuthorizedViews": { + "requestType": "ListAuthorizedViewsRequest", + "responseType": "ListAuthorizedViewsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAuthorizedView": { + "requestType": "GetAuthorizedViewRequest", + "responseType": "AuthorizedView", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAuthorizedView": { + "requestType": "UpdateAuthorizedViewRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(google.api.http).body": "authorized_view", + "(google.api.method_signature)": "authorized_view,update_mask", + "(google.longrunning.operation_info).response_type": "AuthorizedView", + "(google.longrunning.operation_info).metadata_type": "UpdateAuthorizedViewMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}", + "body": "authorized_view" + } + }, + { + "(google.api.method_signature)": "authorized_view,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AuthorizedView", + "metadata_type": "UpdateAuthorizedViewMetadata" + } + } + ] + }, + "DeleteAuthorizedView": { + "requestType": "DeleteAuthorizedViewRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "ModifyColumnFamilies": { "requestType": "ModifyColumnFamiliesRequest", "responseType": "Table", @@ -2233,6 +2374,13 @@ "drop": { "type": "bool", "id": 4 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } } @@ -2259,6 +2407,14 @@ } }, "CheckConsistencyRequest": { + "oneofs": { + "mode": { + "oneof": [ + "standardReadRemoteWrites", + "dataBoostReadLocalWrites" + ] + } + }, "fields": { "name": { "type": "string", @@ -2274,9 +2430,23 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "standardReadRemoteWrites": { + "type": "StandardReadRemoteWrites", + "id": 3 + }, + "dataBoostReadLocalWrites": { + "type": "DataBoostReadLocalWrites", + "id": 4 } } }, + "StandardReadRemoteWrites": { + "fields": {} + }, + "DataBoostReadLocalWrites": { + "fields": {} + }, "CheckConsistencyResponse": { "fields": { "consistent": { @@ -2591,6 +2761,173 @@ } } }, + "CreateAuthorizedViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "authorizedViewId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "authorizedView": { + "type": "AuthorizedView", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateAuthorizedViewMetadata": { + "fields": { + "originalRequest": { + "type": "CreateAuthorizedViewRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "ListAuthorizedViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "AuthorizedView.ResponseView", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAuthorizedViewsResponse": { + "fields": { + "authorizedViews": { + "rule": "repeated", + "type": "AuthorizedView", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetAuthorizedViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "view": { + "type": "AuthorizedView.ResponseView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAuthorizedViewRequest": { + "fields": { + "authorizedView": { + "type": "AuthorizedView", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreWarnings": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAuthorizedViewMetadata": { + "fields": { + "originalRequest": { + "type": "UpdateAuthorizedViewRequest", + "id": 1 + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteAuthorizedViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "RestoreInfo": { "oneofs": { "sourceInfo": { @@ -2623,6 +2960,13 @@ "(google.api.resource).type": "bigtableadmin.googleapis.com/Table", "(google.api.resource).pattern": "projects/{project}/instances/{instance}/tables/{table}" }, + "oneofs": { + "automatedBackupConfig": { + "oneof": [ + "automatedBackupPolicy" + ] + } + }, "fields": { "name": { "type": "string", @@ -2662,6 +3006,10 @@ "deletionProtection": { "type": "bool", "id": 9 + }, + "automatedBackupPolicy": { + "type": "AutomatedBackupPolicy", + "id": 13 } }, "nested": { @@ -2711,6 +3059,98 @@ "ENCRYPTION_VIEW": 5, "FULL": 4 } + }, + "AutomatedBackupPolicy": { + "fields": { + "retentionPeriod": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "frequency": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "AuthorizedView": { + "options": { + "(google.api.resource).type": "bigtableadmin.googleapis.com/AuthorizedView", + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}", + "(google.api.resource).plural": "authorizedViews", + "(google.api.resource).singular": "authorizedView" + }, + "oneofs": { + "authorizedView": { + "oneof": [ + "subsetView" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "subsetView": { + "type": "SubsetView", + "id": 2 + }, + "etag": { + "type": "string", + "id": 3 + }, + "deletionProtection": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "FamilySubsets": { + "fields": { + "qualifiers": { + "rule": "repeated", + "type": "bytes", + "id": 1 + }, + "qualifierPrefixes": { + "rule": "repeated", + "type": "bytes", + "id": 2 + } + } + }, + "SubsetView": { + "fields": { + "rowPrefixes": { + "rule": "repeated", + "type": "bytes", + "id": 1 + }, + "familySubsets": { + "keyType": "string", + "type": "FamilySubsets", + "id": 2 + } + } + }, + "ResponseView": { + "values": { + "RESPONSE_VIEW_UNSPECIFIED": 0, + "NAME_ONLY": 1, + "BASIC": 2, + "FULL": 3 + } } } }, @@ -2719,6 +3159,10 @@ "gcRule": { "type": "GcRule", "id": 1 + }, + "valueType": { + "type": "Type", + "id": 3 } } }, @@ -2985,6 +3429,129 @@ "RESTORE_SOURCE_TYPE_UNSPECIFIED": 0, "BACKUP": 1 } + }, + "Type": { + "oneofs": { + "kind": { + "oneof": [ + "bytesType", + "int64Type", + "aggregateType" + ] + } + }, + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + }, + "int64Type": { + "type": "Int64", + "id": 5 + }, + "aggregateType": { + "type": "Aggregate", + "id": 6 + } + }, + "nested": { + "Bytes": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "raw" + ] + } + }, + "fields": { + "raw": { + "type": "Raw", + "id": 1 + } + }, + "nested": { + "Raw": { + "fields": {} + } + } + } + } + }, + "Int64": { + "fields": { + "encoding": { + "type": "Encoding", + "id": 1 + } + }, + "nested": { + "Encoding": { + "oneofs": { + "encoding": { + "oneof": [ + "bigEndianBytes" + ] + } + }, + "fields": { + "bigEndianBytes": { + "type": "BigEndianBytes", + "id": 1 + } + }, + "nested": { + "BigEndianBytes": { + "fields": { + "bytesType": { + "type": "Bytes", + "id": 1 + } + } + } + } + } + } + }, + "Aggregate": { + "oneofs": { + "aggregator": { + "oneof": [ + "sum" + ] + } + }, + "fields": { + "inputType": { + "type": "Type", + "id": 1 + }, + "stateType": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sum": { + "type": "Sum", + "id": 4 + } + }, + "nested": { + "Sum": { + "fields": {} + } + } + } + } } } } @@ -2999,8 +3566,8 @@ "java_package": "com.google.bigtable.v2", "php_namespace": "Google\\Cloud\\Bigtable\\V2", "ruby_package": "Google::Cloud::Bigtable::V2", - "(google.api.resource_definition).type": "bigtableadmin.googleapis.com/Table", - "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}/tables/{table}" + "(google.api.resource_definition).type": "bigtableadmin.googleapis.com/AuthorizedView", + "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}" }, "nested": { "Bigtable": { @@ -3016,15 +3583,21 @@ "options": { "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readRows", "(google.api.http).body": "*", - "(google.api.routing).routing_parameters.field": "app_profile_id", - "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", "(google.api.method_signature)": "table_name,app_profile_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readRows", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows", + "body": "*" + } } }, { @@ -3036,6 +3609,10 @@ }, { "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" } ] } @@ -3054,14 +3631,18 @@ "responseStream": true, "options": { "(google.api.http).get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys", - "(google.api.routing).routing_parameters.field": "app_profile_id", - "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}", + "(google.api.http).additional_bindings.get": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", "(google.api.method_signature)": "table_name,app_profile_id" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" + "get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys", + "additional_bindings": { + "get": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys" + } } }, { @@ -3073,6 +3654,10 @@ }, { "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" } ] } @@ -3091,15 +3676,21 @@ "options": { "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow", "(google.api.http).body": "*", - "(google.api.routing).routing_parameters.field": "app_profile_id", - "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", "(google.api.method_signature)": "table_name,row_key,mutations,app_profile_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow", + "body": "*" + } } }, { @@ -3111,6 +3702,10 @@ }, { "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" } ] } @@ -3130,15 +3725,21 @@ "options": { "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows", "(google.api.http).body": "*", - "(google.api.routing).routing_parameters.field": "app_profile_id", - "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", "(google.api.method_signature)": "table_name,entries,app_profile_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows", + "body": "*" + } } }, { @@ -3150,6 +3751,10 @@ }, { "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" } ] } @@ -3168,15 +3773,21 @@ "options": { "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow", "(google.api.http).body": "*", - "(google.api.routing).routing_parameters.field": "app_profile_id", - "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow", + "body": "*" + } } }, { @@ -3188,6 +3799,10 @@ }, { "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" } ] } @@ -3244,15 +3859,21 @@ "options": { "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow", "(google.api.http).body": "*", - "(google.api.routing).routing_parameters.field": "app_profile_id", - "(google.api.routing).routing_parameters.path_template": "{table_name=projects/*/instances/*/tables/*}", + "(google.api.http).additional_bindings.post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow", + "(google.api.http).additional_bindings.body": "*", + "(google.api.routing).routing_parameters.field": "authorized_view_name", + "(google.api.routing).routing_parameters.path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}", "(google.api.method_signature)": "table_name,row_key,rules,app_profile_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow", + "body": "*" + } } }, { @@ -3264,6 +3885,10 @@ }, { "field": "app_profile_id" + }, + { + "field": "authorized_view_name", + "path_template": "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" } ] } @@ -3332,10 +3957,18 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" } }, + "authorizedViewName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, "appProfileId": { "type": "string", "id": 5 @@ -3445,10 +4078,18 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" } }, + "authorizedViewName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, "appProfileId": { "type": "string", "id": 2 @@ -3473,10 +4114,18 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" } }, + "authorizedViewName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, "appProfileId": { "type": "string", "id": 4 @@ -3507,10 +4156,18 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" } }, + "authorizedViewName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, "appProfileId": { "type": "string", "id": 3 @@ -3598,10 +4255,18 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" } }, + "authorizedViewName": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, "appProfileId": { "type": "string", "id": 7 @@ -3662,10 +4327,18 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Table" } }, + "authorizedViewName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/AuthorizedView" + } + }, "appProfileId": { "type": "string", "id": 4 @@ -3957,6 +4630,31 @@ } } }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "rawValue", + "rawTimestampMicros", + "intValue" + ] + } + }, + "fields": { + "rawValue": { + "type": "bytes", + "id": 8 + }, + "rawTimestampMicros": { + "type": "int64", + "id": 9 + }, + "intValue": { + "type": "int64", + "id": 6 + } + } + }, "RowRange": { "oneofs": { "startKey": { @@ -4235,6 +4933,7 @@ "mutation": { "oneof": [ "setCell", + "addToCell", "deleteFromColumn", "deleteFromFamily", "deleteFromRow" @@ -4246,6 +4945,10 @@ "type": "SetCell", "id": 1 }, + "addToCell": { + "type": "AddToCell", + "id": 5 + }, "deleteFromColumn": { "type": "DeleteFromColumn", "id": 2 @@ -4280,6 +4983,26 @@ } } }, + "AddToCell": { + "fields": { + "familyName": { + "type": "string", + "id": 1 + }, + "columnQualifier": { + "type": "Value", + "id": 2 + }, + "timestamp": { + "type": "Value", + "id": 3 + }, + "input": { + "type": "Value", + "id": 4 + } + } + }, "DeleteFromColumn": { "fields": { "familyName": { @@ -4446,6 +5169,10 @@ "retryInfo": { "type": "bool", "id": 7 + }, + "clientSideMetricsEnabled": { + "type": "bool", + "id": 8 } } }, diff --git a/samples/generated/v2/bigtable.check_and_mutate_row.js b/samples/generated/v2/bigtable.check_and_mutate_row.js index caf77b20d..966599ef5 100644 --- a/samples/generated/v2/bigtable.check_and_mutate_row.js +++ b/samples/generated/v2/bigtable.check_and_mutate_row.js @@ -24,7 +24,7 @@ */ 'use strict'; -function main(tableName, rowKey) { +function main(rowKey) { // [START bigtable_v2_generated_Bigtable_CheckAndMutateRow_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,11 +33,19 @@ function main(tableName, rowKey) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form * `projects//instances//tables/
`. */ // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -81,7 +89,6 @@ function main(tableName, rowKey) { async function callCheckAndMutateRow() { // Construct request const request = { - tableName, rowKey, }; diff --git a/samples/generated/v2/bigtable.mutate_row.js b/samples/generated/v2/bigtable.mutate_row.js index 68950e862..5d8aa3627 100644 --- a/samples/generated/v2/bigtable.mutate_row.js +++ b/samples/generated/v2/bigtable.mutate_row.js @@ -24,7 +24,7 @@ */ 'use strict'; -function main(tableName, rowKey, mutations) { +function main(rowKey, mutations) { // [START bigtable_v2_generated_Bigtable_MutateRow_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,11 +33,19 @@ function main(tableName, rowKey, mutations) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form * `projects//instances//tables/
`. */ // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -63,7 +71,6 @@ function main(tableName, rowKey, mutations) { async function callMutateRow() { // Construct request const request = { - tableName, rowKey, mutations, }; diff --git a/samples/generated/v2/bigtable.mutate_rows.js b/samples/generated/v2/bigtable.mutate_rows.js index 6e8c6a79a..5b4448f99 100644 --- a/samples/generated/v2/bigtable.mutate_rows.js +++ b/samples/generated/v2/bigtable.mutate_rows.js @@ -24,7 +24,7 @@ */ 'use strict'; -function main(tableName, entries) { +function main(entries) { // [START bigtable_v2_generated_Bigtable_MutateRows_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,10 +33,19 @@ function main(tableName, entries) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The unique name of the table to which the mutations should be + * Optional. The unique name of the table to which the mutations should be * applied. + * Values are of the form + * `projects//instances//tables/
`. */ // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -60,7 +69,6 @@ function main(tableName, entries) { async function callMutateRows() { // Construct request const request = { - tableName, entries, }; diff --git a/samples/generated/v2/bigtable.read_modify_write_row.js b/samples/generated/v2/bigtable.read_modify_write_row.js index fee7209bd..b27219cfa 100644 --- a/samples/generated/v2/bigtable.read_modify_write_row.js +++ b/samples/generated/v2/bigtable.read_modify_write_row.js @@ -24,7 +24,7 @@ */ 'use strict'; -function main(tableName, rowKey, rules) { +function main(rowKey, rules) { // [START bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,11 +33,19 @@ function main(tableName, rowKey, rules) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form * `projects//instances//tables/
`. */ // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -64,7 +72,6 @@ function main(tableName, rowKey, rules) { async function callReadModifyWriteRow() { // Construct request const request = { - tableName, rowKey, rules, }; diff --git a/samples/generated/v2/bigtable.read_rows.js b/samples/generated/v2/bigtable.read_rows.js index a310fa634..e23f512cf 100644 --- a/samples/generated/v2/bigtable.read_rows.js +++ b/samples/generated/v2/bigtable.read_rows.js @@ -24,7 +24,7 @@ */ 'use strict'; -function main(tableName) { +function main() { // [START bigtable_v2_generated_Bigtable_ReadRows_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,11 +33,17 @@ function main(tableName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The unique name of the table from which to read. + * Optional. The unique name of the table from which to read. * Values are of the form * `projects//instances//tables/
`. */ // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -84,7 +90,6 @@ function main(tableName) { async function callReadRows() { // Construct request const request = { - tableName, }; // Run request diff --git a/samples/generated/v2/bigtable.sample_row_keys.js b/samples/generated/v2/bigtable.sample_row_keys.js index 72a5b784d..01d16cd10 100644 --- a/samples/generated/v2/bigtable.sample_row_keys.js +++ b/samples/generated/v2/bigtable.sample_row_keys.js @@ -24,7 +24,7 @@ */ 'use strict'; -function main(tableName) { +function main() { // [START bigtable_v2_generated_Bigtable_SampleRowKeys_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,11 +33,18 @@ function main(tableName) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The unique name of the table from which to sample row keys. + * Optional. The unique name of the table from which to sample row keys. * Values are of the form * `projects//instances//tables/
`. */ // const tableName = 'abc123' + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + */ + // const authorizedViewName = 'abc123' /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -53,7 +60,6 @@ function main(tableName) { async function callSampleRowKeys() { // Construct request const request = { - tableName, }; // Run request diff --git a/samples/generated/v2/bigtable_table_admin.check_consistency.js b/samples/generated/v2/bigtable_table_admin.check_consistency.js index e91128cb7..e36b88599 100644 --- a/samples/generated/v2/bigtable_table_admin.check_consistency.js +++ b/samples/generated/v2/bigtable_table_admin.check_consistency.js @@ -38,6 +38,18 @@ function main(name, consistencyToken) { * Required. The token created using GenerateConsistencyToken for the Table. */ // const consistencyToken = 'abc123' + /** + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + */ + // const standardReadRemoteWrites = {} + /** + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + */ + // const dataBoostReadLocalWrites = {} // Imports the Admin library const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; diff --git a/samples/generated/v2/bigtable_table_admin.create_authorized_view.js b/samples/generated/v2/bigtable_table_admin.create_authorized_view.js new file mode 100644 index 000000000..7be88c26f --- /dev/null +++ b/samples/generated/v2/bigtable_table_admin.create_authorized_view.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, authorizedViewId, authorizedView) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const parent = 'abc123' + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + */ + // const authorizedViewId = 'abc123' + /** + * Required. The AuthorizedView to create. + */ + // const authorizedView = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callCreateAuthorizedView() { + // Construct request + const request = { + parent, + authorizedViewId, + authorizedView, + }; + + // Run request + const [operation] = await adminClient.createAuthorizedView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js b/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js new file mode 100644 index 000000000..6e9976054 --- /dev/null +++ b/samples/generated/v2/bigtable_table_admin.delete_authorized_view.js @@ -0,0 +1,70 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + */ + // const name = 'abc123' + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + */ + // const etag = 'abc123' + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callDeleteAuthorizedView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAuthorizedView(request); + console.log(response); + } + + callDeleteAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable_table_admin.get_authorized_view.js b/samples/generated/v2/bigtable_table_admin.get_authorized_view.js new file mode 100644 index 000000000..6a6167f32 --- /dev/null +++ b/samples/generated/v2/bigtable_table_admin.get_authorized_view.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + */ + // const name = 'abc123' + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + */ + // const view = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callGetAuthorizedView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAuthorizedView(request); + console.log(response); + } + + callGetAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable_table_admin.list_authorized_views.js b/samples/generated/v2/bigtable_table_admin.list_authorized_views.js new file mode 100644 index 000000000..5cf0bfec3 --- /dev/null +++ b/samples/generated/v2/bigtable_table_admin.list_authorized_views.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + */ + // const pageSize = 1234 + /** + * Optional. The value of `next_page_token` returned by a previous call. + */ + // const pageToken = 'abc123' + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + */ + // const view = {} + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callListAuthorizedViews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listAuthorizedViewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAuthorizedViews(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable_table_admin.update_authorized_view.js b/samples/generated/v2/bigtable_table_admin.update_authorized_view.js new file mode 100644 index 000000000..405f9fb24 --- /dev/null +++ b/samples/generated/v2/bigtable_table_admin.update_authorized_view.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(authorizedView) { + // [START bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + */ + // const authorizedView = {} + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + */ + // const updateMask = {} + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + */ + // const ignoreWarnings = true + + // Imports the Admin library + const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableTableAdminClient(); + + async function callUpdateAuthorizedView() { + // Construct request + const request = { + authorizedView, + }; + + // Run request + const [operation] = await adminClient.updateAuthorizedView(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAuthorizedView(); + // [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json b/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json index 695d33cfb..1481d69ca 100644 --- a/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json +++ b/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json @@ -1319,6 +1319,242 @@ } } }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async", + "title": "bigtable createAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Creates a new AuthorizedView in a table.", + "canonical": true, + "file": "bigtable_table_admin.create_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view_id", + "type": "TYPE_STRING" + }, + { + "name": "authorized_view", + "type": ".google.bigtable.admin.v2.AuthorizedView" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "CreateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async", + "title": "bigtable listAuthorizedViews Sample", + "origin": "API_DEFINITION", + "description": " Lists all AuthorizedViews from a specific table.", + "canonical": true, + "file": "bigtable_table_admin.list_authorized_views.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAuthorizedViews", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.bigtable.admin.v2.AuthorizedView.ResponseView" + } + ], + "resultType": ".google.bigtable.admin.v2.ListAuthorizedViewsResponse", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "ListAuthorizedViews", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async", + "title": "bigtable getAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Gets information from a specified AuthorizedView.", + "canonical": true, + "file": "bigtable_table_admin.get_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.bigtable.admin.v2.AuthorizedView.ResponseView" + } + ], + "resultType": ".google.bigtable.admin.v2.AuthorizedView", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "GetAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async", + "title": "bigtable updateAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Updates an AuthorizedView in a table.", + "canonical": true, + "file": "bigtable_table_admin.update_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", + "async": true, + "parameters": [ + { + "name": "authorized_view", + "type": ".google.bigtable.admin.v2.AuthorizedView" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "ignore_warnings", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "UpdateAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, + { + "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async", + "title": "bigtable deleteAuthorizedView Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a specified AuthorizedView.", + "canonical": true, + "file": "bigtable_table_admin.delete_authorized_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "BigtableTableAdminClient", + "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" + }, + "method": { + "shortName": "DeleteAuthorizedView", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView", + "service": { + "shortName": "BigtableTableAdmin", + "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" + } + } + } + }, { "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async", "title": "bigtable modifyColumnFamilies Sample", @@ -1466,7 +1702,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 72, "type": "FULL" } ], @@ -1482,6 +1718,14 @@ { "name": "consistency_token", "type": "TYPE_STRING" + }, + { + "name": "standard_read_remote_writes", + "type": ".google.bigtable.admin.v2.StandardReadRemoteWrites" + }, + { + "name": "data_boost_read_local_writes", + "type": ".google.bigtable.admin.v2.DataBoostReadLocalWrites" } ], "resultType": ".google.bigtable.admin.v2.CheckConsistencyResponse", diff --git a/samples/generated/v2/snippet_metadata_google.bigtable.v2.json b/samples/generated/v2/snippet_metadata_google.bigtable.v2.json index b84efb027..1cab4a832 100644 --- a/samples/generated/v2/snippet_metadata_google.bigtable.v2.json +++ b/samples/generated/v2/snippet_metadata_google.bigtable.v2.json @@ -22,7 +22,7 @@ "segments": [ { "start": 29, - "end": 97, + "end": 102, "type": "FULL" } ], @@ -35,6 +35,10 @@ "name": "table_name", "type": "TYPE_STRING" }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, { "name": "app_profile_id", "type": "TYPE_STRING" @@ -86,7 +90,7 @@ "segments": [ { "start": 29, - "end": 66, + "end": 72, "type": "FULL" } ], @@ -99,6 +103,10 @@ "name": "table_name", "type": "TYPE_STRING" }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, { "name": "app_profile_id", "type": "TYPE_STRING" @@ -130,7 +138,7 @@ "segments": [ { "start": 29, - "end": 76, + "end": 83, "type": "FULL" } ], @@ -143,6 +151,10 @@ "name": "table_name", "type": "TYPE_STRING" }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, { "name": "app_profile_id", "type": "TYPE_STRING" @@ -182,7 +194,7 @@ "segments": [ { "start": 29, - "end": 74, + "end": 82, "type": "FULL" } ], @@ -195,6 +207,10 @@ "name": "table_name", "type": "TYPE_STRING" }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, { "name": "app_profile_id", "type": "TYPE_STRING" @@ -230,7 +246,7 @@ "segments": [ { "start": 29, - "end": 93, + "end": 100, "type": "FULL" } ], @@ -243,6 +259,10 @@ "name": "table_name", "type": "TYPE_STRING" }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, { "name": "app_profile_id", "type": "TYPE_STRING" @@ -334,7 +354,7 @@ "segments": [ { "start": 29, - "end": 77, + "end": 84, "type": "FULL" } ], @@ -347,6 +367,10 @@ "name": "table_name", "type": "TYPE_STRING" }, + { + "name": "authorized_view_name", + "type": "TYPE_STRING" + }, { "name": "app_profile_id", "type": "TYPE_STRING" diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index 83102ce94..b0e95910a 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -117,8 +117,15 @@ export class BigtableClient { 'Please set either universe_domain or universeDomain, but not both.' ); } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; this._universeDomain = - opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; this._servicePath = 'bigtable.' + this._universeDomain; const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; @@ -170,7 +177,7 @@ export class BigtableClient { // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { + if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { clientHeader.push(`gl-web/${this._gaxModule.version}`); @@ -190,6 +197,9 @@ export class BigtableClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + authorizedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}' + ), instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}' ), @@ -337,7 +347,7 @@ export class BigtableClient { */ static get servicePath() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -355,7 +365,7 @@ export class BigtableClient { */ static get apiEndpoint() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -427,10 +437,18 @@ export class BigtableClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.tableName - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @param {string} request.appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -533,6 +551,25 @@ export class BigtableClient { } } } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)' + ) + ); + if (match) { + const parameterValue = + match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { + authorized_view_name: parameterValue, + }); + } + } + } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); @@ -543,10 +580,18 @@ export class BigtableClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.tableName - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @param {string} request.appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -665,6 +710,25 @@ export class BigtableClient { } } } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)' + ) + ); + if (match) { + const parameterValue = + match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { + authorized_view_name: parameterValue, + }); + } + } + } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); @@ -788,10 +852,18 @@ export class BigtableClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.tableName - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @param {string} request.appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -897,6 +969,25 @@ export class BigtableClient { } } } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)' + ) + ); + if (match) { + const parameterValue = + match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { + authorized_view_name: parameterValue, + }); + } + } + } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); @@ -912,10 +1003,16 @@ export class BigtableClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.tableName - * Required. The unique name of the table from which to read. + * @param {string} [request.tableName] + * Optional. The unique name of the table from which to read. + * * Values are of the form * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView from which to read. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @param {string} request.appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -985,6 +1082,25 @@ export class BigtableClient { } } } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)' + ) + ); + if (match) { + const parameterValue = + match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { + authorized_view_name: parameterValue, + }); + } + } + } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); @@ -999,10 +1115,17 @@ export class BigtableClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.tableName - * Required. The unique name of the table from which to sample row keys. + * @param {string} [request.tableName] + * Optional. The unique name of the table from which to sample row keys. + * * Values are of the form * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @param {string} request.appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -1048,6 +1171,25 @@ export class BigtableClient { } } } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)' + ) + ); + if (match) { + const parameterValue = + match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { + authorized_view_name: parameterValue, + }); + } + } + } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); @@ -1061,9 +1203,18 @@ export class BigtableClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.tableName - * Required. The unique name of the table to which the mutations should be + * @param {string} [request.tableName] + * Optional. The unique name of the table to which the mutations should be * applied. + * + * Values are of the form + * `projects//instances//tables/
`. + * @param {string} [request.authorizedViewName] + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @param {string} request.appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -1115,6 +1266,25 @@ export class BigtableClient { } } } + { + const fieldValue = request.authorizedViewName; + if (fieldValue !== undefined && fieldValue !== null) { + const match = fieldValue + .toString() + .match( + RegExp( + '(?projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)' + ) + ); + if (match) { + const parameterValue = + match.groups?.['authorized_view_name'] ?? fieldValue; + Object.assign(routingParameter, { + authorized_view_name: parameterValue, + }); + } + } + } options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams(routingParameter); this.initialize(); @@ -1233,6 +1403,81 @@ export class BigtableClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified authorizedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} authorized_view + * @returns {string} Resource name string. + */ + authorizedViewPath( + project: string, + instance: string, + table: string, + authorizedView: string + ) { + return this.pathTemplates.authorizedViewPathTemplate.render({ + project: project, + instance: instance, + table: table, + authorized_view: authorizedView, + }); + } + + /** + * Parse the project from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).project; + } + + /** + * Parse the instance from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).instance; + } + + /** + * Parse the table from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the table. + */ + matchTableFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).table; + } + + /** + * Parse the authorized_view from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the authorized_view. + */ + matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).authorized_view; + } + /** * Return a fully-qualified instance resource name string. * diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index b67984c7f..f8b5482e4 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -125,8 +125,15 @@ export class BigtableInstanceAdminClient { 'Please set either universe_domain or universeDomain, but not both.' ); } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; this._universeDomain = - opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; this._servicePath = 'bigtableadmin.' + this._universeDomain; const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; @@ -178,7 +185,7 @@ export class BigtableInstanceAdminClient { // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { + if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { clientHeader.push(`gl-web/${this._gaxModule.version}`); @@ -201,6 +208,9 @@ export class BigtableInstanceAdminClient { appProfilePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}/appProfiles/{app_profile}' ), + authorizedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}' + ), backupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}' ), @@ -455,7 +465,7 @@ export class BigtableInstanceAdminClient { */ static get servicePath() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -473,7 +483,7 @@ export class BigtableInstanceAdminClient { */ static get apiEndpoint() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -3134,6 +3144,81 @@ export class BigtableInstanceAdminClient { .app_profile; } + /** + * Return a fully-qualified authorizedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} authorized_view + * @returns {string} Resource name string. + */ + authorizedViewPath( + project: string, + instance: string, + table: string, + authorizedView: string + ) { + return this.pathTemplates.authorizedViewPathTemplate.render({ + project: project, + instance: instance, + table: table, + authorized_view: authorizedView, + }); + } + + /** + * Parse the project from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).project; + } + + /** + * Parse the instance from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).instance; + } + + /** + * Parse the table from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the table. + */ + matchTableFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).table; + } + + /** + * Parse the authorized_view from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the authorized_view. + */ + matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).authorized_view; + } + /** * Return a fully-qualified backup resource name string. * diff --git a/src/v2/bigtable_instance_admin_proto_list.json b/src/v2/bigtable_instance_admin_proto_list.json index 1f7e1af50..6a7b737f3 100644 --- a/src/v2/bigtable_instance_admin_proto_list.json +++ b/src/v2/bigtable_instance_admin_proto_list.json @@ -3,5 +3,6 @@ "../../protos/google/bigtable/admin/v2/bigtable_table_admin.proto", "../../protos/google/bigtable/admin/v2/common.proto", "../../protos/google/bigtable/admin/v2/instance.proto", - "../../protos/google/bigtable/admin/v2/table.proto" + "../../protos/google/bigtable/admin/v2/table.proto", + "../../protos/google/bigtable/admin/v2/types.proto" ] diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index 8ca05f513..fbfa4e9a2 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -126,8 +126,15 @@ export class BigtableTableAdminClient { 'Please set either universe_domain or universeDomain, but not both.' ); } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; this._universeDomain = - opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; this._servicePath = 'bigtableadmin.' + this._universeDomain; const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; @@ -179,7 +186,7 @@ export class BigtableTableAdminClient { // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && 'versions' in process) { + if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { clientHeader.push(`gl-web/${this._gaxModule.version}`); @@ -202,6 +209,9 @@ export class BigtableTableAdminClient { appProfilePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}/appProfiles/{app_profile}' ), + authorizedViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}' + ), backupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}' ), @@ -214,6 +224,9 @@ export class BigtableTableAdminClient { instancePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}' ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), snapshotPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}' ), @@ -231,6 +244,11 @@ export class BigtableTableAdminClient { 'nextPageToken', 'tables' ), + listAuthorizedViews: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'authorizedViews' + ), listSnapshots: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -293,6 +311,18 @@ export class BigtableTableAdminClient { const undeleteTableMetadata = protoFilesRoot.lookup( '.google.bigtable.admin.v2.UndeleteTableMetadata' ) as gax.protobuf.Type; + const createAuthorizedViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.AuthorizedView' + ) as gax.protobuf.Type; + const createAuthorizedViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.CreateAuthorizedViewMetadata' + ) as gax.protobuf.Type; + const updateAuthorizedViewResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.AuthorizedView' + ) as gax.protobuf.Type; + const updateAuthorizedViewMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata' + ) as gax.protobuf.Type; const snapshotTableResponse = protoFilesRoot.lookup( '.google.bigtable.admin.v2.Snapshot' ) as gax.protobuf.Type; @@ -338,6 +368,16 @@ export class BigtableTableAdminClient { undeleteTableResponse.decode.bind(undeleteTableResponse), undeleteTableMetadata.decode.bind(undeleteTableMetadata) ), + createAuthorizedView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAuthorizedViewResponse.decode.bind(createAuthorizedViewResponse), + createAuthorizedViewMetadata.decode.bind(createAuthorizedViewMetadata) + ), + updateAuthorizedView: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAuthorizedViewResponse.decode.bind(updateAuthorizedViewResponse), + updateAuthorizedViewMetadata.decode.bind(updateAuthorizedViewMetadata) + ), snapshotTable: new this._gaxModule.LongrunningDescriptor( this.operationsClient, snapshotTableResponse.decode.bind(snapshotTableResponse), @@ -417,6 +457,11 @@ export class BigtableTableAdminClient { 'updateTable', 'deleteTable', 'undeleteTable', + 'createAuthorizedView', + 'listAuthorizedViews', + 'getAuthorizedView', + 'updateAuthorizedView', + 'deleteAuthorizedView', 'modifyColumnFamilies', 'dropRowRange', 'generateConsistencyToken', @@ -475,7 +520,7 @@ export class BigtableTableAdminClient { */ static get servicePath() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -493,7 +538,7 @@ export class BigtableTableAdminClient { */ static get apiEndpoint() { if ( - typeof process !== undefined && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { process.emitWarning( @@ -842,6 +887,198 @@ export class BigtableTableAdminClient { this.initialize(); return this.innerApiCalls.deleteTable(request, options, callback); } + /** + * Gets information from a specified AuthorizedView. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_GetAuthorizedView_async + */ + getAuthorizedView( + request?: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest | undefined, + {} | undefined, + ] + >; + getAuthorizedView( + request: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAuthorizedView( + request: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + callback: Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAuthorizedView( + request?: protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.admin.v2.IAuthorizedView, + | protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IGetAuthorizedViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAuthorizedView(request, options, callback); + } + /** + * Permanently deletes a specified AuthorizedView. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param {string} [request.etag] + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_DeleteAuthorizedView_async + */ + deleteAuthorizedView( + request?: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | undefined, + {} | undefined, + ] + >; + deleteAuthorizedView( + request: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAuthorizedView( + request: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAuthorizedView( + request?: protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.bigtable.admin.v2.IDeleteAuthorizedViewRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAuthorizedView(request, options, callback); + } /** * Performs a series of column family modifications on the specified table. * Either all or none of the modifications will occur before this method @@ -1155,6 +1392,14 @@ export class BigtableTableAdminClient { * `projects/{project}/instances/{instance}/tables/{table}`. * @param {string} request.consistencyToken * Required. The token created using GenerateConsistencyToken for the Table. + * @param {google.bigtable.admin.v2.StandardReadRemoteWrites} request.standardReadRemoteWrites + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * @param {google.bigtable.admin.v2.DataBoostReadLocalWrites} request.dataBoostReadLocalWrites + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2404,37 +2649,21 @@ export class BigtableTableAdminClient { >; } /** - * Creates a new snapshot in the specified cluster from the specified - * source table. The cluster and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. + * Creates a new AuthorizedView in a table. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The unique name of the table to have the snapshot taken. + * @param {string} request.parent + * Required. This is the name of the table the AuthorizedView belongs to. * Values are of the form * `projects/{project}/instances/{instance}/tables/{table}`. - * @param {string} request.cluster - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param {string} request.snapshotId - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `{@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * @param {google.protobuf.Duration} request.ttl - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * @param {string} request.description - * Description of the snapshot. + * @param {string} request.authorizedViewId + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * @param {google.bigtable.admin.v2.AuthorizedView} request.authorizedView + * Required. The AuthorizedView to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2443,61 +2672,61 @@ export class BigtableTableAdminClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example - * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async */ - snapshotTable( - request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + createAuthorizedView( + request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - snapshotTable( - request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + createAuthorizedView( + request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - snapshotTable( - request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + createAuthorizedView( + request: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, callback: Callback< LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - snapshotTable( - request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + createAuthorizedView( + request?: protos.google.bigtable.admin.v2.ICreateAuthorizedViewRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined @@ -2505,8 +2734,8 @@ export class BigtableTableAdminClient { ): Promise< [ LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, @@ -2525,28 +2754,28 @@ export class BigtableTableAdminClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.snapshotTable(request, options, callback); + return this.innerApiCalls.createAuthorizedView(request, options, callback); } /** - * Check the status of the long running operation returned by `snapshotTable()`. + * Check the status of the long running operation returned by `createAuthorizedView()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example - * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateAuthorizedView_async */ - async checkSnapshotTableProgress( + async checkCreateAuthorizedViewProgress( name: string ): Promise< LROperation< - protos.google.bigtable.admin.v2.Snapshot, - protos.google.bigtable.admin.v2.SnapshotTableMetadata + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.CreateAuthorizedViewMetadata > > { const request = @@ -2556,39 +2785,35 @@ export class BigtableTableAdminClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.snapshotTable, + this.descriptors.longrunning.createAuthorizedView, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.bigtable.admin.v2.Snapshot, - protos.google.bigtable.admin.v2.SnapshotTableMetadata + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.CreateAuthorizedViewMetadata >; } /** - * Starts creating a new Cloud Bigtable Backup. The returned backup - * {@link protos.google.longrunning.Operation|long-running operation} can be used to - * track creation of the backup. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is - * {@link protos.google.bigtable.admin.v2.CreateBackupMetadata|CreateBackupMetadata}. The - * {@link protos.google.longrunning.Operation.response|response} field type is - * {@link protos.google.bigtable.admin.v2.Backup|Backup}, if successful. Cancelling the - * returned operation will stop the creation and delete the backup. + * Updates an AuthorizedView in a table. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param {string} request.backupId - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex {@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*. - * @param {google.bigtable.admin.v2.Backup} request.backup - * Required. The backup to create. + * @param {google.bigtable.admin.v2.AuthorizedView} request.authorizedView + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
include:samples/generated/v2/bigtable_table_admin.get_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.delete_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.snapshot_table.jsinclude:samples/generated/v2/bigtable_table_admin.create_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.snapshot_table.jsinclude:samples/generated/v2/bigtable_table_admin.create_authorized_view.js
/authorizedViews/ + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * @param {boolean} [request.ignoreWarnings] + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2597,61 +2822,61 @@ export class BigtableTableAdminClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example - * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async */ - createBackup( - request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + updateAuthorizedView( + request?: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - createBackup( - request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + updateAuthorizedView( + request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createBackup( - request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + updateAuthorizedView( + request: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, callback: Callback< LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createBackup( - request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + updateAuthorizedView( + request?: protos.google.bigtable.admin.v2.IUpdateAuthorizedViewRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined @@ -2659,8 +2884,8 @@ export class BigtableTableAdminClient { ): Promise< [ LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, @@ -2679,7 +2904,322 @@ export class BigtableTableAdminClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'authorized_view.name': request.authorizedView!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAuthorizedView(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateAuthorizedView()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_UpdateAuthorizedView_async + */ + async checkUpdateAuthorizedViewProgress( + name: string + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateAuthorizedView, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.AuthorizedView, + protos.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + >; + } + /** + * Creates a new snapshot in the specified cluster from the specified + * source table. The cluster and the table must be in the same instance. + * + * Note: This is a private alpha release of Cloud Bigtable snapshots. This + * feature is not currently available to most Cloud Bigtable customers. This + * feature might be changed in backward-incompatible ways and is not + * recommended for production use. It is not subject to any SLA or deprecation + * policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the table to have the snapshot taken. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {string} request.cluster + * Required. The name of the cluster where the snapshot will be created in. + * Values are of the form + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {string} request.snapshotId + * Required. The ID by which the new snapshot should be referred to within the + * parent cluster, e.g., `mysnapshot` of the form: + * `{@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*` rather than + * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. + * @param {google.protobuf.Duration} request.ttl + * The amount of time that the new snapshot can stay active after it is + * created. Once 'ttl' expires, the snapshot will get deleted. The maximum + * amount of time a snapshot can stay active is 7 days. If 'ttl' is not + * specified, the default value of 24 hours will be used. + * @param {string} request.description + * Description of the snapshot. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async + */ + snapshotTable( + request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + snapshotTable( + request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + snapshotTable( + request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + snapshotTable( + request?: protos.google.bigtable.admin.v2.ISnapshotTableRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.snapshotTable(request, options, callback); + } + /** + * Check the status of the long running operation returned by `snapshotTable()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async + */ + async checkSnapshotTableProgress( + name: string + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Snapshot, + protos.google.bigtable.admin.v2.SnapshotTableMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.snapshotTable, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Snapshot, + protos.google.bigtable.admin.v2.SnapshotTableMetadata + >; + } + /** + * Starts creating a new Cloud Bigtable Backup. The returned backup + * {@link protos.google.longrunning.Operation|long-running operation} can be used to + * track creation of the backup. The + * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * {@link protos.google.bigtable.admin.v2.CreateBackupMetadata|CreateBackupMetadata}. The + * {@link protos.google.longrunning.Operation.response|response} field type is + * {@link protos.google.bigtable.admin.v2.Backup|Backup}, if successful. Cancelling the + * returned operation will stop the creation and delete the backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. This must be one of the clusters in the instance in which this + * table is located. The backup will be stored in this cluster. Values are + * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @param {string} request.backupId + * Required. The id of the backup to be created. The `backup_id` along with + * the parent `parent` are combined as {parent}/backups/{backup_id} to create + * the full backup name, of the form: + * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. + * This string must be between 1 and 50 characters in length and match the + * regex {@link protos.-_.a-zA-Z0-9|_a-zA-Z0-9}*. + * @param {google.bigtable.admin.v2.Backup} request.backup + * Required. The backup to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async + */ + createBackup( + request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackup( + request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackup( + request: protos.google.bigtable.admin.v2.ICreateBackupRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackup( + request?: protos.google.bigtable.admin.v2.ICreateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICreateBackupMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createBackup(request, options, callback); @@ -3245,6 +3785,231 @@ export class BigtableTableAdminClient { callSettings ) as AsyncIterable; } + /** + * Lists all AuthorizedViews from a specific table. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} [request.pageToken] + * Optional. The value of `next_page_token` returned by a previous call. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAuthorizedViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAuthorizedViews( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView[], + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null, + protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse, + ] + >; + listAuthorizedViews( + request: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + > + ): void; + listAuthorizedViews( + request: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + callback: PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + > + ): void; + listAuthorizedViews( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + >, + callback?: PaginationCallback< + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + | protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse + | null + | undefined, + protos.google.bigtable.admin.v2.IAuthorizedView + > + ): Promise< + [ + protos.google.bigtable.admin.v2.IAuthorizedView[], + protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest | null, + protos.google.bigtable.admin.v2.IListAuthorizedViewsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listAuthorizedViews(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} [request.pageToken] + * Optional. The value of `next_page_token` returned by a previous call. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAuthorizedViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAuthorizedViewsStream( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAuthorizedViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAuthorizedViews.createStream( + this.innerApiCalls.listAuthorizedViews as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAuthorizedViews`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param {number} [request.pageSize] + * Optional. Maximum number of results per page. + * + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @param {string} [request.pageToken] + * Optional. The value of `next_page_token` returned by a previous call. + * @param {google.bigtable.admin.v2.AuthorizedView.ResponseView} [request.view] + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.bigtable.admin.v2.AuthorizedView|AuthorizedView}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * region_tag:bigtableadmin_v2_generated_BigtableTableAdmin_ListAuthorizedViews_async + */ + listAuthorizedViewsAsync( + request?: protos.google.bigtable.admin.v2.IListAuthorizedViewsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAuthorizedViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAuthorizedViews.asyncIterate( + this.innerApiCalls['listAuthorizedViews'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } /** * Lists all snapshots associated with the specified cluster. * @@ -3878,6 +4643,81 @@ export class BigtableTableAdminClient { .app_profile; } + /** + * Return a fully-qualified authorizedView resource name string. + * + * @param {string} project + * @param {string} instance + * @param {string} table + * @param {string} authorized_view + * @returns {string} Resource name string. + */ + authorizedViewPath( + project: string, + instance: string, + table: string, + authorizedView: string + ) { + return this.pathTemplates.authorizedViewPathTemplate.render({ + project: project, + instance: instance, + table: table, + authorized_view: authorizedView, + }); + } + + /** + * Parse the project from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).project; + } + + /** + * Parse the instance from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).instance; + } + + /** + * Parse the table from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the table. + */ + matchTableFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).table; + } + + /** + * Parse the authorized_view from AuthorizedView resource. + * + * @param {string} authorizedViewName + * A fully-qualified path representing AuthorizedView resource. + * @returns {string} A string representing the authorized_view. + */ + matchAuthorizedViewFromAuthorizedViewName(authorizedViewName: string) { + return this.pathTemplates.authorizedViewPathTemplate.match( + authorizedViewName + ).authorized_view; + } + /** * Return a fully-qualified backup resource name string. * @@ -4101,6 +4941,29 @@ export class BigtableTableAdminClient { return this.pathTemplates.instancePathTemplate.match(instanceName).instance; } + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + /** * Return a fully-qualified snapshot resource name string. * diff --git a/src/v2/bigtable_table_admin_client_config.json b/src/v2/bigtable_table_admin_client_config.json index 8ddb3cd4c..30f1483d8 100644 --- a/src/v2/bigtable_table_admin_client_config.json +++ b/src/v2/bigtable_table_admin_client_config.json @@ -61,6 +61,26 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "CreateAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAuthorizedViews": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAuthorizedView": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ModifyColumnFamilies": { "timeout_millis": 300000, "retry_codes_name": "non_idempotent", diff --git a/src/v2/bigtable_table_admin_proto_list.json b/src/v2/bigtable_table_admin_proto_list.json index 1f7e1af50..6a7b737f3 100644 --- a/src/v2/bigtable_table_admin_proto_list.json +++ b/src/v2/bigtable_table_admin_proto_list.json @@ -3,5 +3,6 @@ "../../protos/google/bigtable/admin/v2/bigtable_table_admin.proto", "../../protos/google/bigtable/admin/v2/common.proto", "../../protos/google/bigtable/admin/v2/instance.proto", - "../../protos/google/bigtable/admin/v2/table.proto" + "../../protos/google/bigtable/admin/v2/table.proto", + "../../protos/google/bigtable/admin/v2/types.proto" ] diff --git a/src/v2/gapic_metadata.json b/src/v2/gapic_metadata.json index fc5e137af..083ad58bc 100644 --- a/src/v2/gapic_metadata.json +++ b/src/v2/gapic_metadata.json @@ -257,6 +257,16 @@ "deleteTable" ] }, + "GetAuthorizedView": { + "methods": [ + "getAuthorizedView" + ] + }, + "DeleteAuthorizedView": { + "methods": [ + "deleteAuthorizedView" + ] + }, "ModifyColumnFamilies": { "methods": [ "modifyColumnFamilies" @@ -332,6 +342,16 @@ "undeleteTable" ] }, + "CreateAuthorizedView": { + "methods": [ + "createAuthorizedView" + ] + }, + "UpdateAuthorizedView": { + "methods": [ + "updateAuthorizedView" + ] + }, "SnapshotTable": { "methods": [ "snapshotTable" @@ -359,6 +379,13 @@ "listTablesAsync" ] }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews", + "listAuthorizedViewsStream", + "listAuthorizedViewsAsync" + ] + }, "ListSnapshots": { "methods": [ "listSnapshots", @@ -393,6 +420,16 @@ "deleteTable" ] }, + "GetAuthorizedView": { + "methods": [ + "getAuthorizedView" + ] + }, + "DeleteAuthorizedView": { + "methods": [ + "deleteAuthorizedView" + ] + }, "ModifyColumnFamilies": { "methods": [ "modifyColumnFamilies" @@ -468,6 +505,16 @@ "undeleteTable" ] }, + "CreateAuthorizedView": { + "methods": [ + "createAuthorizedView" + ] + }, + "UpdateAuthorizedView": { + "methods": [ + "updateAuthorizedView" + ] + }, "SnapshotTable": { "methods": [ "snapshotTable" @@ -495,6 +542,13 @@ "listTablesAsync" ] }, + "ListAuthorizedViews": { + "methods": [ + "listAuthorizedViews", + "listAuthorizedViewsStream", + "listAuthorizedViewsAsync" + ] + }, "ListSnapshots": { "methods": [ "listSnapshots", diff --git a/test/gapic_bigtable_instance_admin_v2.ts b/test/gapic_bigtable_instance_admin_v2.ts index a54590546..89453921e 100644 --- a/test/gapic_bigtable_instance_admin_v2.ts +++ b/test/gapic_bigtable_instance_admin_v2.ts @@ -176,7 +176,7 @@ describe('v2.BigtableInstanceAdminClient', () => { }); if ( - typeof process !== 'undefined' && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { it('throws DeprecationWarning if static servicePath is used', () => { @@ -216,6 +216,43 @@ describe('v2.BigtableInstanceAdminClient', () => { const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigtableadmin.configured.example.com' + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ @@ -3959,6 +3996,84 @@ describe('v2.BigtableInstanceAdminClient', () => { }); }); + describe('authorizedView', () => { + const fakePath = '/rendered/path/authorizedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + authorized_view: 'authorizedViewValue', + }; + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.authorizedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.authorizedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('authorizedViewPath', () => { + const result = client.authorizedViewPath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'authorizedViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.authorizedViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAuthorizedViewName', () => { + const result = client.matchProjectFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromAuthorizedViewName', () => { + const result = client.matchInstanceFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTableFromAuthorizedViewName', () => { + const result = client.matchTableFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAuthorizedViewFromAuthorizedViewName', () => { + const result = + client.matchAuthorizedViewFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'authorizedViewValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('backup', () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { diff --git a/test/gapic_bigtable_table_admin_v2.ts b/test/gapic_bigtable_table_admin_v2.ts index 90e5b1801..6b04c8ee6 100644 --- a/test/gapic_bigtable_table_admin_v2.ts +++ b/test/gapic_bigtable_table_admin_v2.ts @@ -174,7 +174,7 @@ describe('v2.BigtableTableAdminClient', () => { }); if ( - typeof process !== 'undefined' && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { it('throws DeprecationWarning if static servicePath is used', () => { @@ -210,6 +210,43 @@ describe('v2.BigtableTableAdminClient', () => { const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtableadmin.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new bigtabletableadminModule.v2.BigtableTableAdminClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigtableadmin.configured.example.com' + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { new bigtabletableadminModule.v2.BigtableTableAdminClient({ @@ -692,6 +729,267 @@ describe('v2.BigtableTableAdminClient', () => { }); }); + describe('getAuthorizedView', () => { + it('invokes getAuthorizedView without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ); + client.innerApiCalls.getAuthorizedView = stubSimpleCall(expectedResponse); + const [response] = await client.getAuthorizedView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAuthorizedView without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ); + client.innerApiCalls.getAuthorizedView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAuthorizedView( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.IAuthorizedView | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAuthorizedView with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAuthorizedView = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAuthorizedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAuthorizedView with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.GetAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAuthorizedView(request), expectedError); + }); + }); + + describe('deleteAuthorizedView', () => { + it('invokes deleteAuthorizedView without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAuthorizedView = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteAuthorizedView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAuthorizedView without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAuthorizedView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAuthorizedView( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAuthorizedView with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAuthorizedView = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAuthorizedView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAuthorizedView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAuthorizedView with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAuthorizedViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.DeleteAuthorizedViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAuthorizedView(request), expectedError); + }); + }); + describe('modifyColumnFamilies', () => { it('invokes modifyColumnFamilies without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ @@ -2848,68 +3146,68 @@ describe('v2.BigtableTableAdminClient', () => { }); }); - describe('snapshotTable', () => { - it('invokes snapshotTable without error', async () => { + describe('createAuthorizedView', () => { + it('invokes createAuthorizedView without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.SnapshotTableRequest() + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.SnapshotTableRequest', - ['name'] + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.snapshotTable = + client.innerApiCalls.createAuthorizedView = stubLongRunningCall(expectedResponse); - const [operation] = await client.snapshotTable(request); + const [operation] = await client.createAuthorizedView(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes snapshotTable without error using callback', async () => { + it('invokes createAuthorizedView without error using callback', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.SnapshotTableRequest() + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.SnapshotTableRequest', - ['name'] + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.snapshotTable = + client.innerApiCalls.createAuthorizedView = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.snapshotTable( + client.createAuthorizedView( request, ( err?: Error | null, result?: LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata > | null ) => { if (err) { @@ -2921,86 +3219,86 @@ describe('v2.BigtableTableAdminClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.bigtable.admin.v2.ISnapshot, - protos.google.bigtable.admin.v2.ISnapshotTableMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.ICreateAuthorizedViewMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes snapshotTable with call error', async () => { + it('invokes createAuthorizedView with call error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.SnapshotTableRequest() + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.SnapshotTableRequest', - ['name'] + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.snapshotTable = stubLongRunningCall( + client.innerApiCalls.createAuthorizedView = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.snapshotTable(request), expectedError); + await assert.rejects(client.createAuthorizedView(request), expectedError); const actualRequest = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes snapshotTable with LRO error', async () => { + it('invokes createAuthorizedView with LRO error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.SnapshotTableRequest() + new protos.google.bigtable.admin.v2.CreateAuthorizedViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.SnapshotTableRequest', - ['name'] + '.google.bigtable.admin.v2.CreateAuthorizedViewRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.snapshotTable = stubLongRunningCall( + client.innerApiCalls.createAuthorizedView = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.snapshotTable(request); + const [operation] = await client.createAuthorizedView(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.snapshotTable as SinonStub + client.innerApiCalls.createAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkSnapshotTableProgress without error', async () => { + it('invokes checkCreateAuthorizedViewProgress without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3014,7 +3312,7 @@ describe('v2.BigtableTableAdminClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkSnapshotTableProgress( + const decodedOperation = await client.checkCreateAuthorizedViewProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3022,7 +3320,7 @@ describe('v2.BigtableTableAdminClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkSnapshotTableProgress with error', async () => { + it('invokes checkCreateAuthorizedViewProgress with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3035,74 +3333,77 @@ describe('v2.BigtableTableAdminClient', () => { expectedError ); await assert.rejects( - client.checkSnapshotTableProgress(''), + client.checkCreateAuthorizedViewProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createBackup', () => { - it('invokes createBackup without error', async () => { + describe('updateAuthorizedView', () => { + it('invokes updateAuthorizedView without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CreateBackupRequest() + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest() ); + request.authorizedView ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CreateBackupRequest', - ['parent'] + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackup(request); + client.innerApiCalls.updateAuthorizedView = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAuthorizedView(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createBackup without error using callback', async () => { + it('invokes updateAuthorizedView without error using callback', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CreateBackupRequest() + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest() ); + request.authorizedView ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CreateBackupRequest', - ['parent'] + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createBackup = + client.innerApiCalls.updateAuthorizedView = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createBackup( + client.updateAuthorizedView( request, ( err?: Error | null, result?: LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata > | null ) => { if (err) { @@ -3114,86 +3415,88 @@ describe('v2.BigtableTableAdminClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICreateBackupMetadata + protos.google.bigtable.admin.v2.IAuthorizedView, + protos.google.bigtable.admin.v2.IUpdateAuthorizedViewMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createBackup with call error', async () => { + it('invokes updateAuthorizedView with call error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CreateBackupRequest() + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest() ); + request.authorizedView ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CreateBackupRequest', - ['parent'] + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createBackup = stubLongRunningCall( + client.innerApiCalls.updateAuthorizedView = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createBackup(request), expectedError); + await assert.rejects(client.updateAuthorizedView(request), expectedError); const actualRequest = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createBackup with LRO error', async () => { + it('invokes updateAuthorizedView with LRO error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CreateBackupRequest() + new protos.google.bigtable.admin.v2.UpdateAuthorizedViewRequest() ); + request.authorizedView ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CreateBackupRequest', - ['parent'] + '.google.bigtable.admin.v2.UpdateAuthorizedViewRequest', + ['authorizedView', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.authorizedView.name = defaultValue1; + const expectedHeaderRequestParams = `authorized_view.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createBackup = stubLongRunningCall( + client.innerApiCalls.updateAuthorizedView = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createBackup(request); + const [operation] = await client.updateAuthorizedView(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createBackup as SinonStub + client.innerApiCalls.updateAuthorizedView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateBackupProgress without error', async () => { + it('invokes checkUpdateAuthorizedViewProgress without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3207,7 +3510,7 @@ describe('v2.BigtableTableAdminClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateBackupProgress( + const decodedOperation = await client.checkUpdateAuthorizedViewProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3215,7 +3518,7 @@ describe('v2.BigtableTableAdminClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateBackupProgress with error', async () => { + it('invokes checkUpdateAuthorizedViewProgress with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3227,72 +3530,76 @@ describe('v2.BigtableTableAdminClient', () => { undefined, expectedError ); - await assert.rejects(client.checkCreateBackupProgress(''), expectedError); + await assert.rejects( + client.checkUpdateAuthorizedViewProgress(''), + expectedError + ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('restoreTable', () => { - it('invokes restoreTable without error', async () => { + describe('snapshotTable', () => { + it('invokes snapshotTable without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.RestoreTableRequest() + new protos.google.bigtable.admin.v2.SnapshotTableRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.RestoreTableRequest', - ['parent'] + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.restoreTable = stubLongRunningCall(expectedResponse); - const [operation] = await client.restoreTable(request); + client.innerApiCalls.snapshotTable = + stubLongRunningCall(expectedResponse); + const [operation] = await client.snapshotTable(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes restoreTable without error using callback', async () => { + it('invokes snapshotTable without error using callback', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.RestoreTableRequest() + new protos.google.bigtable.admin.v2.SnapshotTableRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.RestoreTableRequest', - ['parent'] + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.restoreTable = + client.innerApiCalls.snapshotTable = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.restoreTable( + client.snapshotTable( request, ( err?: Error | null, result?: LROperation< - protos.google.bigtable.admin.v2.ITable, - protos.google.bigtable.admin.v2.IRestoreTableMetadata + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata > | null ) => { if (err) { @@ -3304,86 +3611,86 @@ describe('v2.BigtableTableAdminClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.bigtable.admin.v2.ITable, - protos.google.bigtable.admin.v2.IRestoreTableMetadata + protos.google.bigtable.admin.v2.ISnapshot, + protos.google.bigtable.admin.v2.ISnapshotTableMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes restoreTable with call error', async () => { + it('invokes snapshotTable with call error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.RestoreTableRequest() + new protos.google.bigtable.admin.v2.SnapshotTableRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.RestoreTableRequest', - ['parent'] + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.restoreTable = stubLongRunningCall( + client.innerApiCalls.snapshotTable = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.restoreTable(request), expectedError); + await assert.rejects(client.snapshotTable(request), expectedError); const actualRequest = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes restoreTable with LRO error', async () => { + it('invokes snapshotTable with LRO error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.RestoreTableRequest() + new protos.google.bigtable.admin.v2.SnapshotTableRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.RestoreTableRequest', - ['parent'] + '.google.bigtable.admin.v2.SnapshotTableRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.restoreTable = stubLongRunningCall( + client.innerApiCalls.snapshotTable = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.restoreTable(request); + const [operation] = await client.snapshotTable(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restoreTable as SinonStub + client.innerApiCalls.snapshotTable as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkRestoreTableProgress without error', async () => { + it('invokes checkSnapshotTableProgress without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3397,7 +3704,7 @@ describe('v2.BigtableTableAdminClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRestoreTableProgress( + const decodedOperation = await client.checkSnapshotTableProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3405,7 +3712,7 @@ describe('v2.BigtableTableAdminClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkRestoreTableProgress with error', async () => { + it('invokes checkSnapshotTableProgress with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3417,23 +3724,26 @@ describe('v2.BigtableTableAdminClient', () => { undefined, expectedError ); - await assert.rejects(client.checkRestoreTableProgress(''), expectedError); + await assert.rejects( + client.checkSnapshotTableProgress(''), + expectedError + ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('copyBackup', () => { - it('invokes copyBackup without error', async () => { + describe('createBackup', () => { + it('invokes createBackup without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CopyBackupRequest() + new protos.google.bigtable.admin.v2.CreateBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CopyBackupRequest', + '.google.bigtable.admin.v2.CreateBackupRequest', ['parent'] ); request.parent = defaultValue1; @@ -3441,31 +3751,31 @@ describe('v2.BigtableTableAdminClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.copyBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.copyBackup(request); + client.innerApiCalls.createBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackup(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.copyBackup as SinonStub + client.innerApiCalls.createBackup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.copyBackup as SinonStub + client.innerApiCalls.createBackup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes copyBackup without error using callback', async () => { + it('invokes createBackup without error using callback', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CopyBackupRequest() + new protos.google.bigtable.admin.v2.CreateBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CopyBackupRequest', + '.google.bigtable.admin.v2.CreateBackupRequest', ['parent'] ); request.parent = defaultValue1; @@ -3473,16 +3783,16 @@ describe('v2.BigtableTableAdminClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.copyBackup = + client.innerApiCalls.createBackup = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.copyBackup( + client.createBackup( request, ( err?: Error | null, result?: LROperation< protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICopyBackupMetadata + protos.google.bigtable.admin.v2.ICreateBackupMetadata > | null ) => { if (err) { @@ -3495,185 +3805,877 @@ describe('v2.BigtableTableAdminClient', () => { }); const operation = (await promise) as LROperation< protos.google.bigtable.admin.v2.IBackup, - protos.google.bigtable.admin.v2.ICopyBackupMetadata + protos.google.bigtable.admin.v2.ICreateBackupMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.copyBackup as SinonStub + client.innerApiCalls.createBackup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.copyBackup as SinonStub + client.innerApiCalls.createBackup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes copyBackup with call error', async () => { + it('invokes createBackup with call error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CopyBackupRequest() + new protos.google.bigtable.admin.v2.CreateBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CopyBackupRequest', + '.google.bigtable.admin.v2.CreateBackupRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.copyBackup = stubLongRunningCall( + client.innerApiCalls.createBackup = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.copyBackup(request), expectedError); + await assert.rejects(client.createBackup(request), expectedError); const actualRequest = ( - client.innerApiCalls.copyBackup as SinonStub + client.innerApiCalls.createBackup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.copyBackup as SinonStub + client.innerApiCalls.createBackup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes copyBackup with LRO error', async () => { + it('invokes createBackup with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CreateBackupRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restoreTable', () => { + it('invokes restoreTable without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreTable = stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreTable(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreTable without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreTable = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreTable( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ITable, + protos.google.bigtable.admin.v2.IRestoreTableMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreTable with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreTable = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.restoreTable(request), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreTable with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.RestoreTableRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.RestoreTableRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreTable = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.restoreTable(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreTable as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreTableProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRestoreTableProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreTableProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkRestoreTableProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('copyBackup', () => { + it('invokes copyBackup without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.copyBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.copyBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes copyBackup without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.copyBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.copyBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.IBackup, + protos.google.bigtable.admin.v2.ICopyBackupMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes copyBackup with call error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.copyBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.copyBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes copyBackup with LRO error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CopyBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.CopyBackupRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.copyBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.copyBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.copyBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCopyBackupProgress without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCopyBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCopyBackupProgress with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCopyBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listTables', () => { + it('invokes listTables without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.innerApiCalls.listTables = stubSimpleCall(expectedResponse); + const [response] = await client.listTables(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTables without error using callback', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.innerApiCalls.listTables = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTables( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.admin.v2.ITable[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTables with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTables = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listTables(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTables as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTablesStream without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.descriptors.page.listTables.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTablesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Table[] = []; + stream.on('data', (response: protos.google.bigtable.admin.v2.Table) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTables, request) + ); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTablesStream with error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTables.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTablesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.bigtable.admin.v2.Table[] = []; + stream.on('data', (response: protos.google.bigtable.admin.v2.Table) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTables, request) + ); + assert( + (client.descriptors.page.listTables.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTables without error', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListTablesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.bigtable.admin.v2.ListTablesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + ]; + client.descriptors.page.listTables.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.bigtable.admin.v2.ITable[] = []; + const iterable = client.listTablesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTables.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listTables.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTables with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.CopyBackupRequest() + new protos.google.bigtable.admin.v2.ListTablesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.CopyBackupRequest', + '.google.bigtable.admin.v2.ListTablesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.copyBackup = stubLongRunningCall( - undefined, + client.descriptors.page.listTables.asyncIterate = stubAsyncIterationCall( undefined, expectedError ); - const [operation] = await client.copyBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.copyBackup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.copyBackup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCopyBackupProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + const iterable = client.listTablesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.bigtable.admin.v2.ITable[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCopyBackupProgress( - expectedResponse.name + assert.deepStrictEqual( + (client.descriptors.page.listTables.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCopyBackupProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError + assert( + (client.descriptors.page.listTables.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); - await assert.rejects(client.checkCopyBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listTables', () => { - it('invokes listTables without error', async () => { + describe('listAuthorizedViews', () => { + it('invokes listAuthorizedViews without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), ]; - client.innerApiCalls.listTables = stubSimpleCall(expectedResponse); - const [response] = await client.listTables(request); + client.innerApiCalls.listAuthorizedViews = + stubSimpleCall(expectedResponse); + const [response] = await client.listAuthorizedViews(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listTables as SinonStub + client.innerApiCalls.listAuthorizedViews as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTables as SinonStub + client.innerApiCalls.listAuthorizedViews as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTables without error using callback', async () => { + it('invokes listAuthorizedViews without error using callback', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), ]; - client.innerApiCalls.listTables = + client.innerApiCalls.listAuthorizedViews = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listTables( + client.listAuthorizedViews( request, ( err?: Error | null, - result?: protos.google.bigtable.admin.v2.ITable[] | null + result?: protos.google.bigtable.admin.v2.IAuthorizedView[] | null ) => { if (err) { reject(err); @@ -3686,74 +4688,83 @@ describe('v2.BigtableTableAdminClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listTables as SinonStub + client.innerApiCalls.listAuthorizedViews as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTables as SinonStub + client.innerApiCalls.listAuthorizedViews as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTables with error', async () => { + it('invokes listAuthorizedViews with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listTables = stubSimpleCall( + client.innerApiCalls.listAuthorizedViews = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listTables(request), expectedError); + await assert.rejects(client.listAuthorizedViews(request), expectedError); const actualRequest = ( - client.innerApiCalls.listTables as SinonStub + client.innerApiCalls.listAuthorizedViews as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTables as SinonStub + client.innerApiCalls.listAuthorizedViews as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTablesStream without error', async () => { + it('invokes listAuthorizedViewsStream without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), ]; - client.descriptors.page.listTables.createStream = + client.descriptors.page.listAuthorizedViews.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTablesStream(request); + const stream = client.listAuthorizedViewsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.bigtable.admin.v2.Table[] = []; - stream.on('data', (response: protos.google.bigtable.admin.v2.Table) => { - responses.push(response); - }); + const responses: protos.google.bigtable.admin.v2.AuthorizedView[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.AuthorizedView) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -3764,12 +4775,12 @@ describe('v2.BigtableTableAdminClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listTables.createStream as SinonStub) + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listTables, request) + .calledWith(client.innerApiCalls.listAuthorizedViews, request) ); assert( - (client.descriptors.page.listTables.createStream as SinonStub) + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3777,32 +4788,33 @@ describe('v2.BigtableTableAdminClient', () => { ); }); - it('invokes listTablesStream with error', async () => { + it('invokes listAuthorizedViewsStream with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listTables.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listTablesStream(request); + client.descriptors.page.listAuthorizedViews.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAuthorizedViewsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.bigtable.admin.v2.Table[] = []; - stream.on('data', (response: protos.google.bigtable.admin.v2.Table) => { - responses.push(response); - }); + const responses: protos.google.bigtable.admin.v2.AuthorizedView[] = []; + stream.on( + 'data', + (response: protos.google.bigtable.admin.v2.AuthorizedView) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -3812,12 +4824,12 @@ describe('v2.BigtableTableAdminClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listTables.createStream as SinonStub) + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listTables, request) + .calledWith(client.innerApiCalls.listAuthorizedViews, request) ); assert( - (client.descriptors.page.listTables.createStream as SinonStub) + (client.descriptors.page.listAuthorizedViews.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3825,42 +4837,48 @@ describe('v2.BigtableTableAdminClient', () => { ); }); - it('uses async iteration with listTables without error', async () => { + it('uses async iteration with listAuthorizedViews without error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), - generateSampleMessage(new protos.google.bigtable.admin.v2.Table()), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), + generateSampleMessage( + new protos.google.bigtable.admin.v2.AuthorizedView() + ), ]; - client.descriptors.page.listTables.asyncIterate = + client.descriptors.page.listAuthorizedViews.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.bigtable.admin.v2.ITable[] = []; - const iterable = client.listTablesAsync(request); + const responses: protos.google.bigtable.admin.v2.IAuthorizedView[] = []; + const iterable = client.listAuthorizedViewsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listTables.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listTables.asyncIterate as SinonStub) + (client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3868,41 +4886,39 @@ describe('v2.BigtableTableAdminClient', () => { ); }); - it('uses async iteration with listTables with error', async () => { + it('uses async iteration with listAuthorizedViews with error', async () => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.bigtable.admin.v2.ListTablesRequest() + new protos.google.bigtable.admin.v2.ListAuthorizedViewsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.bigtable.admin.v2.ListTablesRequest', + '.google.bigtable.admin.v2.ListAuthorizedViewsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listTables.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listTablesAsync(request); + client.descriptors.page.listAuthorizedViews.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAuthorizedViewsAsync(request); await assert.rejects(async () => { - const responses: protos.google.bigtable.admin.v2.ITable[] = []; + const responses: protos.google.bigtable.admin.v2.IAuthorizedView[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listTables.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listTables.asyncIterate as SinonStub) + (client.descriptors.page.listAuthorizedViews.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4582,6 +5598,83 @@ describe('v2.BigtableTableAdminClient', () => { }); }); + describe('authorizedView', () => { + const fakePath = '/rendered/path/authorizedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + authorized_view: 'authorizedViewValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.authorizedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.authorizedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('authorizedViewPath', () => { + const result = client.authorizedViewPath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'authorizedViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.authorizedViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAuthorizedViewName', () => { + const result = client.matchProjectFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromAuthorizedViewName', () => { + const result = client.matchInstanceFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTableFromAuthorizedViewName', () => { + const result = client.matchTableFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAuthorizedViewFromAuthorizedViewName', () => { + const result = + client.matchAuthorizedViewFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'authorizedViewValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('backup', () => { const fakePath = '/rendered/path/backup'; const expectedParameters = { @@ -4847,6 +5940,44 @@ describe('v2.BigtableTableAdminClient', () => { }); }); + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('snapshot', () => { const fakePath = '/rendered/path/snapshot'; const expectedParameters = { diff --git a/test/gapic_bigtable_v2.ts b/test/gapic_bigtable_v2.ts index eae52474a..a93014850 100644 --- a/test/gapic_bigtable_v2.ts +++ b/test/gapic_bigtable_v2.ts @@ -102,7 +102,7 @@ describe('v2.BigtableClient', () => { }); if ( - typeof process !== 'undefined' && + typeof process === 'object' && typeof process.emitWarning === 'function' ) { it('throws DeprecationWarning if static servicePath is used', () => { @@ -136,6 +136,38 @@ describe('v2.BigtableClient', () => { const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtable.example.com'); }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new bigtableModule.v2.BigtableClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtable.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new bigtableModule.v2.BigtableClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigtable.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { new bigtableModule.v2.BigtableClient({ @@ -241,9 +273,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.MutateRowResponse() ); @@ -269,9 +303,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.MutateRowResponse() ); @@ -313,9 +349,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedError = new Error('expected'); client.innerApiCalls.mutateRow = stubSimpleCall(undefined, expectedError); await assert.rejects(client.mutateRow(request), expectedError); @@ -338,8 +376,9 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.mutateRow(request), expectedError); @@ -356,9 +395,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.CheckAndMutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.CheckAndMutateRowResponse() ); @@ -384,9 +425,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.CheckAndMutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.CheckAndMutateRowResponse() ); @@ -428,9 +471,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.CheckAndMutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedError = new Error('expected'); client.innerApiCalls.checkAndMutateRow = stubSimpleCall( undefined, @@ -456,8 +501,9 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.CheckAndMutateRowRequest() ); - // path template is empty - request.appProfileId = 'value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.checkAndMutateRow(request), expectedError); @@ -592,9 +638,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadModifyWriteRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.ReadModifyWriteRowResponse() ); @@ -621,9 +669,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadModifyWriteRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.ReadModifyWriteRowResponse() ); @@ -665,9 +715,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadModifyWriteRowRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedError = new Error('expected'); client.innerApiCalls.readModifyWriteRow = stubSimpleCall( undefined, @@ -693,8 +745,9 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadModifyWriteRowRequest() ); - // path template is empty - request.appProfileId = 'value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.readModifyWriteRow(request), expectedError); @@ -711,9 +764,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadRowsRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.ReadRowsResponse() ); @@ -751,9 +806,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadRowsRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedError = new Error('expected'); client.innerApiCalls.readRows = stubServerStreamingCall( undefined, @@ -791,8 +848,9 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.ReadRowsRequest() ); - // path template is empty - request.appProfileId = 'value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.readRows(request, { @@ -823,9 +881,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.SampleRowKeysRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.SampleRowKeysResponse() ); @@ -864,9 +924,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.SampleRowKeysRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedError = new Error('expected'); client.innerApiCalls.sampleRowKeys = stubServerStreamingCall( undefined, @@ -904,8 +966,9 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.SampleRowKeysRequest() ); - // path template is empty - request.appProfileId = 'value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.sampleRowKeys(request, { @@ -936,9 +999,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowsRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedResponse = generateSampleMessage( new protos.google.bigtable.v2.MutateRowsResponse() ); @@ -977,9 +1042,11 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowsRequest() ); - // path template is empty - request.appProfileId = 'value'; - const expectedHeaderRequestParams = 'app_profile_id=value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; + const expectedHeaderRequestParams = + 'authorized_view_name=projects%2Fvalue%2Finstances%2Fvalue%2Ftables%2Fvalue%2FauthorizedViews%2Fvalue'; const expectedError = new Error('expected'); client.innerApiCalls.mutateRows = stubServerStreamingCall( undefined, @@ -1017,8 +1084,9 @@ describe('v2.BigtableClient', () => { const request = generateSampleMessage( new protos.google.bigtable.v2.MutateRowsRequest() ); - // path template is empty - request.appProfileId = 'value'; + // path template: {authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*} + request.authorizedViewName = + 'projects/value/instances/value/tables/value/authorizedViews/value'; const expectedError = new Error('The client has already been closed.'); client.close(); const stream = client.mutateRows(request, { @@ -1288,6 +1356,83 @@ describe('v2.BigtableClient', () => { }); describe('Path templates', () => { + describe('authorizedView', () => { + const fakePath = '/rendered/path/authorizedView'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + table: 'tableValue', + authorized_view: 'authorizedViewValue', + }; + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.authorizedViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.authorizedViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('authorizedViewPath', () => { + const result = client.authorizedViewPath( + 'projectValue', + 'instanceValue', + 'tableValue', + 'authorizedViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.authorizedViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAuthorizedViewName', () => { + const result = client.matchProjectFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromAuthorizedViewName', () => { + const result = client.matchInstanceFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTableFromAuthorizedViewName', () => { + const result = client.matchTableFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'tableValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAuthorizedViewFromAuthorizedViewName', () => { + const result = + client.matchAuthorizedViewFromAuthorizedViewName(fakePath); + assert.strictEqual(result, 'authorizedViewValue'); + assert( + (client.pathTemplates.authorizedViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('instance', () => { const fakePath = '/rendered/path/instance'; const expectedParameters = { From 7cf8656d113dc9017a2358ff4bc18390c58cd7cf Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 12 Apr 2024 22:18:49 +0200 Subject: [PATCH 5/7] chore(deps): update dependency @types/escape-string-regexp to v2 (#1393) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e2d636d96..b91c07c5b 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "devDependencies": { "@grpc/grpc-js": "^1.9.0", "@grpc/proto-loader": "^0.7.3", - "@types/escape-string-regexp": "^1.0.0", + "@types/escape-string-regexp": "^2.0.0", "@types/extend": "^3.0.1", "@types/is": "0.0.25", "@types/lodash.snakecase": "^4.1.5", From d810285834dd16568bcd9072f2c72ef8afdac10c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 12 Apr 2024 23:10:14 +0200 Subject: [PATCH 6/7] chore(deps): update dependency gapic-tools to ^0.2.0 (#1329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency gapic-tools to ^0.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: danieljbruce --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b91c07c5b..b699db7e5 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@types/uuid": "^9.0.0", "c8": "^9.0.0", "codecov": "^3.6.5", - "gapic-tools": "^0.1.8", + "gapic-tools": "^0.2.0", "gts": "^5.0.0", "jsdoc": "^4.0.2", "jsdoc-fresh": "^3.0.0", From 3f5db964062502cd70235714eb7b5fb62a211d4f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 16 Apr 2024 15:45:36 +0200 Subject: [PATCH 7/7] chore(deps): update dependency gapic-tools to ^0.4.0 (#1402) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b699db7e5..b351af5f1 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@types/uuid": "^9.0.0", "c8": "^9.0.0", "codecov": "^3.6.5", - "gapic-tools": "^0.2.0", + "gapic-tools": "^0.4.0", "gts": "^5.0.0", "jsdoc": "^4.0.2", "jsdoc-fresh": "^3.0.0",
include:samples/generated/v2/bigtable_table_admin.create_backup.jsinclude:samples/generated/v2/bigtable_table_admin.update_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.update_authorized_view.jsinclude:samples/generated/v2/bigtable_table_admin.snapshot_table.jsinclude:samples/generated/v2/bigtable_table_admin.snapshot_table.jsinclude:samples/generated/v2/bigtable_table_admin.create_backup.jsinclude:samples/generated/v2/bigtable_table_admin.list_authorized_views.js