From e3152206bc1707ab1f556e988ab5c33d002d07b5 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:13:37 +0000 Subject: [PATCH 01/20] feat: update from selective gapic updates --- README.md | 6 +- protos/google/bigtable/v2/feature_flags.proto | 3 + protos/google/bigtable/v2/peer_info.proto | 77 +++ .../google/bigtable/v2/response_params.proto | 3 + protos/google/cloud/common_resources.proto | 2 +- protos/protos.d.ts | 148 ++++++ protos/protos.js | 467 ++++++++++++++++++ protos/protos.json | 54 ++ .../v2/bigtable_instance_admin_client.ts | 3 - src/admin/v2/bigtable_table_admin_client.ts | 5 +- src/v2/bigtable_client.ts | 25 +- src/v2/bigtable_proto_list.json | 1 + 12 files changed, 781 insertions(+), 13 deletions(-) create mode 100644 protos/google/bigtable/v2/peer_info.proto diff --git a/README.md b/README.md index 19cb238bc..896aa0044 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # [Cloud Bigtable: Node.js Client](https://github.com/googleapis/nodejs-bigtable) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.com/package/@google-cloud/bigtable) +[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.org/package/@google-cloud/bigtable) @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Bigtable API][enable_api]. -1. [Set up authentication][auth] so you can access the +1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. ### Installing the client library @@ -167,4 +167,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-bigtable/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/protos/google/bigtable/v2/feature_flags.proto b/protos/google/bigtable/v2/feature_flags.proto index 3dfd36055..9bf078e6e 100644 --- a/protos/google/bigtable/v2/feature_flags.proto +++ b/protos/google/bigtable/v2/feature_flags.proto @@ -67,4 +67,7 @@ message FeatureFlags { // Notify the server that the client explicitly opted in for Direct Access. bool direct_access_requested = 10; + + // If the client can support using BigtablePeerInfo. + bool peer_info = 11; } diff --git a/protos/google/bigtable/v2/peer_info.proto b/protos/google/bigtable/v2/peer_info.proto new file mode 100644 index 000000000..357af8216 --- /dev/null +++ b/protos/google/bigtable/v2/peer_info.proto @@ -0,0 +1,77 @@ +// Copyright 2025 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.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "PeerInfoProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// PeerInfo contains information about the peer that the client is +// connecting to. +message PeerInfo { + // The transport type that the client used to connect to this peer. + enum TransportType { + // The transport type is unknown. + TRANSPORT_TYPE_UNKNOWN = 0; + + // The client connected to this peer via an external network + // (e.g. outside Google Coud). + TRANSPORT_TYPE_EXTERNAL = 1; + + // The client connected to this peer via CloudPath. + TRANSPORT_TYPE_CLOUD_PATH = 2; + + // The client connected to this peer via DirectAccess. + TRANSPORT_TYPE_DIRECT_ACCESS = 3; + + // The client connected to this peer via Bigtable Sessions using an unknown + // transport type. + TRANSPORT_TYPE_SESSION_UNKNOWN = 4; + + // The client connected to this peer via Bigtable Sessions on an external + // network (e.g. outside Google Cloud). + TRANSPORT_TYPE_SESSION_EXTERNAL = 5; + + // The client connected to this peer via Bigtable Sessions using CloudPath. + TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6; + + // The client connected to this peer via Bigtable Sessions using + // DirectAccess. + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7; + } + + // An opaque identifier for the Google Frontend which serviced this request. + // Only set when not using DirectAccess. + int64 google_frontend_id = 1; + + // An opaque identifier for the application frontend which serviced this + // request. + int64 application_frontend_id = 2; + + // The Cloud zone of the application frontend that served this request. + string application_frontend_zone = 3; + + // The subzone of the application frontend that served this request, e.g. an + // identifier for where within the zone the application frontend is. + string application_frontend_subzone = 4; + + TransportType transport_type = 5; +} diff --git a/protos/google/bigtable/v2/response_params.proto b/protos/google/bigtable/v2/response_params.proto index 076ddbd1b..6eedfdf73 100644 --- a/protos/google/bigtable/v2/response_params.proto +++ b/protos/google/bigtable/v2/response_params.proto @@ -32,4 +32,7 @@ message ResponseParams { // Identifier for a cluster that represents set of // bigtable resources. optional string cluster_id = 2; + + // The AFE ID for the AFE that is served this request. + optional int64 afe_id = 3; } diff --git a/protos/google/cloud/common_resources.proto b/protos/google/cloud/common_resources.proto index 56c9f800d..cd44c5474 100644 --- a/protos/google/cloud/common_resources.proto +++ b/protos/google/cloud/common_resources.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 74fb0050c..4585f583b 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -30654,6 +30654,9 @@ export namespace google { /** FeatureFlags directAccessRequested */ directAccessRequested?: (boolean|null); + + /** FeatureFlags peerInfo */ + peerInfo?: (boolean|null); } /** Represents a FeatureFlags. */ @@ -30692,6 +30695,9 @@ export namespace google { /** FeatureFlags directAccessRequested. */ public directAccessRequested: boolean; + /** FeatureFlags peerInfo. */ + public peerInfo: boolean; + /** * Creates a new FeatureFlags instance using the specified properties. * @param [properties] Properties to set @@ -30770,6 +30776,142 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PeerInfo. */ + interface IPeerInfo { + + /** PeerInfo googleFrontendId */ + googleFrontendId?: (number|Long|string|null); + + /** PeerInfo applicationFrontendId */ + applicationFrontendId?: (number|Long|string|null); + + /** PeerInfo applicationFrontendZone */ + applicationFrontendZone?: (string|null); + + /** PeerInfo applicationFrontendSubzone */ + applicationFrontendSubzone?: (string|null); + + /** PeerInfo transportType */ + transportType?: (google.bigtable.v2.PeerInfo.TransportType|keyof typeof google.bigtable.v2.PeerInfo.TransportType|null); + } + + /** Represents a PeerInfo. */ + class PeerInfo implements IPeerInfo { + + /** + * Constructs a new PeerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPeerInfo); + + /** PeerInfo googleFrontendId. */ + public googleFrontendId: (number|Long|string); + + /** PeerInfo applicationFrontendId. */ + public applicationFrontendId: (number|Long|string); + + /** PeerInfo applicationFrontendZone. */ + public applicationFrontendZone: string; + + /** PeerInfo applicationFrontendSubzone. */ + public applicationFrontendSubzone: string; + + /** PeerInfo transportType. */ + public transportType: (google.bigtable.v2.PeerInfo.TransportType|keyof typeof google.bigtable.v2.PeerInfo.TransportType); + + /** + * Creates a new PeerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PeerInfo instance + */ + public static create(properties?: google.bigtable.v2.IPeerInfo): google.bigtable.v2.PeerInfo; + + /** + * Encodes the specified PeerInfo message. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @param message PeerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPeerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PeerInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @param message PeerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPeerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PeerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PeerInfo + * @throws {Error} If the payload is 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.PeerInfo; + + /** + * Decodes a PeerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PeerInfo + * @throws {Error} If the 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.PeerInfo; + + /** + * Verifies a PeerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PeerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PeerInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PeerInfo; + + /** + * Creates a plain object from a PeerInfo message. Also converts values to other types if specified. + * @param message PeerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PeerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PeerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PeerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PeerInfo { + + /** TransportType enum. */ + enum TransportType { + TRANSPORT_TYPE_UNKNOWN = 0, + TRANSPORT_TYPE_EXTERNAL = 1, + TRANSPORT_TYPE_CLOUD_PATH = 2, + TRANSPORT_TYPE_DIRECT_ACCESS = 3, + TRANSPORT_TYPE_SESSION_UNKNOWN = 4, + TRANSPORT_TYPE_SESSION_EXTERNAL = 5, + TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6, + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7 + } + } + /** Properties of a ResponseParams. */ interface IResponseParams { @@ -30778,6 +30920,9 @@ export namespace google { /** ResponseParams clusterId */ clusterId?: (string|null); + + /** ResponseParams afeId */ + afeId?: (number|Long|string|null); } /** Represents a ResponseParams. */ @@ -30795,6 +30940,9 @@ export namespace google { /** ResponseParams clusterId. */ public clusterId?: (string|null); + /** ResponseParams afeId. */ + public afeId?: (number|Long|string|null); + /** * Creates a new ResponseParams instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 96a130688..5e291c9bb 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -73030,6 +73030,7 @@ * @property {boolean|null} [clientSideMetricsEnabled] FeatureFlags clientSideMetricsEnabled * @property {boolean|null} [trafficDirectorEnabled] FeatureFlags trafficDirectorEnabled * @property {boolean|null} [directAccessRequested] FeatureFlags directAccessRequested + * @property {boolean|null} [peerInfo] FeatureFlags peerInfo */ /** @@ -73119,6 +73120,14 @@ */ FeatureFlags.prototype.directAccessRequested = false; + /** + * FeatureFlags peerInfo. + * @member {boolean} peerInfo + * @memberof google.bigtable.v2.FeatureFlags + * @instance + */ + FeatureFlags.prototype.peerInfo = false; + /** * Creates a new FeatureFlags instance using the specified properties. * @function create @@ -73161,6 +73170,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).bool(message.trafficDirectorEnabled); if (message.directAccessRequested != null && Object.hasOwnProperty.call(message, "directAccessRequested")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.directAccessRequested); + if (message.peerInfo != null && Object.hasOwnProperty.call(message, "peerInfo")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.peerInfo); return writer; }; @@ -73233,6 +73244,10 @@ message.directAccessRequested = reader.bool(); break; } + case 11: { + message.peerInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -73295,6 +73310,9 @@ if (message.directAccessRequested != null && message.hasOwnProperty("directAccessRequested")) if (typeof message.directAccessRequested !== "boolean") return "directAccessRequested: boolean expected"; + if (message.peerInfo != null && message.hasOwnProperty("peerInfo")) + if (typeof message.peerInfo !== "boolean") + return "peerInfo: boolean expected"; return null; }; @@ -73328,6 +73346,8 @@ message.trafficDirectorEnabled = Boolean(object.trafficDirectorEnabled); if (object.directAccessRequested != null) message.directAccessRequested = Boolean(object.directAccessRequested); + if (object.peerInfo != null) + message.peerInfo = Boolean(object.peerInfo); return message; }; @@ -73354,6 +73374,7 @@ object.clientSideMetricsEnabled = false; object.trafficDirectorEnabled = false; object.directAccessRequested = false; + object.peerInfo = false; } if (message.reverseScans != null && message.hasOwnProperty("reverseScans")) object.reverseScans = message.reverseScans; @@ -73373,6 +73394,8 @@ object.trafficDirectorEnabled = message.trafficDirectorEnabled; if (message.directAccessRequested != null && message.hasOwnProperty("directAccessRequested")) object.directAccessRequested = message.directAccessRequested; + if (message.peerInfo != null && message.hasOwnProperty("peerInfo")) + object.peerInfo = message.peerInfo; return object; }; @@ -73405,6 +73428,407 @@ return FeatureFlags; })(); + v2.PeerInfo = (function() { + + /** + * Properties of a PeerInfo. + * @memberof google.bigtable.v2 + * @interface IPeerInfo + * @property {number|Long|null} [googleFrontendId] PeerInfo googleFrontendId + * @property {number|Long|null} [applicationFrontendId] PeerInfo applicationFrontendId + * @property {string|null} [applicationFrontendZone] PeerInfo applicationFrontendZone + * @property {string|null} [applicationFrontendSubzone] PeerInfo applicationFrontendSubzone + * @property {google.bigtable.v2.PeerInfo.TransportType|null} [transportType] PeerInfo transportType + */ + + /** + * Constructs a new PeerInfo. + * @memberof google.bigtable.v2 + * @classdesc Represents a PeerInfo. + * @implements IPeerInfo + * @constructor + * @param {google.bigtable.v2.IPeerInfo=} [properties] Properties to set + */ + function PeerInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PeerInfo googleFrontendId. + * @member {number|Long} googleFrontendId + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.googleFrontendId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PeerInfo applicationFrontendId. + * @member {number|Long} applicationFrontendId + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PeerInfo applicationFrontendZone. + * @member {string} applicationFrontendZone + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendZone = ""; + + /** + * PeerInfo applicationFrontendSubzone. + * @member {string} applicationFrontendSubzone + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.applicationFrontendSubzone = ""; + + /** + * PeerInfo transportType. + * @member {google.bigtable.v2.PeerInfo.TransportType} transportType + * @memberof google.bigtable.v2.PeerInfo + * @instance + */ + PeerInfo.prototype.transportType = 0; + + /** + * Creates a new PeerInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.IPeerInfo=} [properties] Properties to set + * @returns {google.bigtable.v2.PeerInfo} PeerInfo instance + */ + PeerInfo.create = function create(properties) { + return new PeerInfo(properties); + }; + + /** + * Encodes the specified PeerInfo message. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.IPeerInfo} message PeerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleFrontendId != null && Object.hasOwnProperty.call(message, "googleFrontendId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.googleFrontendId); + if (message.applicationFrontendId != null && Object.hasOwnProperty.call(message, "applicationFrontendId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.applicationFrontendId); + if (message.applicationFrontendZone != null && Object.hasOwnProperty.call(message, "applicationFrontendZone")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.applicationFrontendZone); + if (message.applicationFrontendSubzone != null && Object.hasOwnProperty.call(message, "applicationFrontendSubzone")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationFrontendSubzone); + if (message.transportType != null && Object.hasOwnProperty.call(message, "transportType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.transportType); + return writer; + }; + + /** + * Encodes the specified PeerInfo message, length delimited. Does not implicitly {@link google.bigtable.v2.PeerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.IPeerInfo} message PeerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PeerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PeerInfo} PeerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeerInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PeerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.googleFrontendId = reader.int64(); + break; + } + case 2: { + message.applicationFrontendId = reader.int64(); + break; + } + case 3: { + message.applicationFrontendZone = reader.string(); + break; + } + case 4: { + message.applicationFrontendSubzone = reader.string(); + break; + } + case 5: { + message.transportType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PeerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PeerInfo} PeerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PeerInfo message. + * @function verify + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PeerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleFrontendId != null && message.hasOwnProperty("googleFrontendId")) + if (!$util.isInteger(message.googleFrontendId) && !(message.googleFrontendId && $util.isInteger(message.googleFrontendId.low) && $util.isInteger(message.googleFrontendId.high))) + return "googleFrontendId: integer|Long expected"; + if (message.applicationFrontendId != null && message.hasOwnProperty("applicationFrontendId")) + if (!$util.isInteger(message.applicationFrontendId) && !(message.applicationFrontendId && $util.isInteger(message.applicationFrontendId.low) && $util.isInteger(message.applicationFrontendId.high))) + return "applicationFrontendId: integer|Long expected"; + if (message.applicationFrontendZone != null && message.hasOwnProperty("applicationFrontendZone")) + if (!$util.isString(message.applicationFrontendZone)) + return "applicationFrontendZone: string expected"; + if (message.applicationFrontendSubzone != null && message.hasOwnProperty("applicationFrontendSubzone")) + if (!$util.isString(message.applicationFrontendSubzone)) + return "applicationFrontendSubzone: string expected"; + if (message.transportType != null && message.hasOwnProperty("transportType")) + switch (message.transportType) { + default: + return "transportType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a PeerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PeerInfo} PeerInfo + */ + PeerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.PeerInfo) + return object; + var message = new $root.google.bigtable.v2.PeerInfo(); + if (object.googleFrontendId != null) + if ($util.Long) + (message.googleFrontendId = $util.Long.fromValue(object.googleFrontendId)).unsigned = false; + else if (typeof object.googleFrontendId === "string") + message.googleFrontendId = parseInt(object.googleFrontendId, 10); + else if (typeof object.googleFrontendId === "number") + message.googleFrontendId = object.googleFrontendId; + else if (typeof object.googleFrontendId === "object") + message.googleFrontendId = new $util.LongBits(object.googleFrontendId.low >>> 0, object.googleFrontendId.high >>> 0).toNumber(); + if (object.applicationFrontendId != null) + if ($util.Long) + (message.applicationFrontendId = $util.Long.fromValue(object.applicationFrontendId)).unsigned = false; + else if (typeof object.applicationFrontendId === "string") + message.applicationFrontendId = parseInt(object.applicationFrontendId, 10); + else if (typeof object.applicationFrontendId === "number") + message.applicationFrontendId = object.applicationFrontendId; + else if (typeof object.applicationFrontendId === "object") + message.applicationFrontendId = new $util.LongBits(object.applicationFrontendId.low >>> 0, object.applicationFrontendId.high >>> 0).toNumber(); + if (object.applicationFrontendZone != null) + message.applicationFrontendZone = String(object.applicationFrontendZone); + if (object.applicationFrontendSubzone != null) + message.applicationFrontendSubzone = String(object.applicationFrontendSubzone); + switch (object.transportType) { + default: + if (typeof object.transportType === "number") { + message.transportType = object.transportType; + break; + } + break; + case "TRANSPORT_TYPE_UNKNOWN": + case 0: + message.transportType = 0; + break; + case "TRANSPORT_TYPE_EXTERNAL": + case 1: + message.transportType = 1; + break; + case "TRANSPORT_TYPE_CLOUD_PATH": + case 2: + message.transportType = 2; + break; + case "TRANSPORT_TYPE_DIRECT_ACCESS": + case 3: + message.transportType = 3; + break; + case "TRANSPORT_TYPE_SESSION_UNKNOWN": + case 4: + message.transportType = 4; + break; + case "TRANSPORT_TYPE_SESSION_EXTERNAL": + case 5: + message.transportType = 5; + break; + case "TRANSPORT_TYPE_SESSION_CLOUD_PATH": + case 6: + message.transportType = 6; + break; + case "TRANSPORT_TYPE_SESSION_DIRECT_ACCESS": + case 7: + message.transportType = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a PeerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {google.bigtable.v2.PeerInfo} message PeerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PeerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.googleFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.googleFrontendId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationFrontendId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applicationFrontendId = options.longs === String ? "0" : 0; + object.applicationFrontendZone = ""; + object.applicationFrontendSubzone = ""; + object.transportType = options.enums === String ? "TRANSPORT_TYPE_UNKNOWN" : 0; + } + if (message.googleFrontendId != null && message.hasOwnProperty("googleFrontendId")) + if (typeof message.googleFrontendId === "number") + object.googleFrontendId = options.longs === String ? String(message.googleFrontendId) : message.googleFrontendId; + else + object.googleFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.googleFrontendId) : options.longs === Number ? new $util.LongBits(message.googleFrontendId.low >>> 0, message.googleFrontendId.high >>> 0).toNumber() : message.googleFrontendId; + if (message.applicationFrontendId != null && message.hasOwnProperty("applicationFrontendId")) + if (typeof message.applicationFrontendId === "number") + object.applicationFrontendId = options.longs === String ? String(message.applicationFrontendId) : message.applicationFrontendId; + else + object.applicationFrontendId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationFrontendId) : options.longs === Number ? new $util.LongBits(message.applicationFrontendId.low >>> 0, message.applicationFrontendId.high >>> 0).toNumber() : message.applicationFrontendId; + if (message.applicationFrontendZone != null && message.hasOwnProperty("applicationFrontendZone")) + object.applicationFrontendZone = message.applicationFrontendZone; + if (message.applicationFrontendSubzone != null && message.hasOwnProperty("applicationFrontendSubzone")) + object.applicationFrontendSubzone = message.applicationFrontendSubzone; + if (message.transportType != null && message.hasOwnProperty("transportType")) + object.transportType = options.enums === String ? $root.google.bigtable.v2.PeerInfo.TransportType[message.transportType] === undefined ? message.transportType : $root.google.bigtable.v2.PeerInfo.TransportType[message.transportType] : message.transportType; + return object; + }; + + /** + * Converts this PeerInfo to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PeerInfo + * @instance + * @returns {Object.} JSON object + */ + PeerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PeerInfo + * @function getTypeUrl + * @memberof google.bigtable.v2.PeerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PeerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.bigtable.v2.PeerInfo"; + }; + + /** + * TransportType enum. + * @name google.bigtable.v2.PeerInfo.TransportType + * @enum {number} + * @property {number} TRANSPORT_TYPE_UNKNOWN=0 TRANSPORT_TYPE_UNKNOWN value + * @property {number} TRANSPORT_TYPE_EXTERNAL=1 TRANSPORT_TYPE_EXTERNAL value + * @property {number} TRANSPORT_TYPE_CLOUD_PATH=2 TRANSPORT_TYPE_CLOUD_PATH value + * @property {number} TRANSPORT_TYPE_DIRECT_ACCESS=3 TRANSPORT_TYPE_DIRECT_ACCESS value + * @property {number} TRANSPORT_TYPE_SESSION_UNKNOWN=4 TRANSPORT_TYPE_SESSION_UNKNOWN value + * @property {number} TRANSPORT_TYPE_SESSION_EXTERNAL=5 TRANSPORT_TYPE_SESSION_EXTERNAL value + * @property {number} TRANSPORT_TYPE_SESSION_CLOUD_PATH=6 TRANSPORT_TYPE_SESSION_CLOUD_PATH value + * @property {number} TRANSPORT_TYPE_SESSION_DIRECT_ACCESS=7 TRANSPORT_TYPE_SESSION_DIRECT_ACCESS value + */ + PeerInfo.TransportType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSPORT_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TRANSPORT_TYPE_EXTERNAL"] = 1; + values[valuesById[2] = "TRANSPORT_TYPE_CLOUD_PATH"] = 2; + values[valuesById[3] = "TRANSPORT_TYPE_DIRECT_ACCESS"] = 3; + values[valuesById[4] = "TRANSPORT_TYPE_SESSION_UNKNOWN"] = 4; + values[valuesById[5] = "TRANSPORT_TYPE_SESSION_EXTERNAL"] = 5; + values[valuesById[6] = "TRANSPORT_TYPE_SESSION_CLOUD_PATH"] = 6; + values[valuesById[7] = "TRANSPORT_TYPE_SESSION_DIRECT_ACCESS"] = 7; + return values; + })(); + + return PeerInfo; + })(); + v2.ResponseParams = (function() { /** @@ -73413,6 +73837,7 @@ * @interface IResponseParams * @property {string|null} [zoneId] ResponseParams zoneId * @property {string|null} [clusterId] ResponseParams clusterId + * @property {number|Long|null} [afeId] ResponseParams afeId */ /** @@ -73446,6 +73871,14 @@ */ ResponseParams.prototype.clusterId = null; + /** + * ResponseParams afeId. + * @member {number|Long|null|undefined} afeId + * @memberof google.bigtable.v2.ResponseParams + * @instance + */ + ResponseParams.prototype.afeId = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -73461,6 +73894,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(ResponseParams.prototype, "_afeId", { + get: $util.oneOfGetter($oneOfFields = ["afeId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ResponseParams instance using the specified properties. * @function create @@ -73489,6 +73928,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.zoneId); if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterId); + if (message.afeId != null && Object.hasOwnProperty.call(message, "afeId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.afeId); return writer; }; @@ -73533,6 +73974,10 @@ message.clusterId = reader.string(); break; } + case 3: { + message.afeId = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -73579,6 +74024,11 @@ if (!$util.isString(message.clusterId)) return "clusterId: string expected"; } + if (message.afeId != null && message.hasOwnProperty("afeId")) { + properties._afeId = 1; + if (!$util.isInteger(message.afeId) && !(message.afeId && $util.isInteger(message.afeId.low) && $util.isInteger(message.afeId.high))) + return "afeId: integer|Long expected"; + } return null; }; @@ -73598,6 +74048,15 @@ message.zoneId = String(object.zoneId); if (object.clusterId != null) message.clusterId = String(object.clusterId); + if (object.afeId != null) + if ($util.Long) + (message.afeId = $util.Long.fromValue(object.afeId)).unsigned = false; + else if (typeof object.afeId === "string") + message.afeId = parseInt(object.afeId, 10); + else if (typeof object.afeId === "number") + message.afeId = object.afeId; + else if (typeof object.afeId === "object") + message.afeId = new $util.LongBits(object.afeId.low >>> 0, object.afeId.high >>> 0).toNumber(); return message; }; @@ -73624,6 +74083,14 @@ if (options.oneofs) object._clusterId = "clusterId"; } + if (message.afeId != null && message.hasOwnProperty("afeId")) { + if (typeof message.afeId === "number") + object.afeId = options.longs === String ? String(message.afeId) : message.afeId; + else + object.afeId = options.longs === String ? $util.Long.prototype.toString.call(message.afeId) : options.longs === Number ? new $util.LongBits(message.afeId.low >>> 0, message.afeId.high >>> 0).toNumber() : message.afeId; + if (options.oneofs) + object._afeId = "afeId"; + } return object; }; diff --git a/protos/protos.json b/protos/protos.json index 08d9a3a21..7eacb803c 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -7366,6 +7366,48 @@ "directAccessRequested": { "type": "bool", "id": 10 + }, + "peerInfo": { + "type": "bool", + "id": 11 + } + } + }, + "PeerInfo": { + "fields": { + "googleFrontendId": { + "type": "int64", + "id": 1 + }, + "applicationFrontendId": { + "type": "int64", + "id": 2 + }, + "applicationFrontendZone": { + "type": "string", + "id": 3 + }, + "applicationFrontendSubzone": { + "type": "string", + "id": 4 + }, + "transportType": { + "type": "TransportType", + "id": 5 + } + }, + "nested": { + "TransportType": { + "values": { + "TRANSPORT_TYPE_UNKNOWN": 0, + "TRANSPORT_TYPE_EXTERNAL": 1, + "TRANSPORT_TYPE_CLOUD_PATH": 2, + "TRANSPORT_TYPE_DIRECT_ACCESS": 3, + "TRANSPORT_TYPE_SESSION_UNKNOWN": 4, + "TRANSPORT_TYPE_SESSION_EXTERNAL": 5, + "TRANSPORT_TYPE_SESSION_CLOUD_PATH": 6, + "TRANSPORT_TYPE_SESSION_DIRECT_ACCESS": 7 + } } } }, @@ -7380,6 +7422,11 @@ "oneof": [ "clusterId" ] + }, + "_afeId": { + "oneof": [ + "afeId" + ] } }, "fields": { @@ -7396,6 +7443,13 @@ "options": { "proto3_optional": true } + }, + "afeId": { + "type": "int64", + "id": 3, + "options": { + "proto3_optional": true + } } } } diff --git a/src/admin/v2/bigtable_instance_admin_client.ts b/src/admin/v2/bigtable_instance_admin_client.ts index 18251284e..504946961 100644 --- a/src/admin/v2/bigtable_instance_admin_client.ts +++ b/src/admin/v2/bigtable_instance_admin_client.ts @@ -150,9 +150,6 @@ export class BigtableInstanceAdminClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - // Request numeric enum values if REST transport is used. - 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 !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/src/admin/v2/bigtable_table_admin_client.ts b/src/admin/v2/bigtable_table_admin_client.ts index a654d5df8..2d113f85d 100644 --- a/src/admin/v2/bigtable_table_admin_client.ts +++ b/src/admin/v2/bigtable_table_admin_client.ts @@ -151,9 +151,6 @@ export class BigtableTableAdminClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - // Request numeric enum values if REST transport is used. - 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 !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -4555,6 +4552,8 @@ export class BigtableTableAdminClient { >; } /** + * @internal WARNING: This method is internal to the bigtableadmin_v2 api and should not be used by clients. + * * Create a new table by restoring from a completed backup. The * returned table {@link protos.google.longrunning.Operation|long-running operation} can * be used to track the progress of the operation, and to cancel it. The diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index 1782b4f9e..9768482a4 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -142,9 +142,6 @@ export class BigtableClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - // Request numeric enum values if REST transport is used. - 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 !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -480,6 +477,8 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.MutateRowResponse|MutateRowResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.mutate_row.js + * region_tag:bigtable_v2_generated_Bigtable_MutateRow_async */ mutateRow( request?: protos.google.bigtable.v2.IMutateRowRequest, @@ -678,6 +677,8 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.CheckAndMutateRowResponse|CheckAndMutateRowResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.check_and_mutate_row.js + * region_tag:bigtable_v2_generated_Bigtable_CheckAndMutateRow_async */ checkAndMutateRow( request?: protos.google.bigtable.v2.ICheckAndMutateRowRequest, @@ -853,6 +854,8 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.PingAndWarmResponse|PingAndWarmResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.ping_and_warm.js + * region_tag:bigtable_v2_generated_Bigtable_PingAndWarm_async */ pingAndWarm( request?: protos.google.bigtable.v2.IPingAndWarmRequest, @@ -1023,6 +1026,8 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.ReadModifyWriteRowResponse|ReadModifyWriteRowResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.read_modify_write_row.js + * region_tag:bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async */ readModifyWriteRow( request?: protos.google.bigtable.v2.IReadModifyWriteRowRequest, @@ -1216,6 +1221,8 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.PrepareQueryResponse|PrepareQueryResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.prepare_query.js + * region_tag:bigtable_v2_generated_Bigtable_PrepareQuery_async */ prepareQuery( request?: protos.google.bigtable.v2.IPrepareQueryRequest, @@ -1406,6 +1413,8 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.ReadRowsResponse|ReadRowsResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.read_rows.js + * region_tag:bigtable_v2_generated_Bigtable_ReadRows_async */ readRows( request?: protos.google.bigtable.v2.IReadRowsRequest, @@ -1514,6 +1523,8 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.SampleRowKeysResponse|SampleRowKeysResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.sample_row_keys.js + * region_tag:bigtable_v2_generated_Bigtable_SampleRowKeys_async */ sampleRowKeys( request?: protos.google.bigtable.v2.ISampleRowKeysRequest, @@ -1623,6 +1634,8 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.MutateRowsResponse|MutateRowsResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.mutate_rows.js + * region_tag:bigtable_v2_generated_Bigtable_MutateRows_async */ mutateRows( request?: protos.google.bigtable.v2.IMutateRowsRequest, @@ -1709,6 +1722,8 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse|GenerateInitialChangeStreamPartitionsResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js + * region_tag:bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async */ generateInitialChangeStreamPartitions( request?: protos.google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, @@ -1780,6 +1795,8 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.ReadChangeStreamResponse|ReadChangeStreamResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.read_change_stream.js + * region_tag:bigtable_v2_generated_Bigtable_ReadChangeStream_async */ readChangeStream( request?: protos.google.bigtable.v2.IReadChangeStreamRequest, @@ -1868,6 +1885,8 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.ExecuteQueryResponse|ExecuteQueryResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. + * @example include:samples/generated/v2/bigtable.execute_query.js + * region_tag:bigtable_v2_generated_Bigtable_ExecuteQuery_async */ executeQuery( request?: protos.google.bigtable.v2.IExecuteQueryRequest, diff --git a/src/v2/bigtable_proto_list.json b/src/v2/bigtable_proto_list.json index f09278289..da64d9b04 100644 --- a/src/v2/bigtable_proto_list.json +++ b/src/v2/bigtable_proto_list.json @@ -2,6 +2,7 @@ "../../protos/google/bigtable/v2/bigtable.proto", "../../protos/google/bigtable/v2/data.proto", "../../protos/google/bigtable/v2/feature_flags.proto", + "../../protos/google/bigtable/v2/peer_info.proto", "../../protos/google/bigtable/v2/request_stats.proto", "../../protos/google/bigtable/v2/response_params.proto", "../../protos/google/bigtable/v2/types.proto" From af2380d7952c38a1157952a3e0c04de39c07a236 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Fri, 14 Nov 2025 18:22:23 -0500 Subject: [PATCH 02/20] feat: work in progress on updated admin tools --- src/admin/gc-rule-builder.ts | 193 +++++++++++++++++++++++++++++++++++ src/admin/index.ts | 3 + src/admin/instance.ts | 30 ++++++ src/admin/table.ts | 30 ++++++ src/gc-rule-maker.ts | 89 ---------------- src/index.ts | 9 +- 6 files changed, 264 insertions(+), 90 deletions(-) create mode 100644 src/admin/gc-rule-builder.ts create mode 100644 src/admin/instance.ts create mode 100644 src/admin/table.ts delete mode 100644 src/gc-rule-maker.ts diff --git a/src/admin/gc-rule-builder.ts b/src/admin/gc-rule-builder.ts new file mode 100644 index 000000000..ab7bb43db --- /dev/null +++ b/src/admin/gc-rule-builder.ts @@ -0,0 +1,193 @@ +// Copyright 2025 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. + +import {google} from '../../protos/protos'; + +export type IGcRule = google.bigtable.admin.v2.IGcRule; +export type IDuration = google.protobuf.IDuration; + +export class GcRuleBuilder { + parameters: IGcRule; + + static new(parameters: IGcRule = {}): GcRuleBuilder { + return new GcRuleBuilder(parameters); + } + + // We want this to be able to keep working even if more rule parameters are + // added later via autogen. So what this does is assume that we have possible + // values of {intersection | union} that must be empty, and everything else + // is a GC rule parameter, of which only one should be present per rule. + constructor(parameters: IGcRule) { + this.parameters = Object.assign({}, parameters); + + // We only want basic parameters, not the rules themselves. + if (this.parameters.intersection || this.parameters.union) { + throw new Error( + 'union and intersection parameters must be specified through builder methods', + ); + } + + // Make sure there's only one rule specified in the parameters. + const count = this.numParams; + if (count > 1) { + throw new Error( + `only one parameter may be specified per rule (${this.parameters})`, + ); + } + } + + get numParams(): number { + let count = 0; + const paramObj = this.parameters as unknown as Record; + for (const n of Object.keys(this.parameters)) { + if (n === 'union' || n === 'intersection') { + continue; + } + + if (paramObj[n]) { + count++; + } + } + + return count; + } + + intersection(...subRules: GcRuleBuilder[]): GcRuleBuilder { + if (this.parameters.intersection || this.parameters.union) { + throw new Error( + `builder already has ${this.parameters.intersection ? 'an intersection' : 'a union'} `, + ); + } + if (subRules.length < 2) { + throw new Error( + `an intersection must pass at least 2 rules (${subRules.length} passed)`, + ); + } + + this.parameters.intersection = { + rules: subRules.map(r => r.build()), + }; + + return this; + } + + union(...subRules: GcRuleBuilder[]): GcRuleBuilder { + if (this.parameters.intersection || this.parameters.union) { + throw new Error( + `builder already has ${this.parameters.intersection ? 'an intersection' : 'a union'} `, + ); + } + if (subRules.length < 2) { + throw new Error( + `a union must pass at least 2 rules (${subRules.length} passed)`, + ); + } + + this.parameters.union = { + rules: subRules.map(r => r.build()), + }; + + return this; + } + + build(): IGcRule { + const count = this.numParams; + if (!count && !this.parameters.union && !this.parameters.intersection) { + throw new Error(`no rules were specified (${this.parameters})`); + } + if (count && (this.parameters.union || this.parameters.intersection)) { + throw new Error( + `unions and intersection cannot specify rule parameters (${this.parameters})`, + ); + } + + return this.parameters; + } + + /*static makeRule(gcRule: GcRule): google.bigtable.admin.v2.IGcRule { + const rules: IGcRule[] = []; + + if (gcRule.maxAge) { + rules.push({ + maxAge: gcRule.maxAge as google.protobuf.IDuration, + }); + } + + if (gcRule.maxVersions) { + rules.push({ + maxNumVersions: gcRule.maxVersions, + }); + } + + if (gcRule.rule) { + rules.push(this.makeRule(gcRule.rule)); + } + + if (rules.length === 1) { + if (gcRule.ruleType === RuleType.union) { + throw new Error( + 'A union must have more than one garbage collection rule.', + ); + } + + if (gcRule.ruleType === RuleType.intersection) { + throw new Error( + 'An intersection must have more than one garbage collection rule.', + ); + } + + if ( + gcRule.ruleType === RuleType.union && + gcRule.ruleType === RuleType.intersection + ) { + throw new Error( + 'A garbage collection rule cannot be both a union and an intersection.', + ); + } + + return rules[0]; + } + + if (rules.length === 0) { + throw new Error('No garbage collection rules were specified.'); + } + + const rule = {} as google.bigtable.admin.v2.IGcRule; + const ruleType = + gcRule.ruleType === RuleType.union ? 'union' : 'intersection'; + + rule[ruleType] = { + rules, + }; + + return rule; + } */ +} + +function test() { + const rule = GcRuleBuilder.new() + .intersection( + GcRuleBuilder.new({ + maxAge: { + seconds: 1000, + nanos: 20000, + }, + }), + GcRuleBuilder.new({ + maxNumVersions: 50, + }), + ) + .build(); + console.log(rule); +} diff --git a/src/admin/index.ts b/src/admin/index.ts index 0c876a62a..652e8fe6a 100644 --- a/src/admin/index.ts +++ b/src/admin/index.ts @@ -13,3 +13,6 @@ // limitations under the License. export * as v2 from './v2'; +export {TableAdminClient} from './table'; +export {InstanceAdminClient} from './instance'; +export {GcRuleBuilder} from './gc-rule-builder'; diff --git a/src/admin/instance.ts b/src/admin/instance.ts new file mode 100644 index 000000000..c228379c7 --- /dev/null +++ b/src/admin/instance.ts @@ -0,0 +1,30 @@ +// Copyright 2025 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. + +import {BigtableInstanceAdminClient} from './v2'; + +/** + * Service for creating, configuring, and deleting Cloud Bigtable Instances and + * Clusters. Provides access to the Instance and Cluster schemas only, not the + * tables' metadata or data stored in those tables. + * + * While users may create an instance of this class using the standard GAPIC + * constructor parameters, it's recommended to obtain one by way of the + * Bigtable.getInstanceAdminClient() method so that authentication and configuration + * are all handled uniformly. + * + * @class + * @memberof admin + */ +export class InstanceAdminClient extends BigtableInstanceAdminClient {} diff --git a/src/admin/table.ts b/src/admin/table.ts new file mode 100644 index 000000000..c31c4efb8 --- /dev/null +++ b/src/admin/table.ts @@ -0,0 +1,30 @@ +// Copyright 2025 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. + +import {BigtableTableAdminClient} from './v2'; + +/** + * Service for creating, configuring, and deleting Cloud Bigtable tables. + * Provides access to the table schemas only, not the data stored within + * the tables. + * + * While users may create an instance of this class using the standard GAPIC + * constructor parameters, it's recommended to obtain one by way of the + * Bigtable.getTableAdminClient() method so that authentication and + * configuration are all handled uniformly. + * + * @class + * @memberof admin + */ +export class TableAdminClient extends BigtableTableAdminClient {} diff --git a/src/gc-rule-maker.ts b/src/gc-rule-maker.ts deleted file mode 100644 index 7c2d1a8ec..000000000 --- a/src/gc-rule-maker.ts +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2025 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. - -import {IGcRule} from './family'; -import * as protos from '../protos/protos'; - -enum RuleType { - union = 'union', - intersection = 'intersection', -} - -export interface GcRule { - maxAge?: protos.google.protobuf.IDuration | number; - maxVersions?: number; - rule?: GcRule; - ruleType?: RuleType; -} - -export class GCRuleMaker { - static makeRule(gcRule: GcRule): protos.google.bigtable.admin.v2.IGcRule { - const rules: IGcRule[] = []; - - if (gcRule.maxAge) { - rules.push({ - maxAge: gcRule.maxAge as protos.google.protobuf.IDuration, - }); - } - - if (gcRule.maxVersions) { - rules.push({ - maxNumVersions: gcRule.maxVersions, - }); - } - - if (gcRule.rule) { - rules.push(this.makeRule(gcRule.rule)); - } - - if (rules.length === 1) { - if (gcRule.ruleType === RuleType.union) { - throw new Error( - 'A union must have more than one garbage collection rule.', - ); - } - - if (gcRule.ruleType === RuleType.intersection) { - throw new Error( - 'An intersection must have more than one garbage collection rule.', - ); - } - - if ( - gcRule.ruleType === RuleType.union && - gcRule.ruleType === RuleType.intersection - ) { - throw new Error( - 'A garbage collection rule cannot be both a union and an intersection.', - ); - } - - return rules[0]; - } - - if (rules.length === 0) { - throw new Error('No garbage collection rules were specified.'); - } - - const rule = {} as protos.google.bigtable.admin.v2.IGcRule; - const ruleType = - gcRule.ruleType === RuleType.union ? 'union' : 'intersection'; - - rule[ruleType] = { - rules, - }; - - return rule; - } -} diff --git a/src/index.ts b/src/index.ts index aa062337a..4b9784075 100644 --- a/src/index.ts +++ b/src/index.ts @@ -597,6 +597,14 @@ export class Bigtable { this._metricsConfigManager = new ClientSideMetricsConfigManager(handlers); } + getTableAdminClient() { + return new admin.TableAdminClient(this.options.BigtableTableAdminClient); + } + + getInstanceAdminClient() { + return new admin.TableAdminClient(this.options.BigtableInstanceAdminClient); + } + createInstance( id: string, options: InstanceOptions, @@ -1366,5 +1374,4 @@ export { WaitForReplicationCallback, WaitForReplicationResponse, } from './table'; -export {GCRuleMaker} from './gc-rule-maker'; export {SqlTypes}; From a5af05c93faad4146ea817e2485618df7530e486 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:05:01 -0500 Subject: [PATCH 03/20] feat: update proposed gcrule builder --- src/admin/gc-rule-builder.ts | 223 +++++++++++++---------------------- src/admin/index.ts | 2 +- 2 files changed, 81 insertions(+), 144 deletions(-) diff --git a/src/admin/gc-rule-builder.ts b/src/admin/gc-rule-builder.ts index ab7bb43db..031f30c74 100644 --- a/src/admin/gc-rule-builder.ts +++ b/src/admin/gc-rule-builder.ts @@ -12,182 +12,119 @@ // See the License for the specific language governing permissions and // limitations under the License. +import * as util from 'node:util'; import {google} from '../../protos/protos'; export type IGcRule = google.bigtable.admin.v2.IGcRule; export type IDuration = google.protobuf.IDuration; -export class GcRuleBuilder { - parameters: IGcRule; +export type GcUnion = Pick; +export type GcIntersection = Pick; +export type GcGrouping = GcUnion | GcIntersection; +export type GcRuleItem = Omit; - static new(parameters: IGcRule = {}): GcRuleBuilder { - return new GcRuleBuilder(parameters); - } - - // We want this to be able to keep working even if more rule parameters are - // added later via autogen. So what this does is assume that we have possible - // values of {intersection | union} that must be empty, and everything else - // is a GC rule parameter, of which only one should be present per rule. - constructor(parameters: IGcRule) { - this.parameters = Object.assign({}, parameters); - - // We only want basic parameters, not the rules themselves. - if (this.parameters.intersection || this.parameters.union) { - throw new Error( - 'union and intersection parameters must be specified through builder methods', - ); - } +function isUnion(rule: IGcRule): rule is GcUnion { + return !!rule.union; +} - // Make sure there's only one rule specified in the parameters. - const count = this.numParams; - if (count > 1) { - throw new Error( - `only one parameter may be specified per rule (${this.parameters})`, - ); - } - } +function isIntersection(rule: IGcRule): rule is GcIntersection { + return !!rule.intersection; +} - get numParams(): number { - let count = 0; - const paramObj = this.parameters as unknown as Record; - for (const n of Object.keys(this.parameters)) { - if (n === 'union' || n === 'intersection') { - continue; - } - - if (paramObj[n]) { - count++; - } - } +function isGrouping(rule: IGcRule): rule is GcGrouping { + return isUnion(rule) || isIntersection(rule); +} - return count; - } +function isRuleItem(rule: IGcRule): rule is GcRuleItem { + return !isUnion(rule) && !isIntersection(rule); +} - intersection(...subRules: GcRuleBuilder[]): GcRuleBuilder { - if (this.parameters.intersection || this.parameters.union) { - throw new Error( - `builder already has ${this.parameters.intersection ? 'an intersection' : 'a union'} `, - ); - } - if (subRules.length < 2) { +export class GcRules { + // Runtime checks for JavaScript code. + static checkGroupingItem(p: GcGrouping | GcRuleItem): void { + if (!isGrouping(p) && !isRuleItem(p)) { throw new Error( - `an intersection must pass at least 2 rules (${subRules.length} passed)`, + `Parameter ${util.format('%o', p)} is not a union, intersection, or rule`, ); } - - this.parameters.intersection = { - rules: subRules.map(r => r.build()), - }; - - return this; - } - - union(...subRules: GcRuleBuilder[]): GcRuleBuilder { - if (this.parameters.intersection || this.parameters.union) { + if (isUnion(p) && isIntersection(p)) { throw new Error( - `builder already has ${this.parameters.intersection ? 'an intersection' : 'a union'} `, + `Parameter ${util.format('%o', p)} is both a union and intersection`, ); } - if (subRules.length < 2) { + if (isGrouping(p) && isRuleItem(p)) { throw new Error( - `a union must pass at least 2 rules (${subRules.length} passed)`, + `Parameter ${util.format('%o', p)} is both a union and/or intersection, and a rule`, ); } - - this.parameters.union = { - rules: subRules.map(r => r.build()), - }; - - return this; } - build(): IGcRule { - const count = this.numParams; - if (!count && !this.parameters.union && !this.parameters.intersection) { - throw new Error(`no rules were specified (${this.parameters})`); - } - if (count && (this.parameters.union || this.parameters.intersection)) { + // Runtime checks for JavaScript code. + static checkRuleItem(p: GcRuleItem): void { + if (!isRuleItem(p)) { throw new Error( - `unions and intersection cannot specify rule parameters (${this.parameters})`, + `Parameter ${util.format('%o', p)} is not a rule (or not only a rule)`, ); } - - return this.parameters; } - /*static makeRule(gcRule: GcRule): google.bigtable.admin.v2.IGcRule { - const rules: IGcRule[] = []; - - if (gcRule.maxAge) { - rules.push({ - maxAge: gcRule.maxAge as google.protobuf.IDuration, - }); - } - - if (gcRule.maxVersions) { - rules.push({ - maxNumVersions: gcRule.maxVersions, - }); - } - - if (gcRule.rule) { - rules.push(this.makeRule(gcRule.rule)); - } - - if (rules.length === 1) { - if (gcRule.ruleType === RuleType.union) { - throw new Error( - 'A union must have more than one garbage collection rule.', - ); - } - - if (gcRule.ruleType === RuleType.intersection) { - throw new Error( - 'An intersection must have more than one garbage collection rule.', - ); - } - - if ( - gcRule.ruleType === RuleType.union && - gcRule.ruleType === RuleType.intersection - ) { - throw new Error( - 'A garbage collection rule cannot be both a union and an intersection.', - ); - } - - return rules[0]; - } + // Unions are formed from groupings and/or rules. + static union(...params: Array): GcGrouping { + params.forEach(GcRules.checkGroupingItem); - if (rules.length === 0) { - throw new Error('No garbage collection rules were specified.'); - } + return { + union: { + rules: params, + }, + }; + } - const rule = {} as google.bigtable.admin.v2.IGcRule; - const ruleType = - gcRule.ruleType === RuleType.union ? 'union' : 'intersection'; + // Intersections are formed from groupings and/or rules. + static intersection(...params: Array): GcGrouping { + params.forEach(GcRules.checkGroupingItem); - rule[ruleType] = { - rules, + return { + intersection: { + rules: params, + }, }; + } + static rule(rule: GcRuleItem): GcRuleItem { + GcRules.checkRuleItem(rule); return rule; - } */ + } } function test() { - const rule = GcRuleBuilder.new() - .intersection( - GcRuleBuilder.new({ - maxAge: { - seconds: 1000, - nanos: 20000, - }, - }), - GcRuleBuilder.new({ - maxNumVersions: 50, - }), - ) - .build(); - console.log(rule); + const rule = GcRules.intersection( + GcRules.rule({ + maxAge: { + seconds: 1000, + nanos: 20000, + }, + }), + GcRules.rule({ + maxNumVersions: 50, + }), + ); + + const rule2 = GcRules.union( + rule, + GcRules.rule({ + maxAge: { + seconds: 50, + nanos: 20, + }, + }), + ); + + console.dir(rule2, {depth: null}); } +// test(); + +/* +Do we want to deal with these use cases? + 'A union must have more than one garbage collection rule.', + 'An intersection must have more than one garbage collection rule.', +*/ diff --git a/src/admin/index.ts b/src/admin/index.ts index 652e8fe6a..633cc2d9a 100644 --- a/src/admin/index.ts +++ b/src/admin/index.ts @@ -15,4 +15,4 @@ export * as v2 from './v2'; export {TableAdminClient} from './table'; export {InstanceAdminClient} from './instance'; -export {GcRuleBuilder} from './gc-rule-builder'; +export {GcRules} from './gc-rule-builder'; From 1386820f2e30658ab9713393a92c760f9653fd9c Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Wed, 19 Nov 2025 16:12:24 -0500 Subject: [PATCH 04/20] feat: more updates on the CUJs --- src/admin/table.ts | 137 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) diff --git a/src/admin/table.ts b/src/admin/table.ts index c31c4efb8..b34ca2168 100644 --- a/src/admin/table.ts +++ b/src/admin/table.ts @@ -13,6 +13,9 @@ // limitations under the License. import {BigtableTableAdminClient} from './v2'; +import {LROperation, CallOptions} from 'google-gax'; + +import {google} from '../../protos/protos'; /** * Service for creating, configuring, and deleting Cloud Bigtable tables. @@ -27,4 +30,136 @@ import {BigtableTableAdminClient} from './v2'; * @class * @memberof admin */ -export class TableAdminClient extends BigtableTableAdminClient {} +export class TableAdminClient extends BigtableTableAdminClient { + // This is largely copied from the GAPIC doc. + /** + * Create a new table by restoring from a completed backup. The + * returned table {@link protos.google.longrunning.Operation|long-running operation} can + * be used to track the progress of the operation, and to cancel it. The + * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * {@link protos.google.bigtable.admin.v2.RestoreTableMetadata|RestoreTableMetadata}. The + * {@link protos.google.longrunning.Operation.response|response} type is + * {@link protos.google.bigtable.admin.v2.Table|Table}, if successful. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the instance in which to create the restored + * table. Values are of the form `projects//instances/`. + * @param {string} request.tableId + * Required. The id of the table to create and restore to. This + * table must not already exist. The `table_id` appended to + * `parent` forms the full table name of the form + * `projects//instances//tables/`. + * @param {string} request.backup + * Name of the backup from which to restore. Values are of the form + * `projects//instances//clusters//backups/`. + * @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 a {@link protos.google.bigtable.admin.v2.RestoreTableMetadata|RestoreTableMetadata}. + */ + async restoreAndWait( + restoreParameters: google.bigtable.admin.v2.IRestoreTableRequest, + options?: CallOptions, + ): Promise { + const [lro] = await this.restoreTable(restoreParameters, options); + + const [, metadata] = await lro.promise(); + + return metadata; + } + + // This one doesn't get generated in GAPIC, because it's "hidden" in proto + // return types rather than being part of a method. This helper does the same + // thing as e.g. checkRestoreTableStatus. + // TODO? - just call the checkRestoreTableStatus method and shift the type? + private async getOptimizeLRO(name: string, options?: CallOptions) { + // We want to use the same gax module as the base class, but it's private. + const gaxModule = this['_gaxModule']; + const request = + new gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ + name, + }); + const [operation] = await this.operationsClient.getOperation( + request, + options, + ); + const decodeOperation = new gaxModule.Operation( + operation, + this.descriptors.longrunning.restoreTable, + gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + google.bigtable.admin.v2.Table, + google.bigtable.admin.v2.OptimizeRestoredTableMetadata + >; + } + + async checkOptimizeTableProgress( + name: string, + options?: CallOptions, + ): Promise< + LROperation< + google.bigtable.admin.v2.Table, + google.bigtable.admin.v2.OptimizeRestoredTableMetadata + > + > { + return await this.getOptimizeLRO(name, options); + } + + async waitForTableOptimization( + metadata: google.bigtable.admin.v2.IRestoreTableMetadata, + options?: CallOptions, + ) { + const lro = await this.checkOptimizeTableProgress( + metadata.optimizeTableOperationName!, + options, + ); + return await lro.promise(); + } + + async waitForConsistency( + tableName: string, + timeoutSeconds?: number, + checkIntervalSeconds = 5, + options?: CallOptions, + ): Promise { + // 1. Generate a consistency token + const [token] = await this.generateConsistencyToken( + { + name: tableName, + }, + options, + ); + + let isConsistent = false; + let totalSeconds = 0; + while (!isConsistent) { + // 2. Check for consistency + const request = { + name: tableName, + consistencyToken: token.consistencyToken, + }; + const [consistent] = await this.checkConsistency(request, options); + + // Protos assume optional, so just be sure. + isConsistent = consistent.consistent ?? false; + + if (isConsistent) { + return; + } else { + // console.log('Data is not yet consistent. Retrying in 5 seconds...'); + // 3. Wait before retrying + await new Promise(resolve => { + setTimeout(resolve, checkIntervalSeconds * 1000); + totalSeconds += checkIntervalSeconds; + if (timeoutSeconds !== undefined && totalSeconds >= timeoutSeconds) { + throw new Error( + `Timed out waiting for consistency check (${totalSeconds}s)`, + ); + } + }); + } + } + } +} From de68524c2f6eff053b98d7621fca0a66cbc5d48d Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Thu, 20 Nov 2025 18:43:10 -0500 Subject: [PATCH 05/20] feat: updates from comments on new modernization features --- src/admin/gc-rule-builder.ts | 73 ++++++++-------- src/admin/table.ts | 156 +++++++++++++++++------------------ 2 files changed, 116 insertions(+), 113 deletions(-) diff --git a/src/admin/gc-rule-builder.ts b/src/admin/gc-rule-builder.ts index 031f30c74..b1b16b995 100644 --- a/src/admin/gc-rule-builder.ts +++ b/src/admin/gc-rule-builder.ts @@ -39,8 +39,17 @@ function isRuleItem(rule: IGcRule): rule is GcRuleItem { return !isUnion(rule) && !isIntersection(rule); } -export class GcRules { - // Runtime checks for JavaScript code. +/** + * Helper class for building valid garbage collection rules. TypeScript is + * recommended here for the maximum help, as types will guide user code at + * runtime; however, some correctness checking happens at runtime to help + * JavaScript users as well. + */ +export class GcRuleBuilder { + /** + * Runtime checks for JavaScript code. + * @private + */ static checkGroupingItem(p: GcGrouping | GcRuleItem): void { if (!isGrouping(p) && !isRuleItem(p)) { throw new Error( @@ -59,7 +68,10 @@ export class GcRules { } } - // Runtime checks for JavaScript code. + /** + * Runtime checks for JavaScript code. + * @private + */ static checkRuleItem(p: GcRuleItem): void { if (!isRuleItem(p)) { throw new Error( @@ -68,9 +80,15 @@ export class GcRules { } } - // Unions are formed from groupings and/or rules. + /** + * Unions are formed from other groupings (union, intersection) and potentially + * rules (e.g. maxAge). They will match if any of the items are true. + * + * @param params Groupings and/or rules to be included + * @returns [IGcRule] A newly built group + */ static union(...params: Array): GcGrouping { - params.forEach(GcRules.checkGroupingItem); + params.forEach(GcRuleBuilder.checkGroupingItem); return { union: { @@ -79,9 +97,15 @@ export class GcRules { }; } - // Intersections are formed from groupings and/or rules. + /** + * Intersections are formed from other groupings (union, intersection) and potentially + * rules (e.g. maxAge). They will match if all of the items are true. + * + * @param params Groupings and/or rules to be included + * @returns [IGcRule] A newly built group + */ static intersection(...params: Array): GcGrouping { - params.forEach(GcRules.checkGroupingItem); + params.forEach(GcRuleBuilder.checkGroupingItem); return { intersection: { @@ -90,39 +114,18 @@ export class GcRules { }; } + /** + * Rules are leaf nodes and contain constraints such as maxAge and maxNumVersions. + * + * @param params [IGcRule] Filled rule + * @returns [IGcRule] A typed/checked rule + */ static rule(rule: GcRuleItem): GcRuleItem { - GcRules.checkRuleItem(rule); + GcRuleBuilder.checkRuleItem(rule); return rule; } } -function test() { - const rule = GcRules.intersection( - GcRules.rule({ - maxAge: { - seconds: 1000, - nanos: 20000, - }, - }), - GcRules.rule({ - maxNumVersions: 50, - }), - ); - - const rule2 = GcRules.union( - rule, - GcRules.rule({ - maxAge: { - seconds: 50, - nanos: 20, - }, - }), - ); - - console.dir(rule2, {depth: null}); -} -// test(); - /* Do we want to deal with these use cases? 'A union must have more than one garbage collection rule.', diff --git a/src/admin/table.ts b/src/admin/table.ts index b34ca2168..096a0421c 100644 --- a/src/admin/table.ts +++ b/src/admin/table.ts @@ -13,9 +13,11 @@ // limitations under the License. import {BigtableTableAdminClient} from './v2'; -import {LROperation, CallOptions} from 'google-gax'; +import {LROperation, CallOptions, ClientOptions} from 'google-gax'; +import type * as gax from 'google-gax'; import {google} from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Service for creating, configuring, and deleting Cloud Bigtable tables. @@ -31,99 +33,97 @@ import {google} from '../../protos/protos'; * @memberof admin */ export class TableAdminClient extends BigtableTableAdminClient { - // This is largely copied from the GAPIC doc. - /** - * Create a new table by restoring from a completed backup. The - * returned table {@link protos.google.longrunning.Operation|long-running operation} can - * be used to track the progress of the operation, and to cancel it. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is - * {@link protos.google.bigtable.admin.v2.RestoreTableMetadata|RestoreTableMetadata}. The - * {@link protos.google.longrunning.Operation.response|response} type is - * {@link protos.google.bigtable.admin.v2.Table|Table}, if successful. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * @param {string} request.tableId - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * @param {string} request.backup - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * @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 a {@link protos.google.bigtable.admin.v2.RestoreTableMetadata|RestoreTableMetadata}. - */ - async restoreAndWait( - restoreParameters: google.bigtable.admin.v2.IRestoreTableRequest, - options?: CallOptions, - ): Promise { - const [lro] = await this.restoreTable(restoreParameters, options); + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + super(opts, gaxInstance); - const [, metadata] = await lro.promise(); + const protoFilesRoot = this.pGaxModule.protobufFromJSON(jsonProtos); - return metadata; + // This one isn't included since it's not a directly callable method on the proto. + const optimizeRestoredTableResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Table', + ) as gax.protobuf.Type; + const optimizeRestoredTableMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.OptimizeRestoredTableMetadata', + ) as gax.protobuf.Type; + this.descriptors.longrunning['optimizeRestoredTable'] = + new this.pGaxModule.LongrunningDescriptor( + this.operationsClient, + optimizeRestoredTableResponse.decode.bind( + optimizeRestoredTableResponse, + ), + optimizeRestoredTableMetadata.decode.bind( + optimizeRestoredTableMetadata, + ), + ); } - // This one doesn't get generated in GAPIC, because it's "hidden" in proto - // return types rather than being part of a method. This helper does the same - // thing as e.g. checkRestoreTableStatus. - // TODO? - just call the checkRestoreTableStatus method and shift the type? - private async getOptimizeLRO(name: string, options?: CallOptions) { - // We want to use the same gax module as the base class, but it's private. - const gaxModule = this['_gaxModule']; - const request = - new gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ - name, - }); - const [operation] = await this.operationsClient.getOperation( - request, - options, - ); - const decodeOperation = new gaxModule.Operation( - operation, - this.descriptors.longrunning.restoreTable, - gaxModule.createDefaultBackoffSettings(), - ); - return decodeOperation as LROperation< - google.bigtable.admin.v2.Table, - google.bigtable.admin.v2.OptimizeRestoredTableMetadata - >; + // We want to use the same gax module as the base class, but it's private. + private get pGaxModule() { + return this['_gaxModule']; } - async checkOptimizeTableProgress( + // We want to use the same logger as the base class, but it's private. + private get pLog() { + return this['_log']; + } + + /** + * Check the status of the long running operation returned when the `restoreTable()` + * LRO has concluded. + * + * This one doesn't get generated in GAPIC, because it's "hidden" in proto + * return types rather than being part of a method. This helper does the same + * thing as e.g. checkRestoreTableStatus. + * + * @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. + */ + async checkOptimizeRestoredTableProgress( name: string, - options?: CallOptions, ): Promise< LROperation< google.bigtable.admin.v2.Table, google.bigtable.admin.v2.OptimizeRestoredTableMetadata > > { - return await this.getOptimizeLRO(name, options); - } - - async waitForTableOptimization( - metadata: google.bigtable.admin.v2.IRestoreTableMetadata, - options?: CallOptions, - ) { - const lro = await this.checkOptimizeTableProgress( - metadata.optimizeTableOperationName!, - options, + this.pLog.info('optimizeRestoredTable long-running'); + const request = + new this.pGaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this.pGaxModule.Operation( + operation, + this.descriptors.longrunning.optimizeRestoredTable, + this.pGaxModule.createDefaultBackoffSettings(), ); - return await lro.promise(); + return decodeOperation as LROperation< + google.bigtable.admin.v2.Table, + google.bigtable.admin.v2.OptimizeRestoredTableMetadata + >; } + /** + * Waits for a table to become consistent. This gets a consistency check token + * for you, and waits until its status has returned `consistent`. + * + * @param tableName The name of the table to check + * @param options CallOptions, if desired + * @returns A Promise that completes when the table is consistent + */ async waitForConsistency( tableName: string, - timeoutSeconds?: number, - checkIntervalSeconds = 5, options?: CallOptions, ): Promise { + const checkIntervalSeconds = 5; + // 1. Generate a consistency token const [token] = await this.generateConsistencyToken( { @@ -133,7 +133,7 @@ export class TableAdminClient extends BigtableTableAdminClient { ); let isConsistent = false; - let totalSeconds = 0; + // let totalSeconds = 0; while (!isConsistent) { // 2. Check for consistency const request = { @@ -152,12 +152,12 @@ export class TableAdminClient extends BigtableTableAdminClient { // 3. Wait before retrying await new Promise(resolve => { setTimeout(resolve, checkIntervalSeconds * 1000); - totalSeconds += checkIntervalSeconds; - if (timeoutSeconds !== undefined && totalSeconds >= timeoutSeconds) { + // totalSeconds += checkIntervalSeconds; + /*if (timeoutSeconds !== undefined && totalSeconds >= timeoutSeconds) { throw new Error( `Timed out waiting for consistency check (${totalSeconds}s)`, ); - } + }*/ }); } } From edf57105f94cbf854feed6b93f5687796c8a9d37 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:31:44 -0500 Subject: [PATCH 06/20] fix: implement the rest of the old GcRule rules --- src/admin/gc-rule-builder.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/admin/gc-rule-builder.ts b/src/admin/gc-rule-builder.ts index b1b16b995..83be035cc 100644 --- a/src/admin/gc-rule-builder.ts +++ b/src/admin/gc-rule-builder.ts @@ -88,6 +88,12 @@ export class GcRuleBuilder { * @returns [IGcRule] A newly built group */ static union(...params: Array): GcGrouping { + if (params.length < 2) { + throw new Error( + `Unions should contain at least two items (passed: ${params.length})`, + ); + } + params.forEach(GcRuleBuilder.checkGroupingItem); return { @@ -105,6 +111,12 @@ export class GcRuleBuilder { * @returns [IGcRule] A newly built group */ static intersection(...params: Array): GcGrouping { + if (params.length < 2) { + throw new Error( + `Intersections should contain at least two items (passed: ${params.length})`, + ); + } + params.forEach(GcRuleBuilder.checkGroupingItem); return { @@ -125,9 +137,3 @@ export class GcRuleBuilder { return rule; } } - -/* -Do we want to deal with these use cases? - 'A union must have more than one garbage collection rule.', - 'An intersection must have more than one garbage collection rule.', -*/ From c85d815e50fd54c7b7cb850c555b2364d34527e8 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:03:10 -0500 Subject: [PATCH 07/20] fix: clean up waitForConsistency --- src/admin/table.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/admin/table.ts b/src/admin/table.ts index 096a0421c..1823257b7 100644 --- a/src/admin/table.ts +++ b/src/admin/table.ts @@ -133,7 +133,6 @@ export class TableAdminClient extends BigtableTableAdminClient { ); let isConsistent = false; - // let totalSeconds = 0; while (!isConsistent) { // 2. Check for consistency const request = { @@ -148,16 +147,8 @@ export class TableAdminClient extends BigtableTableAdminClient { if (isConsistent) { return; } else { - // console.log('Data is not yet consistent. Retrying in 5 seconds...'); - // 3. Wait before retrying await new Promise(resolve => { setTimeout(resolve, checkIntervalSeconds * 1000); - // totalSeconds += checkIntervalSeconds; - /*if (timeoutSeconds !== undefined && totalSeconds >= timeoutSeconds) { - throw new Error( - `Timed out waiting for consistency check (${totalSeconds}s)`, - ); - }*/ }); } } From 6ab75414fd4c8051b81167a96b4646b30166f10d Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Tue, 25 Nov 2025 13:03:35 -0500 Subject: [PATCH 08/20] docs: typo --- src/admin/gc-rule-builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/gc-rule-builder.ts b/src/admin/gc-rule-builder.ts index 83be035cc..18020c0b8 100644 --- a/src/admin/gc-rule-builder.ts +++ b/src/admin/gc-rule-builder.ts @@ -42,7 +42,7 @@ function isRuleItem(rule: IGcRule): rule is GcRuleItem { /** * Helper class for building valid garbage collection rules. TypeScript is * recommended here for the maximum help, as types will guide user code at - * runtime; however, some correctness checking happens at runtime to help + * compile time; however, some correctness checking happens at runtime to help * JavaScript users as well. */ export class GcRuleBuilder { From a1f40d61a39fb1da9429d57bb0308de25b6e656e Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Tue, 25 Nov 2025 19:38:42 -0500 Subject: [PATCH 09/20] fix: a couple more pieces of backwards compat --- src/v2/bigtable_instance_admin_client.ts | 21 +++++++++++++++++++++ src/v2/bigtable_table_admin_client.ts | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/v2/bigtable_instance_admin_client.ts create mode 100644 src/v2/bigtable_table_admin_client.ts diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts new file mode 100644 index 000000000..ca606f659 --- /dev/null +++ b/src/v2/bigtable_instance_admin_client.ts @@ -0,0 +1,21 @@ +// Copyright 2025 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. ** + +// This is a shim to be removed later, in case anyone was importing +// it directly from this spot. +export * from '../admin/v2/bigtable_instance_admin_client'; diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts new file mode 100644 index 000000000..b87d9533c --- /dev/null +++ b/src/v2/bigtable_table_admin_client.ts @@ -0,0 +1,21 @@ +// Copyright 2025 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. ** + +// This is a shim to be removed later, in case anyone was importing +// it directly from this spot. +export * from '../admin/v2/bigtable_table_admin_client'; From f3338b96d57d344a4b6925a56531962412fbdc59 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:32:46 -0500 Subject: [PATCH 10/20] samples: don't publish data plane generated samples --- owlbot.py | 3 +- .../v2/bigtable.check_and_mutate_row.js | 108 - .../generated/v2/bigtable.execute_query.js | 129 - ...nerate_initial_change_stream_partitions.js | 76 - samples/generated/v2/bigtable.mutate_row.js | 96 - samples/generated/v2/bigtable.mutate_rows.js | 90 - .../generated/v2/bigtable.ping_and_warm.js | 72 - .../generated/v2/bigtable.prepare_query.js | 97 - .../v2/bigtable.read_change_stream.js | 110 - .../v2/bigtable.read_modify_write_row.js | 93 - samples/generated/v2/bigtable.read_rows.js | 116 - .../generated/v2/bigtable.sample_row_keys.js | 86 - ...pet_metadata.google.bigtable.admin.v2.json | 2095 ------------ .../snippet_metadata.google.bigtable.v2.json | 487 --- ...pet_metadata_google.bigtable.admin.v2.json | 2855 ----------------- .../snippet_metadata_google.bigtable.v2.json | 643 ---- 16 files changed, 2 insertions(+), 7154 deletions(-) delete mode 100644 samples/generated/v2/bigtable.check_and_mutate_row.js delete mode 100644 samples/generated/v2/bigtable.execute_query.js delete mode 100644 samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js delete mode 100644 samples/generated/v2/bigtable.mutate_row.js delete mode 100644 samples/generated/v2/bigtable.mutate_rows.js delete mode 100644 samples/generated/v2/bigtable.ping_and_warm.js delete mode 100644 samples/generated/v2/bigtable.prepare_query.js delete mode 100644 samples/generated/v2/bigtable.read_change_stream.js delete mode 100644 samples/generated/v2/bigtable.read_modify_write_row.js delete mode 100644 samples/generated/v2/bigtable.read_rows.js delete mode 100644 samples/generated/v2/bigtable.sample_row_keys.js delete mode 100644 samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json delete mode 100644 samples/generated/v2/snippet_metadata.google.bigtable.v2.json delete mode 100644 samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json delete mode 100644 samples/generated/v2/snippet_metadata_google.bigtable.v2.json diff --git a/owlbot.py b/owlbot.py index 98aef528f..7833af5a8 100644 --- a/owlbot.py +++ b/owlbot.py @@ -38,7 +38,7 @@ src_files[version] = list([fn for fn in src_paths[version].glob('**/*.*')]) # Copy bigtable library. - # src/index.ts src/admin/v2/index.ts has added AdminClients manually, we don't wanna override it. + # src/index.ts src/admin/v2/index.ts has added AdminClients manually; we don't want to override it. # src/*.ts is a added layer for the client libraries, they need extra setting in tsconfig.json & tslint.json # Tracking issues: 1. https://github.com/googleapis/nodejs-bigtable/issues/636 # 2. https://github.com/googleapis/nodejs-bigtable/issues/635 @@ -58,6 +58,7 @@ 'tslint.json', '.github/sync-repo-settings.yaml', '.OwlBot.yaml', + 'samples/generated/v2/*', # we don't want to encourage non-veneer use here. ] + list(admin_files) logging.info(f"excluding files for non-admin: {excludes}") s.copy([library], excludes = excludes) diff --git a/samples/generated/v2/bigtable.check_and_mutate_row.js b/samples/generated/v2/bigtable.check_and_mutate_row.js deleted file mode 100644 index 55a087197..000000000 --- a/samples/generated/v2/bigtable.check_and_mutate_row.js +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -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. - * 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. - */ - /** - * 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. - */ - // const appProfileId = 'abc123' - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - */ - // const rowKey = Buffer.from('string') - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - */ - // const predicateFilter = {} - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - */ - // const trueMutations = [1,2,3,4] - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - */ - // const falseMutations = [1,2,3,4] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callCheckAndMutateRow() { - // Construct request - const request = { - rowKey, - }; - - // Run request - const response = await bigtableClient.checkAndMutateRow(request); - console.log(response); - } - - callCheckAndMutateRow(); - // [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.execute_query.js b/samples/generated/v2/bigtable.execute_query.js deleted file mode 100644 index c908e8e25..000000000 --- a/samples/generated/v2/bigtable.execute_query.js +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main(instanceName, query, params) { - // [START bigtable_v2_generated_Bigtable_ExecuteQuery_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 instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - */ - // const instanceName = 'abc123' - /** - * Optional. This value specifies routing for replication. If not specified, - * the `default` application profile will be used. - */ - // const appProfileId = 'abc123' - /** - * Required. The query string. - * Exactly one of `query` and `prepared_query` is required. Setting both - * or neither is an `INVALID_ARGUMENT`. - */ - // const query = 'abc123' - /** - * A prepared query that was returned from `PrepareQueryResponse`. - * Exactly one of `query` and `prepared_query` is required. Setting both - * or neither is an `INVALID_ARGUMENT`. - * Setting this field also places restrictions on several other fields: - * - `data_format` must be empty. - * - `validate_only` must be false. - * - `params` must match the `param_types` set in the `PrepareQueryRequest`. - */ - // const preparedQuery = Buffer.from('string') - /** - * Protocol buffer format as described by ProtoSchema and ProtoRows - * messages. - */ - // const protoFormat = {} - /** - * Optional. If this request is resuming a previously interrupted query - * execution, `resume_token` should be copied from the last - * PartialResultSet yielded before the interruption. Doing this - * enables the query execution to resume where the last one left - * off. - * The rest of the request parameters must exactly match the - * request that yielded this token. Otherwise the request will fail. - */ - // const resumeToken = Buffer.from('string') - /** - * Required. params contains string type keys and Bigtable type values that - * bind to placeholders in the query string. In query string, a parameter - * placeholder consists of the - * `@` character followed by the parameter name (for example, `@firstName`) in - * the query string. - * For example, if - * `params"firstName" = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. - * If `Value.kind` is not set, the value is treated as a NULL value of the - * given type. For example, if - * `params"firstName" = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. - * If `query` is set, any empty `Value.type` in the map will be rejected with - * `INVALID_ARGUMENT`. - * If `prepared_query` is set, any empty `Value.type` in the map will be - * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty - * `Value.type` must match the corresponding `param_types` entry, or be - * rejected with `INVALID_ARGUMENT`. - */ - // const params = [1,2,3,4] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callExecuteQuery() { - // Construct request - const request = { - instanceName, - query, - params, - }; - - // Run request - const stream = await bigtableClient.executeQuery(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callExecuteQuery(); - // [END bigtable_v2_generated_Bigtable_ExecuteQuery_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js b/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js deleted file mode 100644 index bd5e42bca..000000000 --- a/samples/generated/v2/bigtable.generate_initial_change_stream_partitions.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main(tableName) { - // [START bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_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 from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - */ - // const tableName = 'abc123' - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - */ - // const appProfileId = 'abc123' - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callGenerateInitialChangeStreamPartitions() { - // Construct request - const request = { - tableName, - }; - - // Run request - const stream = await bigtableClient.generateInitialChangeStreamPartitions(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callGenerateInitialChangeStreamPartitions(); - // [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.mutate_row.js b/samples/generated/v2/bigtable.mutate_row.js deleted file mode 100644 index e5002fc15..000000000 --- a/samples/generated/v2/bigtable.mutate_row.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -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. - * 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. - */ - /** - * 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. - */ - // const appProfileId = 'abc123' - /** - * Required. The key of the row to which the mutation should be applied. - */ - // const rowKey = Buffer.from('string') - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - */ - // const mutations = [1,2,3,4] - /** - * If set consistently across retries, prevents this mutation from being - * double applied to aggregate column families within a 15m window. - */ - // const idempotency = {} - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callMutateRow() { - // Construct request - const request = { - rowKey, - mutations, - }; - - // Run request - const response = await bigtableClient.mutateRow(request); - console.log(response); - } - - callMutateRow(); - // [END bigtable_v2_generated_Bigtable_MutateRow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.mutate_rows.js b/samples/generated/v2/bigtable.mutate_rows.js deleted file mode 100644 index cfe9f3163..000000000 --- a/samples/generated/v2/bigtable.mutate_rows.js +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -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. - * 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. - */ - /** - * 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. - */ - // const appProfileId = 'abc123' - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - */ - // const entries = [1,2,3,4] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callMutateRows() { - // Construct request - const request = { - entries, - }; - - // Run request - const stream = await bigtableClient.mutateRows(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callMutateRows(); - // [END bigtable_v2_generated_Bigtable_MutateRows_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.ping_and_warm.js b/samples/generated/v2/bigtable.ping_and_warm.js deleted file mode 100644 index 9700a04e1..000000000 --- a/samples/generated/v2/bigtable.ping_and_warm.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main(name) { - // [START bigtable_v2_generated_Bigtable_PingAndWarm_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 instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - */ - // const name = 'abc123' - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - */ - // const appProfileId = 'abc123' - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callPingAndWarm() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await bigtableClient.pingAndWarm(request); - console.log(response); - } - - callPingAndWarm(); - // [END bigtable_v2_generated_Bigtable_PingAndWarm_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.prepare_query.js b/samples/generated/v2/bigtable.prepare_query.js deleted file mode 100644 index f8865f5b9..000000000 --- a/samples/generated/v2/bigtable.prepare_query.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main(instanceName, query, paramTypes) { - // [START bigtable_v2_generated_Bigtable_PrepareQuery_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 instance against which the query should be - * executed. - * Values are of the form `projects//instances/` - */ - // const instanceName = 'abc123' - /** - * Optional. This value specifies routing for preparing the query. Note that - * this `app_profile_id` is only used for preparing the query. The actual - * query execution will use the app profile specified in the - * `ExecuteQueryRequest`. If not specified, the `default` application profile - * will be used. - */ - // const appProfileId = 'abc123' - /** - * Required. The query string. - */ - // const query = 'abc123' - /** - * Protocol buffer format as described by ProtoSchema and ProtoRows - * messages. - */ - // const protoFormat = {} - /** - * Required. `param_types` is a map of parameter identifier strings to their - * `Type`s. - * In query string, a parameter placeholder consists of the - * `@` character followed by the parameter name (for example, `@firstName`) in - * the query string. - * For example, if param_types"firstName" = Bytes then @firstName will be a - * query parameter of type Bytes. The specific `Value` to be used for the - * query execution must be sent in `ExecuteQueryRequest` in the `params` map. - */ - // const paramTypes = [1,2,3,4] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callPrepareQuery() { - // Construct request - const request = { - instanceName, - query, - paramTypes, - }; - - // Run request - const response = await bigtableClient.prepareQuery(request); - console.log(response); - } - - callPrepareQuery(); - // [END bigtable_v2_generated_Bigtable_PrepareQuery_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.read_change_stream.js b/samples/generated/v2/bigtable.read_change_stream.js deleted file mode 100644 index 8de8bd60e..000000000 --- a/samples/generated/v2/bigtable.read_change_stream.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main(tableName) { - // [START bigtable_v2_generated_Bigtable_ReadChangeStream_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 from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - */ - // const tableName = 'abc123' - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - */ - // const appProfileId = 'abc123' - /** - * The partition to read changes from. - */ - // const partition = {} - /** - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - */ - // const startTime = {} - /** - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token's partition must exactly match - * the request's partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request's partition. Otherwise, INVALID_ARGUMENT will be - * returned. - */ - // const continuationTokens = {} - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - */ - // const endTime = {} - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - */ - // const heartbeatDuration = {} - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callReadChangeStream() { - // Construct request - const request = { - tableName, - }; - - // Run request - const stream = await bigtableClient.readChangeStream(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callReadChangeStream(); - // [END bigtable_v2_generated_Bigtable_ReadChangeStream_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.read_modify_write_row.js b/samples/generated/v2/bigtable.read_modify_write_row.js deleted file mode 100644 index bf980eb33..000000000 --- a/samples/generated/v2/bigtable.read_modify_write_row.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -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. - * 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. - */ - /** - * 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. - */ - // const appProfileId = 'abc123' - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - */ - // const rowKey = Buffer.from('string') - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. At least one entry must be - * specified, and there can be at most 100000 rules. - */ - // const rules = [1,2,3,4] - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callReadModifyWriteRow() { - // Construct request - const request = { - rowKey, - rules, - }; - - // Run request - const response = await bigtableClient.readModifyWriteRow(request); - console.log(response); - } - - callReadModifyWriteRow(); - // [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.read_rows.js b/samples/generated/v2/bigtable.read_rows.js deleted file mode 100644 index e7827ed74..000000000 --- a/samples/generated/v2/bigtable.read_rows.js +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main() { - // [START bigtable_v2_generated_Bigtable_ReadRows_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. - */ - /** - * 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' - /** - * Optional. The unique name of the MaterializedView from which to read. - * Values are of the form - * `projects//instances//materializedViews/`. - */ - // const materializedViewName = 'abc123' - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - */ - // const appProfileId = 'abc123' - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - */ - // const rows = {} - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - */ - // const filter = {} - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - */ - // const rowsLimit = 1234 - /** - * The view into RequestStats, as described above. - */ - // const requestStatsView = {} - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * - */ - // const reversed = true - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callReadRows() { - // Construct request - const request = { - }; - - // Run request - const stream = await bigtableClient.readRows(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callReadRows(); - // [END bigtable_v2_generated_Bigtable_ReadRows_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable.sample_row_keys.js b/samples/generated/v2/bigtable.sample_row_keys.js deleted file mode 100644 index 472e4bead..000000000 --- a/samples/generated/v2/bigtable.sample_row_keys.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2025 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. ** - - - /** - * NOTE: This sample is autogenerated, but this library contains handwritten - * samples that are the recommended way to use this library. Please refer to - * samples outside of the generated/ folder for these recommendations. - */ -'use strict'; - -function main() { - // [START bigtable_v2_generated_Bigtable_SampleRowKeys_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. - */ - /** - * 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' - /** - * Optional. The unique name of the MaterializedView from which to read. - * Values are of the form - * `projects//instances//materializedViews/`. - */ - // const materializedViewName = 'abc123' - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - */ - // const appProfileId = 'abc123' - - // Imports the Bigtable library - const {BigtableClient} = require('@google-cloud/bigtable').v2; - - // Instantiates a client - const bigtableClient = new BigtableClient(); - - async function callSampleRowKeys() { - // Construct request - const request = { - }; - - // Run request - const stream = await bigtableClient.sampleRowKeys(request); - stream.on('data', (response) => { console.log(response) }); - stream.on('error', (err) => { throw(err) }); - stream.on('end', () => { /* API call completed */ }); - } - - callSampleRowKeys(); - // [END bigtable_v2_generated_Bigtable_SampleRowKeys_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 deleted file mode 100644 index 8eaff6e5b..000000000 --- a/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json +++ /dev/null @@ -1,2095 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-admin", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.bigtable.admin.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async", - "title": "bigtable createInstance Sample", - "origin": "API_DEFINITION", - "description": " Create an instance within a project. Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.", - "canonical": true, - "file": "bigtable_instance_admin.create_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "instance_id", - "type": "TYPE_STRING" - }, - { - "name": "instance", - "type": ".google.bigtable.admin.v2.Instance" - }, - { - "name": "clusters", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async", - "title": "bigtable getInstance Sample", - "origin": "API_DEFINITION", - "description": " Gets information about an instance.", - "canonical": true, - "file": "bigtable_instance_admin.get_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Instance", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async", - "title": "bigtable listInstances Sample", - "origin": "API_DEFINITION", - "description": " Lists information about instances in a project.", - "canonical": true, - "file": "bigtable_instance_admin.list_instances.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListInstances", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListInstancesResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListInstances", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async", - "title": "bigtable updateInstance Sample", - "origin": "API_DEFINITION", - "description": " Updates an instance within a project. This method updates only the display name and type for an Instance. To update other Instance properties, such as labels, use PartialUpdateInstance.", - "canonical": true, - "file": "bigtable_instance_admin.update_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 94, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "display_name", - "type": "TYPE_STRING" - }, - { - "name": "state", - "type": ".google.bigtable.admin.v2.Instance.State" - }, - { - "name": "type", - "type": ".google.bigtable.admin.v2.Instance.Type" - }, - { - "name": "labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "create_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "satisfies_pzs", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.Instance", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async", - "title": "bigtable partialUpdateInstance Sample", - "origin": "API_DEFINITION", - "description": " Partially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance.", - "canonical": true, - "file": "bigtable_instance_admin.partial_update_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PartialUpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", - "async": true, - "parameters": [ - { - "name": "instance", - "type": ".google.bigtable.admin.v2.Instance" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "PartialUpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async", - "title": "bigtable deleteInstance Sample", - "origin": "API_DEFINITION", - "description": " Delete an instance from a project.", - "canonical": true, - "file": "bigtable_instance_admin.delete_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async", - "title": "bigtable createCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a cluster within an instance. Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.", - "canonical": true, - "file": "bigtable_instance_admin.create_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": ".google.bigtable.admin.v2.Cluster" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async", - "title": "bigtable getCluster Sample", - "origin": "API_DEFINITION", - "description": " Gets information about a cluster.", - "canonical": true, - "file": "bigtable_instance_admin.get_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Cluster", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async", - "title": "bigtable listClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists information about clusters in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListClusters", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListClustersResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListClusters", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async", - "title": "bigtable updateCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates a cluster within an instance. Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster.", - "canonical": true, - "file": "bigtable_instance_admin.update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "location", - "type": "TYPE_STRING" - }, - { - "name": "state", - "type": ".google.bigtable.admin.v2.Cluster.State" - }, - { - "name": "serve_nodes", - "type": "TYPE_INT32" - }, - { - "name": "cluster_config", - "type": ".google.bigtable.admin.v2.Cluster.ClusterConfig" - }, - { - "name": "default_storage_type", - "type": ".google.bigtable.admin.v2.StorageType" - }, - { - "name": "encryption_config", - "type": ".google.bigtable.admin.v2.Cluster.EncryptionConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async", - "title": "bigtable partialUpdateCluster Sample", - "origin": "API_DEFINITION", - "description": " Partially updates a cluster within a project. This method is the preferred way to update a Cluster. To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the update_mask. To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask.", - "canonical": true, - "file": "bigtable_instance_admin.partial_update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PartialUpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", - "async": true, - "parameters": [ - { - "name": "cluster", - "type": ".google.bigtable.admin.v2.Cluster" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "PartialUpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async", - "title": "bigtable deleteCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes a cluster from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async", - "title": "bigtable createAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Creates an app profile within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.create_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "app_profile", - "type": ".google.bigtable.admin.v2.AppProfile" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.AppProfile", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async", - "title": "bigtable getAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Gets information about an app profile.", - "canonical": true, - "file": "bigtable_instance_admin.get_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.AppProfile", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async", - "title": "bigtable listAppProfiles Sample", - "origin": "API_DEFINITION", - "description": " Lists information about app profiles in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_app_profiles.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAppProfiles", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListAppProfilesResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListAppProfiles", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async", - "title": "bigtable updateAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Updates an app profile within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.update_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", - "async": true, - "parameters": [ - { - "name": "app_profile", - "type": ".google.bigtable.admin.v2.AppProfile" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async", - "title": "bigtable deleteAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Deletes an app profile from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async", - "title": "bigtable getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.", - "canonical": true, - "file": "bigtable_instance_admin.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async", - "title": "bigtable setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on an instance resource. Replaces any existing policy.", - "canonical": true, - "file": "bigtable_instance_admin.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async", - "title": "bigtable testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that the caller has on the specified instance resource.", - "canonical": true, - "file": "bigtable_instance_admin.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async", - "title": "bigtable listHotTablets Sample", - "origin": "API_DEFINITION", - "description": " Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage.", - "canonical": true, - "file": "bigtable_instance_admin.list_hot_tablets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListHotTablets", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListHotTabletsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListHotTablets", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async", - "title": "bigtable createTable Sample", - "origin": "API_DEFINITION", - "description": " Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.", - "canonical": true, - "file": "bigtable_table_admin.create_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "table", - "type": ".google.bigtable.admin.v2.Table" - }, - { - "name": "initial_splits", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async", - "title": "bigtable createTableFromSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Creates a new table from the specified snapshot. The target table must not exist. The snapshot 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.", - "canonical": true, - "file": "bigtable_table_admin.create_table_from_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTableFromSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "source_snapshot", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateTableFromSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async", - "title": "bigtable listTables Sample", - "origin": "API_DEFINITION", - "description": " Lists all tables served from a specified instance.", - "canonical": true, - "file": "bigtable_table_admin.list_tables.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTables", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.Table.View" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListTablesResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListTables", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async", - "title": "bigtable getTable Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata information about the specified table.", - "canonical": true, - "file": "bigtable_table_admin.get_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.Table.View" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async", - "title": "bigtable updateTable Sample", - "origin": "API_DEFINITION", - "description": " Updates a specified table.", - "canonical": true, - "file": "bigtable_table_admin.update_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", - "async": true, - "parameters": [ - { - "name": "table", - "type": ".google.bigtable.admin.v2.Table" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UpdateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async", - "title": "bigtable deleteTable Sample", - "origin": "API_DEFINITION", - "description": " Permanently deletes a specified table and all of its data.", - "canonical": true, - "file": "bigtable_table_admin.delete_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async", - "title": "bigtable undeleteTable Sample", - "origin": "API_DEFINITION", - "description": " Restores a specified table which was accidentally deleted.", - "canonical": true, - "file": "bigtable_table_admin.undelete_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UndeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_async", - "title": "bigtable modifyColumnFamilies Sample", - "origin": "API_DEFINITION", - "description": " 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 where only some modifications have taken effect.", - "canonical": true, - "file": "bigtable_table_admin.modify_column_families.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ModifyColumnFamilies", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "modifications", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ModifyColumnFamilies", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async", - "title": "bigtable dropRowRange Sample", - "origin": "API_DEFINITION", - "description": " Permanently drop/delete a row range from a specified table. The request can specify whether to delete all rows in a table, or only those that match a particular prefix.", - "canonical": true, - "file": "bigtable_table_admin.drop_row_range.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DropRowRange", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "row_key_prefix", - "type": "TYPE_BYTES" - }, - { - "name": "delete_all_data_from_table", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DropRowRange", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async", - "title": "bigtable generateConsistencyToken Sample", - "origin": "API_DEFINITION", - "description": " Generates a consistency token for a Table, which can be used in CheckConsistency to check whether mutations to the table that finished before this call started have been replicated. The tokens will be available for 90 days.", - "canonical": true, - "file": "bigtable_table_admin.generate_consistency_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateConsistencyToken", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.GenerateConsistencyTokenResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GenerateConsistencyToken", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async", - "title": "bigtable checkConsistency Sample", - "origin": "API_DEFINITION", - "description": " Checks replication consistency based on a consistency token, that is, if replication has caught up based on the conditions specified in the token and the check request.", - "canonical": true, - "file": "bigtable_table_admin.check_consistency.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckConsistency", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "consistency_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.CheckConsistencyResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CheckConsistency", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async", - "title": "bigtable snapshotTable Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.snapshot_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SnapshotTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_id", - "type": "TYPE_STRING" - }, - { - "name": "ttl", - "type": ".google.protobuf.Duration" - }, - { - "name": "description", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "SnapshotTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async", - "title": "bigtable getSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata information about the specified snapshot. 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.", - "canonical": true, - "file": "bigtable_table_admin.get_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Snapshot", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async", - "title": "bigtable listSnapshots Sample", - "origin": "API_DEFINITION", - "description": " Lists all snapshots associated with the specified cluster. 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.", - "canonical": true, - "file": "bigtable_table_admin.list_snapshots.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSnapshots", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListSnapshotsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListSnapshots", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async", - "title": "bigtable deleteSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Permanently deletes the specified snapshot. 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.", - "canonical": true, - "file": "bigtable_table_admin.delete_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async", - "title": "bigtable createBackup Sample", - "origin": "API_DEFINITION", - "description": " Starts creating a new Cloud Bigtable Backup. The returned backup [long-running operation][google.longrunning.Operation] can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup.", - "canonical": true, - "file": "bigtable_table_admin.create_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": ".google.bigtable.admin.v2.Backup" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async", - "title": "bigtable getBackup Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata on a pending or completed Cloud Bigtable Backup.", - "canonical": true, - "file": "bigtable_table_admin.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Backup", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async", - "title": "bigtable updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Updates a pending or completed Cloud Bigtable Backup.", - "canonical": true, - "file": "bigtable_table_admin.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "backup", - "type": ".google.bigtable.admin.v2.Backup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.bigtable.admin.v2.Backup", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async", - "title": "bigtable deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a pending or completed Cloud Bigtable backup.", - "canonical": true, - "file": "bigtable_table_admin.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async", - "title": "bigtable listBackups Sample", - "origin": "API_DEFINITION", - "description": " Lists Cloud Bigtable backups. Returns both completed and pending backups.", - "canonical": true, - "file": "bigtable_table_admin.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 121, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListBackupsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async", - "title": "bigtable restoreTable Sample", - "origin": "API_DEFINITION", - "description": " Create a new table by restoring from a completed backup. The new table must be in the same project as the instance containing the backup. The returned table [long-running operation][google.longrunning.Operation] can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful.", - "canonical": true, - "file": "bigtable_table_admin.restore_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "RestoreTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async", - "title": "bigtable getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.", - "canonical": true, - "file": "bigtable_table_admin.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async", - "title": "bigtable setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on a Table or Backup resource. Replaces any existing policy.", - "canonical": true, - "file": "bigtable_table_admin.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async", - "title": "bigtable testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that the caller has on the specified Table or Backup resource.", - "canonical": true, - "file": "bigtable_table_admin.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - } - ] -} diff --git a/samples/generated/v2/snippet_metadata.google.bigtable.v2.json b/samples/generated/v2/snippet_metadata.google.bigtable.v2.json deleted file mode 100644 index b84efb027..000000000 --- a/samples/generated/v2/snippet_metadata.google.bigtable.v2.json +++ /dev/null @@ -1,487 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-bigtable", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.bigtable.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadRows_async", - "title": "bigtable readRows Sample", - "origin": "API_DEFINITION", - "description": " Streams back the contents of all requested rows in key order, optionally applying the same Reader filter to each. Depending on their size, rows and cells may be broken up across multiple responses, but atomicity of each row will still be preserved. See the ReadRowsResponse documentation for details.", - "canonical": false, - "file": "bigtable.read_rows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 97, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadRows", - "fullName": "google.bigtable.v2.Bigtable.ReadRows", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "rows", - "type": ".google.bigtable.v2.RowSet" - }, - { - "name": "filter", - "type": ".google.bigtable.v2.RowFilter" - }, - { - "name": "rows_limit", - "type": "TYPE_INT64" - }, - { - "name": "request_stats_view", - "type": ".google.bigtable.v2.ReadRowsRequest.RequestStatsView" - }, - { - "name": "reversed", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.v2.ReadRowsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadRows", - "fullName": "google.bigtable.v2.Bigtable.ReadRows", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_SampleRowKeys_async", - "title": "bigtable sampleRowKeys Sample", - "origin": "API_DEFINITION", - "description": " Returns a sample of row keys in the table. The returned row keys will delimit contiguous sections of the table of approximately equal size, which can be used to break up the data for distributed tasks like mapreduces.", - "canonical": false, - "file": "bigtable.sample_row_keys.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SampleRowKeys", - "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.SampleRowKeysResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "SampleRowKeys", - "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_MutateRow_async", - "title": "bigtable mutateRow Sample", - "origin": "API_DEFINITION", - "description": " Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly changed by `mutation`.", - "canonical": false, - "file": "bigtable.mutate_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateRow", - "fullName": "google.bigtable.v2.Bigtable.MutateRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "mutations", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.MutateRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "MutateRow", - "fullName": "google.bigtable.v2.Bigtable.MutateRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_MutateRows_async", - "title": "bigtable mutateRows Sample", - "origin": "API_DEFINITION", - "description": " Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically.", - "canonical": false, - "file": "bigtable.mutate_rows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateRows", - "fullName": "google.bigtable.v2.Bigtable.MutateRows", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "entries", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.MutateRowsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "MutateRows", - "fullName": "google.bigtable.v2.Bigtable.MutateRows", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_CheckAndMutateRow_async", - "title": "bigtable checkAndMutateRow Sample", - "origin": "API_DEFINITION", - "description": " Mutates a row atomically based on the output of a predicate Reader filter.", - "canonical": false, - "file": "bigtable.check_and_mutate_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 93, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckAndMutateRow", - "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "predicate_filter", - "type": ".google.bigtable.v2.RowFilter" - }, - { - "name": "true_mutations", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "false_mutations", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.CheckAndMutateRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "CheckAndMutateRow", - "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_PingAndWarm_async", - "title": "bigtable pingAndWarm Sample", - "origin": "API_DEFINITION", - "description": " Warm up associated instance metadata for this connection. This call is not required but may be useful for connection keep-alive.", - "canonical": false, - "file": "bigtable.ping_and_warm.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PingAndWarm", - "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.PingAndWarmResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "PingAndWarm", - "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async", - "title": "bigtable readModifyWriteRow Sample", - "origin": "API_DEFINITION", - "description": " Modifies a row atomically on the server. The method reads the latest existing timestamp and value from the specified columns and writes a new entry based on pre-defined read/modify/write rules. The new value for the timestamp is the greater of the existing timestamp or the current server time. The method returns the new contents of all modified cells.", - "canonical": false, - "file": "bigtable.read_modify_write_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadModifyWriteRow", - "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "rules", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.ReadModifyWriteRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadModifyWriteRow", - "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async", - "title": "bigtable generateInitialChangeStreamPartitions Sample", - "origin": "API_DEFINITION", - "description": " NOTE: This API is intended to be used by Apache Beam BigtableIO. Returns the current list of partitions that make up the table's change stream. The union of partitions will cover the entire keyspace. Partitions can be read with `ReadChangeStream`.", - "canonical": false, - "file": "bigtable.generate_initial_change_stream_partitions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateInitialChangeStreamPartitions", - "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "GenerateInitialChangeStreamPartitions", - "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadChangeStream_async", - "title": "bigtable readChangeStream Sample", - "origin": "API_DEFINITION", - "description": " NOTE: This API is intended to be used by Apache Beam BigtableIO. Reads changes from a table's change stream. Changes will reflect both user-initiated mutations and mutations that are caused by garbage collection.", - "canonical": false, - "file": "bigtable.read_change_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 102, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadChangeStream", - "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "partition", - "type": ".google.bigtable.v2.StreamPartition" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "continuation_tokens", - "type": ".google.bigtable.v2.StreamContinuationTokens" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "heartbeat_duration", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.bigtable.v2.ReadChangeStreamResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadChangeStream", - "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - } - ] -} diff --git a/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json b/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json deleted file mode 100644 index bb995dd79..000000000 --- a/samples/generated/v2/snippet_metadata_google.bigtable.admin.v2.json +++ /dev/null @@ -1,2855 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-admin", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.bigtable.admin.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_async", - "title": "bigtable createInstance Sample", - "origin": "API_DEFINITION", - "description": " Create an instance within a project. Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.", - "canonical": true, - "file": "bigtable_instance_admin.create_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "instance_id", - "type": "TYPE_STRING" - }, - { - "name": "instance", - "type": ".google.bigtable.admin.v2.Instance" - }, - { - "name": "clusters", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_async", - "title": "bigtable getInstance Sample", - "origin": "API_DEFINITION", - "description": " Gets information about an instance.", - "canonical": true, - "file": "bigtable_instance_admin.get_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Instance", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_async", - "title": "bigtable listInstances Sample", - "origin": "API_DEFINITION", - "description": " Lists information about instances in a project.", - "canonical": true, - "file": "bigtable_instance_admin.list_instances.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListInstances", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListInstancesResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListInstances", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListInstances", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async", - "title": "bigtable updateInstance Sample", - "origin": "API_DEFINITION", - "description": " Updates an instance within a project. This method updates only the display name and type for an Instance. To update other Instance properties, such as labels, use PartialUpdateInstance.", - "canonical": true, - "file": "bigtable_instance_admin.update_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 99, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "display_name", - "type": "TYPE_STRING" - }, - { - "name": "state", - "type": ".google.bigtable.admin.v2.Instance.State" - }, - { - "name": "type", - "type": ".google.bigtable.admin.v2.Instance.Type" - }, - { - "name": "labels", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "create_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "satisfies_pzs", - "type": "TYPE_BOOL" - }, - { - "name": "satisfies_pzi", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.Instance", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_async", - "title": "bigtable partialUpdateInstance Sample", - "origin": "API_DEFINITION", - "description": " Partially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance.", - "canonical": true, - "file": "bigtable_instance_admin.partial_update_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PartialUpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", - "async": true, - "parameters": [ - { - "name": "instance", - "type": ".google.bigtable.admin.v2.Instance" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "PartialUpdateInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_async", - "title": "bigtable deleteInstance Sample", - "origin": "API_DEFINITION", - "description": " Delete an instance from a project.", - "canonical": true, - "file": "bigtable_instance_admin.delete_instance.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteInstance", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteInstance", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_async", - "title": "bigtable createCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a cluster within an instance. Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.", - "canonical": true, - "file": "bigtable_instance_admin.create_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": ".google.bigtable.admin.v2.Cluster" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_async", - "title": "bigtable getCluster Sample", - "origin": "API_DEFINITION", - "description": " Gets information about a cluster.", - "canonical": true, - "file": "bigtable_instance_admin.get_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Cluster", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_async", - "title": "bigtable listClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists information about clusters in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListClusters", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListClustersResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListClusters", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListClusters", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async", - "title": "bigtable updateCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates a cluster within an instance. Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster.", - "canonical": true, - "file": "bigtable_instance_admin.update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 93, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "location", - "type": "TYPE_STRING" - }, - { - "name": "state", - "type": ".google.bigtable.admin.v2.Cluster.State" - }, - { - "name": "serve_nodes", - "type": "TYPE_INT32" - }, - { - "name": "node_scaling_factor", - "type": ".google.bigtable.admin.v2.Cluster.NodeScalingFactor" - }, - { - "name": "cluster_config", - "type": ".google.bigtable.admin.v2.Cluster.ClusterConfig" - }, - { - "name": "default_storage_type", - "type": ".google.bigtable.admin.v2.StorageType" - }, - { - "name": "encryption_config", - "type": ".google.bigtable.admin.v2.Cluster.EncryptionConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async", - "title": "bigtable partialUpdateCluster Sample", - "origin": "API_DEFINITION", - "description": " Partially updates a cluster within a project. This method is the preferred way to update a Cluster. To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the update_mask. To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask.", - "canonical": true, - "file": "bigtable_instance_admin.partial_update_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PartialUpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", - "async": true, - "parameters": [ - { - "name": "cluster", - "type": ".google.bigtable.admin.v2.Cluster" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "PartialUpdateCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_async", - "title": "bigtable deleteCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes a cluster from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteCluster", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteCluster", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_async", - "title": "bigtable createAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Creates an app profile within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.create_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "app_profile", - "type": ".google.bigtable.admin.v2.AppProfile" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.AppProfile", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_async", - "title": "bigtable getAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Gets information about an app profile.", - "canonical": true, - "file": "bigtable_instance_admin.get_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.AppProfile", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_async", - "title": "bigtable listAppProfiles Sample", - "origin": "API_DEFINITION", - "description": " Lists information about app profiles in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_app_profiles.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAppProfiles", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListAppProfilesResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListAppProfiles", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListAppProfiles", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_async", - "title": "bigtable updateAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Updates an app profile within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.update_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", - "async": true, - "parameters": [ - { - "name": "app_profile", - "type": ".google.bigtable.admin.v2.AppProfile" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_async", - "title": "bigtable deleteAppProfile Sample", - "origin": "API_DEFINITION", - "description": " Deletes an app profile from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_app_profile.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteAppProfile", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteAppProfile", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_async", - "title": "bigtable getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.", - "canonical": true, - "file": "bigtable_instance_admin.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetIamPolicy", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_async", - "title": "bigtable setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on an instance resource. Replaces any existing policy.", - "canonical": true, - "file": "bigtable_instance_admin.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.SetIamPolicy", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_async", - "title": "bigtable testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that the caller has on the specified instance resource.", - "canonical": true, - "file": "bigtable_instance_admin.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.TestIamPermissions", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_async", - "title": "bigtable listHotTablets Sample", - "origin": "API_DEFINITION", - "description": " Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage.", - "canonical": true, - "file": "bigtable_instance_admin.list_hot_tablets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 84, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListHotTablets", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListHotTabletsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListHotTablets", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListHotTablets", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateLogicalView_async", - "title": "bigtable createLogicalView Sample", - "origin": "API_DEFINITION", - "description": " Creates a logical view within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.create_logical_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateLogicalView", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "logical_view_id", - "type": "TYPE_STRING" - }, - { - "name": "logical_view", - "type": ".google.bigtable.admin.v2.LogicalView" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateLogicalView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetLogicalView_async", - "title": "bigtable getLogicalView Sample", - "origin": "API_DEFINITION", - "description": " Gets information about a logical view.", - "canonical": true, - "file": "bigtable_instance_admin.get_logical_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetLogicalView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.LogicalView", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetLogicalView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListLogicalViews_async", - "title": "bigtable listLogicalViews Sample", - "origin": "API_DEFINITION", - "description": " Lists information about logical views in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_logical_views.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListLogicalViews", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListLogicalViews", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListLogicalViewsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListLogicalViews", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListLogicalViews", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateLogicalView_async", - "title": "bigtable updateLogicalView Sample", - "origin": "API_DEFINITION", - "description": " Updates a logical view within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.update_logical_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateLogicalView", - "async": true, - "parameters": [ - { - "name": "logical_view", - "type": ".google.bigtable.admin.v2.LogicalView" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateLogicalView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteLogicalView_async", - "title": "bigtable deleteLogicalView Sample", - "origin": "API_DEFINITION", - "description": " Deletes a logical view from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_logical_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteLogicalView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteLogicalView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteLogicalView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateMaterializedView_async", - "title": "bigtable createMaterializedView Sample", - "origin": "API_DEFINITION", - "description": " Creates a materialized view within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.create_materialized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateMaterializedView", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "materialized_view_id", - "type": "TYPE_STRING" - }, - { - "name": "materialized_view", - "type": ".google.bigtable.admin.v2.MaterializedView" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "CreateMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.CreateMaterializedView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_GetMaterializedView_async", - "title": "bigtable getMaterializedView Sample", - "origin": "API_DEFINITION", - "description": " Gets information about a materialized view.", - "canonical": true, - "file": "bigtable_instance_admin.get_materialized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetMaterializedView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.MaterializedView", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "GetMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.GetMaterializedView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_ListMaterializedViews_async", - "title": "bigtable listMaterializedViews Sample", - "origin": "API_DEFINITION", - "description": " Lists information about materialized views in an instance.", - "canonical": true, - "file": "bigtable_instance_admin.list_materialized_views.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMaterializedViews", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListMaterializedViews", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListMaterializedViewsResponse", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "ListMaterializedViews", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.ListMaterializedViews", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateMaterializedView_async", - "title": "bigtable updateMaterializedView Sample", - "origin": "API_DEFINITION", - "description": " Updates a materialized view within an instance.", - "canonical": true, - "file": "bigtable_instance_admin.update_materialized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateMaterializedView", - "async": true, - "parameters": [ - { - "name": "materialized_view", - "type": ".google.bigtable.admin.v2.MaterializedView" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "UpdateMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.UpdateMaterializedView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteMaterializedView_async", - "title": "bigtable deleteMaterializedView Sample", - "origin": "API_DEFINITION", - "description": " Deletes a materialized view from an instance.", - "canonical": true, - "file": "bigtable_instance_admin.delete_materialized_view.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteMaterializedView", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableInstanceAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdminClient" - }, - "method": { - "shortName": "DeleteMaterializedView", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin.DeleteMaterializedView", - "service": { - "shortName": "BigtableInstanceAdmin", - "fullName": "google.bigtable.admin.v2.BigtableInstanceAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_async", - "title": "bigtable createTable Sample", - "origin": "API_DEFINITION", - "description": " Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.", - "canonical": true, - "file": "bigtable_table_admin.create_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "table", - "type": ".google.bigtable.admin.v2.Table" - }, - { - "name": "initial_splits", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_async", - "title": "bigtable createTableFromSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Creates a new table from the specified snapshot. The target table must not exist. The snapshot 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.", - "canonical": true, - "file": "bigtable_table_admin.create_table_from_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTableFromSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "source_snapshot", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateTableFromSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_async", - "title": "bigtable listTables Sample", - "origin": "API_DEFINITION", - "description": " Lists all tables served from a specified instance.", - "canonical": true, - "file": "bigtable_table_admin.list_tables.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTables", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.Table.View" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListTablesResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListTables", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListTables", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_async", - "title": "bigtable getTable Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata information about the specified table.", - "canonical": true, - "file": "bigtable_table_admin.get_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.bigtable.admin.v2.Table.View" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_async", - "title": "bigtable updateTable Sample", - "origin": "API_DEFINITION", - "description": " Updates a specified table.", - "canonical": true, - "file": "bigtable_table_admin.update_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", - "async": true, - "parameters": [ - { - "name": "table", - "type": ".google.bigtable.admin.v2.Table" - }, - { - "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": "UpdateTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_async", - "title": "bigtable deleteTable Sample", - "origin": "API_DEFINITION", - "description": " Permanently deletes a specified table and all of its data.", - "canonical": true, - "file": "bigtable_table_admin.delete_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_async", - "title": "bigtable undeleteTable Sample", - "origin": "API_DEFINITION", - "description": " Restores a specified table which was accidentally deleted.", - "canonical": true, - "file": "bigtable_table_admin.undelete_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UndeleteTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "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", - "origin": "API_DEFINITION", - "description": " 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 where only some modifications have taken effect.", - "canonical": true, - "file": "bigtable_table_admin.modify_column_families.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ModifyColumnFamilies", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "modifications", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "ignore_warnings", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.admin.v2.Table", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ModifyColumnFamilies", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_async", - "title": "bigtable dropRowRange Sample", - "origin": "API_DEFINITION", - "description": " Permanently drop/delete a row range from a specified table. The request can specify whether to delete all rows in a table, or only those that match a particular prefix.", - "canonical": true, - "file": "bigtable_table_admin.drop_row_range.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DropRowRange", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "row_key_prefix", - "type": "TYPE_BYTES" - }, - { - "name": "delete_all_data_from_table", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DropRowRange", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_async", - "title": "bigtable generateConsistencyToken Sample", - "origin": "API_DEFINITION", - "description": " Generates a consistency token for a Table, which can be used in CheckConsistency to check whether mutations to the table that finished before this call started have been replicated. The tokens will be available for 90 days.", - "canonical": true, - "file": "bigtable_table_admin.generate_consistency_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateConsistencyToken", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.GenerateConsistencyTokenResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GenerateConsistencyToken", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_async", - "title": "bigtable checkConsistency Sample", - "origin": "API_DEFINITION", - "description": " Checks replication consistency based on a consistency token, that is, if replication has caught up based on the conditions specified in the token and the check request.", - "canonical": true, - "file": "bigtable_table_admin.check_consistency.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckConsistency", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "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", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CheckConsistency", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_async", - "title": "bigtable snapshotTable Sample", - "origin": "API_DEFINITION", - "description": " 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.", - "canonical": true, - "file": "bigtable_table_admin.snapshot_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SnapshotTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "cluster", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_id", - "type": "TYPE_STRING" - }, - { - "name": "ttl", - "type": ".google.protobuf.Duration" - }, - { - "name": "description", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "SnapshotTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_async", - "title": "bigtable getSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata information about the specified snapshot. 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.", - "canonical": true, - "file": "bigtable_table_admin.get_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Snapshot", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_async", - "title": "bigtable listSnapshots Sample", - "origin": "API_DEFINITION", - "description": " Lists all snapshots associated with the specified cluster. 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.", - "canonical": true, - "file": "bigtable_table_admin.list_snapshots.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSnapshots", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListSnapshotsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListSnapshots", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_async", - "title": "bigtable deleteSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Permanently deletes the specified snapshot. 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.", - "canonical": true, - "file": "bigtable_table_admin.delete_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteSnapshot", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_async", - "title": "bigtable createBackup Sample", - "origin": "API_DEFINITION", - "description": " Starts creating a new Cloud Bigtable Backup. The returned backup [long-running operation][google.longrunning.Operation] can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup.", - "canonical": true, - "file": "bigtable_table_admin.create_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": ".google.bigtable.admin.v2.Backup" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CreateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_async", - "title": "bigtable getBackup Sample", - "origin": "API_DEFINITION", - "description": " Gets metadata on a pending or completed Cloud Bigtable Backup.", - "canonical": true, - "file": "bigtable_table_admin.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.Backup", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_async", - "title": "bigtable updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Updates a pending or completed Cloud Bigtable Backup.", - "canonical": true, - "file": "bigtable_table_admin.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "backup", - "type": ".google.bigtable.admin.v2.Backup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.bigtable.admin.v2.Backup", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_async", - "title": "bigtable deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a pending or completed Cloud Bigtable backup.", - "canonical": true, - "file": "bigtable_table_admin.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_async", - "title": "bigtable listBackups Sample", - "origin": "API_DEFINITION", - "description": " Lists Cloud Bigtable backups. Returns both completed and pending backups.", - "canonical": true, - "file": "bigtable_table_admin.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 123, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.admin.v2.ListBackupsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.ListBackups", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async", - "title": "bigtable restoreTable Sample", - "origin": "API_DEFINITION", - "description": " Create a new table by restoring from a completed backup. The returned table [long-running operation][google.longrunning.Operation] can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful.", - "canonical": true, - "file": "bigtable_table_admin.restore_table.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "table_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "RestoreTable", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_async", - "title": "bigtable copyBackup Sample", - "origin": "API_DEFINITION", - "description": " Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.", - "canonical": true, - "file": "bigtable_table_admin.copy_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 86, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CopyBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "source_backup", - "type": "TYPE_STRING" - }, - { - "name": "expire_time", - "type": ".google.protobuf.Timestamp" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "CopyBackup", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_async", - "title": "bigtable getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a Table or Backup resource. Returns an empty policy if the resource exists but does not have a policy set.", - "canonical": true, - "file": "bigtable_table_admin.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.GetIamPolicy", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_async", - "title": "bigtable setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy on a Table or Backup resource. Replaces any existing policy.", - "canonical": true, - "file": "bigtable_table_admin.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.SetIamPolicy", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - }, - { - "regionTag": "bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_async", - "title": "bigtable testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns permissions that the caller has on the specified Table or Backup resource.", - "canonical": true, - "file": "bigtable_table_admin.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BigtableTableAdminClient", - "fullName": "google.bigtable.admin.v2.BigtableTableAdminClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin.TestIamPermissions", - "service": { - "shortName": "BigtableTableAdmin", - "fullName": "google.bigtable.admin.v2.BigtableTableAdmin" - } - } - } - } - ] -} diff --git a/samples/generated/v2/snippet_metadata_google.bigtable.v2.json b/samples/generated/v2/snippet_metadata_google.bigtable.v2.json deleted file mode 100644 index 1d4713000..000000000 --- a/samples/generated/v2/snippet_metadata_google.bigtable.v2.json +++ /dev/null @@ -1,643 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-bigtable", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.bigtable.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadRows_async", - "title": "bigtable readRows Sample", - "origin": "API_DEFINITION", - "description": " Streams back the contents of all requested rows in key order, optionally applying the same Reader filter to each. Depending on their size, rows and cells may be broken up across multiple responses, but atomicity of each row will still be preserved. See the ReadRowsResponse documentation for details.", - "canonical": false, - "file": "bigtable.read_rows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 108, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadRows", - "fullName": "google.bigtable.v2.Bigtable.ReadRows", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "materialized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "rows", - "type": ".google.bigtable.v2.RowSet" - }, - { - "name": "filter", - "type": ".google.bigtable.v2.RowFilter" - }, - { - "name": "rows_limit", - "type": "TYPE_INT64" - }, - { - "name": "request_stats_view", - "type": ".google.bigtable.v2.ReadRowsRequest.RequestStatsView" - }, - { - "name": "reversed", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.bigtable.v2.ReadRowsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadRows", - "fullName": "google.bigtable.v2.Bigtable.ReadRows", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_SampleRowKeys_async", - "title": "bigtable sampleRowKeys Sample", - "origin": "API_DEFINITION", - "description": " Returns a sample of row keys in the table. The returned row keys will delimit contiguous sections of the table of approximately equal size, which can be used to break up the data for distributed tasks like mapreduces.", - "canonical": false, - "file": "bigtable.sample_row_keys.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SampleRowKeys", - "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "materialized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.SampleRowKeysResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "SampleRowKeys", - "fullName": "google.bigtable.v2.Bigtable.SampleRowKeys", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_MutateRow_async", - "title": "bigtable mutateRow Sample", - "origin": "API_DEFINITION", - "description": " Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly changed by `mutation`.", - "canonical": false, - "file": "bigtable.mutate_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 88, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateRow", - "fullName": "google.bigtable.v2.Bigtable.MutateRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "mutations", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "idempotency", - "type": ".google.bigtable.v2.Idempotency" - } - ], - "resultType": ".google.bigtable.v2.MutateRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "MutateRow", - "fullName": "google.bigtable.v2.Bigtable.MutateRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_MutateRows_async", - "title": "bigtable mutateRows Sample", - "origin": "API_DEFINITION", - "description": " Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically.", - "canonical": false, - "file": "bigtable.mutate_rows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "MutateRows", - "fullName": "google.bigtable.v2.Bigtable.MutateRows", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "entries", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.MutateRowsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "MutateRows", - "fullName": "google.bigtable.v2.Bigtable.MutateRows", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_CheckAndMutateRow_async", - "title": "bigtable checkAndMutateRow Sample", - "origin": "API_DEFINITION", - "description": " Mutates a row atomically based on the output of a predicate Reader filter.", - "canonical": false, - "file": "bigtable.check_and_mutate_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 100, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckAndMutateRow", - "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "predicate_filter", - "type": ".google.bigtable.v2.RowFilter" - }, - { - "name": "true_mutations", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "false_mutations", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.CheckAndMutateRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "CheckAndMutateRow", - "fullName": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_PingAndWarm_async", - "title": "bigtable pingAndWarm Sample", - "origin": "API_DEFINITION", - "description": " Warm up associated instance metadata for this connection. This call is not required but may be useful for connection keep-alive.", - "canonical": false, - "file": "bigtable.ping_and_warm.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PingAndWarm", - "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.PingAndWarmResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "PingAndWarm", - "fullName": "google.bigtable.v2.Bigtable.PingAndWarm", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async", - "title": "bigtable readModifyWriteRow Sample", - "origin": "API_DEFINITION", - "description": " Modifies a row atomically on the server. The method reads the latest existing timestamp and value from the specified columns and writes a new entry based on pre-defined read/modify/write rules. The new value for the timestamp is the greater of the existing timestamp or the current server time. The method returns the new contents of all modified cells.", - "canonical": false, - "file": "bigtable.read_modify_write_row.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadModifyWriteRow", - "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "authorized_view_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "row_key", - "type": "TYPE_BYTES" - }, - { - "name": "rules", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.ReadModifyWriteRowResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadModifyWriteRow", - "fullName": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async", - "title": "bigtable generateInitialChangeStreamPartitions Sample", - "origin": "API_DEFINITION", - "description": " Returns the current list of partitions that make up the table's change stream. The union of partitions will cover the entire keyspace. Partitions can be read with `ReadChangeStream`. NOTE: This API is only intended to be used by Apache Beam BigtableIO.", - "canonical": false, - "file": "bigtable.generate_initial_change_stream_partitions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateInitialChangeStreamPartitions", - "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "GenerateInitialChangeStreamPartitions", - "fullName": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ReadChangeStream_async", - "title": "bigtable readChangeStream Sample", - "origin": "API_DEFINITION", - "description": " Reads changes from a table's change stream. Changes will reflect both user-initiated mutations and mutations that are caused by garbage collection. NOTE: This API is only intended to be used by Apache Beam BigtableIO.", - "canonical": false, - "file": "bigtable.read_change_stream.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 102, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReadChangeStream", - "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", - "async": true, - "parameters": [ - { - "name": "table_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "partition", - "type": ".google.bigtable.v2.StreamPartition" - }, - { - "name": "start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "continuation_tokens", - "type": ".google.bigtable.v2.StreamContinuationTokens" - }, - { - "name": "end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "heartbeat_duration", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.bigtable.v2.ReadChangeStreamResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ReadChangeStream", - "fullName": "google.bigtable.v2.Bigtable.ReadChangeStream", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_PrepareQuery_async", - "title": "bigtable prepareQuery Sample", - "origin": "API_DEFINITION", - "description": " Prepares a GoogleSQL query for execution on a particular Bigtable instance.", - "canonical": false, - "file": "bigtable.prepare_query.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PrepareQuery", - "fullName": "google.bigtable.v2.Bigtable.PrepareQuery", - "async": true, - "parameters": [ - { - "name": "instance_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "proto_format", - "type": ".google.bigtable.v2.ProtoFormat" - }, - { - "name": "param_types", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.PrepareQueryResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "PrepareQuery", - "fullName": "google.bigtable.v2.Bigtable.PrepareQuery", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - }, - { - "regionTag": "bigtable_v2_generated_Bigtable_ExecuteQuery_async", - "title": "bigtable executeQuery Sample", - "origin": "API_DEFINITION", - "description": " Executes a SQL query against a particular Bigtable instance.", - "canonical": false, - "file": "bigtable.execute_query.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 29, - "end": 121, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteQuery", - "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", - "async": true, - "parameters": [ - { - "name": "instance_name", - "type": "TYPE_STRING" - }, - { - "name": "app_profile_id", - "type": "TYPE_STRING" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "prepared_query", - "type": "TYPE_BYTES" - }, - { - "name": "proto_format", - "type": ".google.bigtable.v2.ProtoFormat" - }, - { - "name": "resume_token", - "type": "TYPE_BYTES" - }, - { - "name": "params", - "type": "TYPE_MESSAGE[]" - } - ], - "resultType": ".google.bigtable.v2.ExecuteQueryResponse", - "client": { - "shortName": "BigtableClient", - "fullName": "google.bigtable.v2.BigtableClient" - }, - "method": { - "shortName": "ExecuteQuery", - "fullName": "google.bigtable.v2.Bigtable.ExecuteQuery", - "service": { - "shortName": "Bigtable", - "fullName": "google.bigtable.v2.Bigtable" - } - } - } - } - ] -} From c2064de08f67e053ea8531ca98fe10065d411528 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:56:06 -0500 Subject: [PATCH 11/20] feat: move admin builder methods to be more namespaced --- src/index.ts | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4b9784075..af14cef55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -114,6 +114,38 @@ export interface BigtableOptions extends gax.GoogleAuthOptions { metricsEnabled?: boolean; } +/** + * Bigtable admin client accessor. These methods let you instantiate the + * admin client classes more easily, if you already have a `Bigtable` object. + * You can still create them directly, but this saves you some trouble with + * figuring out auth and other configuration. + */ +export class BigtableAdminClients { + constructor(private bigtable: Bigtable) {} + + /** + * Creates a client for table administration. + * + * @returns The admin client + */ + getTableAdminClient() { + return new admin.TableAdminClient( + this.bigtable.options.BigtableTableAdminClient, + ); + } + + /** + * Creates a client for instance administration. + * + * @returns The admin client + */ + getInstanceAdminClient() { + return new admin.InstanceAdminClient( + this.bigtable.options.BigtableInstanceAdminClient, + ); + } +} + /** * Retrieves the universe domain, if configured. * @@ -486,6 +518,7 @@ export class Bigtable { static Instance: Instance; static Cluster: Cluster; _metricsConfigManager: ClientSideMetricsConfigManager; + admin: BigtableAdminClients; constructor(options: BigtableOptions = {}) { // Determine what scopes are needed. @@ -583,6 +616,7 @@ export class Bigtable { BigtableInstanceAdminClient: instanceAdminOptions, BigtableTableAdminClient: adminOptions, }; + this.admin = new BigtableAdminClients(this); this.api = {}; this.auth = new GoogleAuth(Object.assign({}, baseOptions, options)); @@ -597,14 +631,6 @@ export class Bigtable { this._metricsConfigManager = new ClientSideMetricsConfigManager(handlers); } - getTableAdminClient() { - return new admin.TableAdminClient(this.options.BigtableTableAdminClient); - } - - getInstanceAdminClient() { - return new admin.TableAdminClient(this.options.BigtableInstanceAdminClient); - } - createInstance( id: string, options: InstanceOptions, From 61fecdd288f5f5753e877fb62762825b4ad1ed40 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:56:20 -0500 Subject: [PATCH 12/20] fix: updated GcRuleBuilder import --- src/admin/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/index.ts b/src/admin/index.ts index 633cc2d9a..652e8fe6a 100644 --- a/src/admin/index.ts +++ b/src/admin/index.ts @@ -15,4 +15,4 @@ export * as v2 from './v2'; export {TableAdminClient} from './table'; export {InstanceAdminClient} from './instance'; -export {GcRules} from './gc-rule-builder'; +export {GcRuleBuilder} from './gc-rule-builder'; From c828192c6500eac62713182a71dcc14fe4a122a7 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:51:38 -0500 Subject: [PATCH 13/20] build: transform class names for selective gapic --- owlbot.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/owlbot.py b/owlbot.py index 7833af5a8..c705a6880 100644 --- a/owlbot.py +++ b/owlbot.py @@ -98,10 +98,23 @@ for tfn in tfns: logging.info(f"munging test file: {str(tfn)}") contents = tfn.read_text() + + # Fix relative paths. contents = contents.replace("'../", "'../../../") + + # Use the selective subclasses. + contents = contents.replace(".v2.BigtableInstanceAdminClient", ".InstanceAdminClient") + contents = contents.replace(".v2.BigtableTableAdminClient", ".TableAdminClient") + + # Statics also. + contents = contents.replace("bigtabletableadminModule.v2.BigtableTableAdminClient", \ + "bigtabletableadminModule.TableAdminClient") + contents = contents.replace("bigtabletableadminModule.v2.BigtableInstanceAdminClient", \ + "bigtabletableadminModule.InstanceAdminClient") + tfn.write_text(contents) - # Finally, the samples. .v2 -> .admin.v2 + # Finally, the samples. Shift to selective subclasses. samplesStr = str(samples) sfns = [fn for fn @@ -110,7 +123,12 @@ for sfn in sfns: logging.info(f"munging sample file: {str(sfn)}") contents = sfn.read_text() - contents = contents.replace(').v2', ').admin.v2') + contents = contents.replace("const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2", \ + "const {InstanceAdminClient} = require('@google-cloud/bigtable').admin") + contents = contents.replace("const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2", \ + "const {TableAdminClient} = require('@google-cloud/bigtable').admin") + contents = contents.replace("new BigtableInstanceAdminClient", "new InstanceAdminClient") + contents = contents.replace("new BigtableTableAdminClient", "new TableAdminClient") sfn.write_text(contents) os.system(f"mkdir -p {inProtoPath}") From 795ac42c77fbdd9435a60233f5267a8f7a390973 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:58:32 -0500 Subject: [PATCH 14/20] feat: adjust BigtableAdmin for recent doc updates --- src/admin/clients.ts | 64 ++++++++++++++++++++++++++++++++++++++++++++ src/admin/index.ts | 1 + src/index.ts | 40 +++------------------------ 3 files changed, 69 insertions(+), 36 deletions(-) create mode 100644 src/admin/clients.ts diff --git a/src/admin/clients.ts b/src/admin/clients.ts new file mode 100644 index 000000000..48bb3d32e --- /dev/null +++ b/src/admin/clients.ts @@ -0,0 +1,64 @@ +// Copyright 2025 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. + +import {Bigtable} from '../'; +import {TableAdminClient} from './table'; +import {InstanceAdminClient} from './instance'; +import * as gax from 'google-gax'; + +/** + * Bigtable admin client accessor. These methods let you instantiate the + * admin client classes more easily, if you already have a `Bigtable` object. + * You can still create them directly, but this saves you some trouble with + * figuring out auth and other configuration. + */ +export class BigtableAdmin { + private tableAdminOptions: gax.ClientOptions; + private instanceAdminOptions: gax.ClientOptions; + + constructor(clientOptions?: gax.ClientOptions) { + this.tableAdminOptions = clientOptions ?? {}; + this.instanceAdminOptions = clientOptions ?? {}; + } + + /** + * Creates a BigtableAdmin using the values derived by `Bigtable`. + * + * @param bigtable Bigtable The Bigtable object to read settings from + * @returns A configured BigtableAdmin + */ + static fromBigtable(bigtable: Bigtable) { + // The Bigtable object has separate values for table and instance clients, + // but they should functionally be the same. + return new BigtableAdmin(bigtable.options.BigtableTableAdminClient); + } + + /** + * Creates a client for table administration. + * + * @returns The admin client + */ + getTableAdminClient(options?: gax.ClientOptions) { + return new TableAdminClient(options ?? this.tableAdminOptions); + } + + /** + * Creates a client for instance administration. + * + * @returns The admin client + */ + getInstanceAdminClient(options?: gax.ClientOptions) { + return new InstanceAdminClient(options ?? this.instanceAdminOptions); + } +} diff --git a/src/admin/index.ts b/src/admin/index.ts index 652e8fe6a..8475f4170 100644 --- a/src/admin/index.ts +++ b/src/admin/index.ts @@ -16,3 +16,4 @@ export * as v2 from './v2'; export {TableAdminClient} from './table'; export {InstanceAdminClient} from './instance'; export {GcRuleBuilder} from './gc-rule-builder'; +export {BigtableAdmin} from './clients'; diff --git a/src/index.ts b/src/index.ts index af14cef55..380536a0a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -114,38 +114,6 @@ export interface BigtableOptions extends gax.GoogleAuthOptions { metricsEnabled?: boolean; } -/** - * Bigtable admin client accessor. These methods let you instantiate the - * admin client classes more easily, if you already have a `Bigtable` object. - * You can still create them directly, but this saves you some trouble with - * figuring out auth and other configuration. - */ -export class BigtableAdminClients { - constructor(private bigtable: Bigtable) {} - - /** - * Creates a client for table administration. - * - * @returns The admin client - */ - getTableAdminClient() { - return new admin.TableAdminClient( - this.bigtable.options.BigtableTableAdminClient, - ); - } - - /** - * Creates a client for instance administration. - * - * @returns The admin client - */ - getInstanceAdminClient() { - return new admin.InstanceAdminClient( - this.bigtable.options.BigtableInstanceAdminClient, - ); - } -} - /** * Retrieves the universe domain, if configured. * @@ -518,7 +486,7 @@ export class Bigtable { static Instance: Instance; static Cluster: Cluster; _metricsConfigManager: ClientSideMetricsConfigManager; - admin: BigtableAdminClients; + admin: admin.BigtableAdmin; constructor(options: BigtableOptions = {}) { // Determine what scopes are needed. @@ -526,8 +494,8 @@ export class Bigtable { const scopes: string[] = []; const clientClasses = [ v2.BigtableClient, - v2.BigtableInstanceAdminClient, - v2.BigtableTableAdminClient, + admin.v2.BigtableInstanceAdminClient, + admin.v2.BigtableTableAdminClient, ]; for (const clientClass of clientClasses) { for (const scope of clientClass.scopes) { @@ -616,7 +584,7 @@ export class Bigtable { BigtableInstanceAdminClient: instanceAdminOptions, BigtableTableAdminClient: adminOptions, }; - this.admin = new BigtableAdminClients(this); + this.admin = admin.BigtableAdmin.fromBigtable(this); this.api = {}; this.auth = new GoogleAuth(Object.assign({}, baseOptions, options)); From cecdfffb925d883086350cb1bc48c12bd1c341c0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Dec 2025 22:05:10 +0000 Subject: [PATCH 15/20] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 896aa0044..19cb238bc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # [Cloud Bigtable: Node.js Client](https://github.com/googleapis/nodejs-bigtable) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.org/package/@google-cloud/bigtable) +[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.com/package/@google-cloud/bigtable) @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Bigtable API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -167,4 +167,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-bigtable/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local From f1da03f0ec026903ee61eb588b16770d3a22877d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Dec 2025 22:06:31 +0000 Subject: [PATCH 16/20] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 896aa0044..19cb238bc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # [Cloud Bigtable: Node.js Client](https://github.com/googleapis/nodejs-bigtable) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.org/package/@google-cloud/bigtable) +[![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.com/package/@google-cloud/bigtable) @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Bigtable API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -167,4 +167,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-bigtable/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local From 05fd23f49d1cd8580e927da872483dcc15c82be6 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Thu, 11 Dec 2025 22:28:10 +0000 Subject: [PATCH 17/20] fix: owlbot.py updates and resulting fixes --- owlbot.py | 12 +- ...table_instance_admin.create_app_profile.js | 4 +- .../bigtable_instance_admin.create_cluster.js | 4 +- ...bigtable_instance_admin.create_instance.js | 4 +- ...able_instance_admin.create_logical_view.js | 4 +- ...instance_admin.create_materialized_view.js | 4 +- ...table_instance_admin.delete_app_profile.js | 4 +- .../bigtable_instance_admin.delete_cluster.js | 4 +- ...bigtable_instance_admin.delete_instance.js | 4 +- ...able_instance_admin.delete_logical_view.js | 4 +- ...instance_admin.delete_materialized_view.js | 4 +- ...bigtable_instance_admin.get_app_profile.js | 4 +- .../v2/bigtable_instance_admin.get_cluster.js | 4 +- .../bigtable_instance_admin.get_iam_policy.js | 4 +- .../bigtable_instance_admin.get_instance.js | 4 +- ...igtable_instance_admin.get_logical_view.js | 4 +- ...le_instance_admin.get_materialized_view.js | 4 +- ...gtable_instance_admin.list_app_profiles.js | 4 +- .../bigtable_instance_admin.list_clusters.js | 4 +- ...igtable_instance_admin.list_hot_tablets.js | 4 +- .../bigtable_instance_admin.list_instances.js | 4 +- ...table_instance_admin.list_logical_views.js | 4 +- ..._instance_admin.list_materialized_views.js | 4 +- ...e_instance_admin.partial_update_cluster.js | 4 +- ..._instance_admin.partial_update_instance.js | 4 +- .../bigtable_instance_admin.set_iam_policy.js | 4 +- ...ble_instance_admin.test_iam_permissions.js | 4 +- ...table_instance_admin.update_app_profile.js | 4 +- .../bigtable_instance_admin.update_cluster.js | 4 +- ...bigtable_instance_admin.update_instance.js | 4 +- ...able_instance_admin.update_logical_view.js | 4 +- ...instance_admin.update_materialized_view.js | 4 +- .../bigtable_table_admin.check_consistency.js | 4 +- .../v2/bigtable_table_admin.copy_backup.js | 4 +- ...able_table_admin.create_authorized_view.js | 4 +- .../v2/bigtable_table_admin.create_backup.js | 4 +- ...gtable_table_admin.create_schema_bundle.js | 4 +- .../v2/bigtable_table_admin.create_table.js | 4 +- ..._table_admin.create_table_from_snapshot.js | 4 +- ...able_table_admin.delete_authorized_view.js | 4 +- .../v2/bigtable_table_admin.delete_backup.js | 4 +- ...gtable_table_admin.delete_schema_bundle.js | 4 +- .../bigtable_table_admin.delete_snapshot.js | 4 +- .../v2/bigtable_table_admin.delete_table.js | 4 +- .../v2/bigtable_table_admin.drop_row_range.js | 4 +- ..._table_admin.generate_consistency_token.js | 4 +- ...igtable_table_admin.get_authorized_view.js | 4 +- .../v2/bigtable_table_admin.get_backup.js | 4 +- .../v2/bigtable_table_admin.get_iam_policy.js | 4 +- .../bigtable_table_admin.get_schema_bundle.js | 4 +- .../v2/bigtable_table_admin.get_snapshot.js | 4 +- .../v2/bigtable_table_admin.get_table.js | 4 +- ...table_table_admin.list_authorized_views.js | 4 +- .../v2/bigtable_table_admin.list_backups.js | 4 +- ...igtable_table_admin.list_schema_bundles.js | 4 +- .../v2/bigtable_table_admin.list_snapshots.js | 4 +- .../v2/bigtable_table_admin.list_tables.js | 4 +- ...able_table_admin.modify_column_families.js | 4 +- .../v2/bigtable_table_admin.restore_table.js | 4 +- .../v2/bigtable_table_admin.set_iam_policy.js | 4 +- .../v2/bigtable_table_admin.snapshot_table.js | 4 +- ...gtable_table_admin.test_iam_permissions.js | 4 +- .../v2/bigtable_table_admin.undelete_table.js | 4 +- ...able_table_admin.update_authorized_view.js | 4 +- .../v2/bigtable_table_admin.update_backup.js | 4 +- ...gtable_table_admin.update_schema_bundle.js | 4 +- .../v2/bigtable_table_admin.update_table.js | 4 +- .../v2/bigtable_instance_admin_client.ts | 3 + src/admin/v2/bigtable_table_admin_client.ts | 5 +- src/v2/bigtable_client.ts | 25 +- .../v2/gapic_bigtable_instance_admin_v2.ts | 1599 ++++++++--------- .../admin/v2/gapic_bigtable_table_admin_v2.ts | 418 +++-- 72 files changed, 1065 insertions(+), 1261 deletions(-) diff --git a/owlbot.py b/owlbot.py index 98c904951..ea24ae08d 100644 --- a/owlbot.py +++ b/owlbot.py @@ -104,14 +104,14 @@ contents = contents.replace("'../", "'../../../") # Use the selective subclasses. - contents = contents.replace(".v2.BigtableInstanceAdminClient", ".InstanceAdminClient") - contents = contents.replace(".v2.BigtableTableAdminClient", ".TableAdminClient") + contents = contents.replace(".v2.BigtableInstanceAdminClient", ".admin.InstanceAdminClient") + contents = contents.replace(".v2.BigtableTableAdminClient", ".admin.TableAdminClient") # Statics also. contents = contents.replace("bigtabletableadminModule.v2.BigtableTableAdminClient", \ - "bigtabletableadminModule.TableAdminClient") + "bigtabletableadminModule.admin.TableAdminClient") contents = contents.replace("bigtabletableadminModule.v2.BigtableInstanceAdminClient", \ - "bigtabletableadminModule.InstanceAdminClient") + "bigtabletableadminModule.admin.InstanceAdminClient") tfn.write_text(contents) @@ -124,9 +124,9 @@ for sfn in sfns: logging.info(f"munging sample file: {str(sfn)}") contents = sfn.read_text() - contents = contents.replace("const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2", \ + contents = contents.replace("const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2", \ "const {InstanceAdminClient} = require('@google-cloud/bigtable').admin") - contents = contents.replace("const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2", \ + contents = contents.replace("const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2", \ "const {TableAdminClient} = require('@google-cloud/bigtable').admin") contents = contents.replace("new BigtableInstanceAdminClient", "new InstanceAdminClient") contents = contents.replace("new BigtableTableAdminClient", "new TableAdminClient") diff --git a/samples/generated/admin/v2/bigtable_instance_admin.create_app_profile.js b/samples/generated/admin/v2/bigtable_instance_admin.create_app_profile.js index 8eff6edaf..bc9255fbf 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.create_app_profile.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.create_app_profile.js @@ -50,10 +50,10 @@ function main(parent, appProfileId, appProfile) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callCreateAppProfile() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.create_cluster.js b/samples/generated/admin/v2/bigtable_instance_admin.create_cluster.js index 74cf476a6..549fd02c4 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.create_cluster.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.create_cluster.js @@ -46,10 +46,10 @@ function main(parent, clusterId, cluster) { // const cluster = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callCreateCluster() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.create_instance.js b/samples/generated/admin/v2/bigtable_instance_admin.create_instance.js index b62ee7d25..6aec34b13 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.create_instance.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.create_instance.js @@ -53,10 +53,10 @@ function main(parent, instanceId, instance, clusters) { // const clusters = [1,2,3,4] // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callCreateInstance() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.create_logical_view.js b/samples/generated/admin/v2/bigtable_instance_admin.create_logical_view.js index 4141dde16..79bede231 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.create_logical_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.create_logical_view.js @@ -44,10 +44,10 @@ function main(parent, logicalViewId, logicalView) { // const logicalView = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callCreateLogicalView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.create_materialized_view.js b/samples/generated/admin/v2/bigtable_instance_admin.create_materialized_view.js index 92066ec92..2be69c02d 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.create_materialized_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.create_materialized_view.js @@ -44,10 +44,10 @@ function main(parent, materializedViewId, materializedView) { // const materializedView = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callCreateMaterializedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.delete_app_profile.js b/samples/generated/admin/v2/bigtable_instance_admin.delete_app_profile.js index b412b83ac..e90300666 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.delete_app_profile.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.delete_app_profile.js @@ -40,10 +40,10 @@ function main(name, ignoreWarnings) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callDeleteAppProfile() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.delete_cluster.js b/samples/generated/admin/v2/bigtable_instance_admin.delete_cluster.js index ef4a5129f..e4a050965 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.delete_cluster.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.delete_cluster.js @@ -35,10 +35,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callDeleteCluster() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.delete_instance.js b/samples/generated/admin/v2/bigtable_instance_admin.delete_instance.js index 2923010cb..a959058bb 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.delete_instance.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.delete_instance.js @@ -35,10 +35,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callDeleteInstance() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.delete_logical_view.js b/samples/generated/admin/v2/bigtable_instance_admin.delete_logical_view.js index 0d97bb733..66caf0af0 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.delete_logical_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.delete_logical_view.js @@ -43,10 +43,10 @@ function main(name) { // const etag = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callDeleteLogicalView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.delete_materialized_view.js b/samples/generated/admin/v2/bigtable_instance_admin.delete_materialized_view.js index 6ecd1c9e3..92585e179 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.delete_materialized_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.delete_materialized_view.js @@ -43,10 +43,10 @@ function main(name) { // const etag = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callDeleteMaterializedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.get_app_profile.js b/samples/generated/admin/v2/bigtable_instance_admin.get_app_profile.js index 83b240cc3..0d5b0e36d 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.get_app_profile.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.get_app_profile.js @@ -35,10 +35,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callGetAppProfile() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.get_cluster.js b/samples/generated/admin/v2/bigtable_instance_admin.get_cluster.js index 0348f7817..5cae85263 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.get_cluster.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.get_cluster.js @@ -35,10 +35,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callGetCluster() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.get_iam_policy.js b/samples/generated/admin/v2/bigtable_instance_admin.get_iam_policy.js index 43ac80523..b07f9e6f1 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.get_iam_policy.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.get_iam_policy.js @@ -40,10 +40,10 @@ function main(resource) { // const options = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callGetIamPolicy() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.get_instance.js b/samples/generated/admin/v2/bigtable_instance_admin.get_instance.js index 9bae06b4a..d65a7bf34 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.get_instance.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.get_instance.js @@ -35,10 +35,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callGetInstance() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.get_logical_view.js b/samples/generated/admin/v2/bigtable_instance_admin.get_logical_view.js index 98a97b262..ff81ad8b1 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.get_logical_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.get_logical_view.js @@ -35,10 +35,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callGetLogicalView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.get_materialized_view.js b/samples/generated/admin/v2/bigtable_instance_admin.get_materialized_view.js index b6930b820..b1218f758 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.get_materialized_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.get_materialized_view.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callGetMaterializedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.list_app_profiles.js b/samples/generated/admin/v2/bigtable_instance_admin.list_app_profiles.js index 8ba7a1624..e96d826a9 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.list_app_profiles.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.list_app_profiles.js @@ -52,10 +52,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callListAppProfiles() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.list_clusters.js b/samples/generated/admin/v2/bigtable_instance_admin.list_clusters.js index da07f557f..e02d599eb 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.list_clusters.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.list_clusters.js @@ -42,10 +42,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callListClusters() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.list_hot_tablets.js b/samples/generated/admin/v2/bigtable_instance_admin.list_hot_tablets.js index ed474dae6..e7939ce52 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.list_hot_tablets.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.list_hot_tablets.js @@ -63,10 +63,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callListHotTablets() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.list_instances.js b/samples/generated/admin/v2/bigtable_instance_admin.list_instances.js index dfcd6c9ca..07bd0bdf6 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.list_instances.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.list_instances.js @@ -39,10 +39,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callListInstances() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.list_logical_views.js b/samples/generated/admin/v2/bigtable_instance_admin.list_logical_views.js index 7ed0cd6db..18bfe07dd 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.list_logical_views.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.list_logical_views.js @@ -48,10 +48,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callListLogicalViews() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.list_materialized_views.js b/samples/generated/admin/v2/bigtable_instance_admin.list_materialized_views.js index 04ac8c386..00f6d9fe5 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.list_materialized_views.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.list_materialized_views.js @@ -48,10 +48,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callListMaterializedViews() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.partial_update_cluster.js b/samples/generated/admin/v2/bigtable_instance_admin.partial_update_cluster.js index 09c809e45..6b9723290 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.partial_update_cluster.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.partial_update_cluster.js @@ -39,10 +39,10 @@ function main(cluster, updateMask) { // const updateMask = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callPartialUpdateCluster() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.partial_update_instance.js b/samples/generated/admin/v2/bigtable_instance_admin.partial_update_instance.js index 549a96403..34ba3ee7b 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.partial_update_instance.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.partial_update_instance.js @@ -39,10 +39,10 @@ function main(instance, updateMask) { // const updateMask = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callPartialUpdateInstance() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.set_iam_policy.js b/samples/generated/admin/v2/bigtable_instance_admin.set_iam_policy.js index de5f4d352..3ceeb4073 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.set_iam_policy.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.set_iam_policy.js @@ -49,10 +49,10 @@ function main(resource, policy) { // const updateMask = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callSetIamPolicy() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.test_iam_permissions.js b/samples/generated/admin/v2/bigtable_instance_admin.test_iam_permissions.js index 84e0603c1..1494635e9 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.test_iam_permissions.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.test_iam_permissions.js @@ -42,10 +42,10 @@ function main(resource, permissions) { // const permissions = ['abc','def'] // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callTestIamPermissions() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.update_app_profile.js b/samples/generated/admin/v2/bigtable_instance_admin.update_app_profile.js index 8e911e7e7..a87131d92 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.update_app_profile.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.update_app_profile.js @@ -43,10 +43,10 @@ function main(appProfile, updateMask) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callUpdateAppProfile() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.update_cluster.js b/samples/generated/admin/v2/bigtable_instance_admin.update_cluster.js index df1492c38..76ab36f2e 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.update_cluster.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.update_cluster.js @@ -69,10 +69,10 @@ function main(location, state, nodeScalingFactor, defaultStorageType, encryption // const encryptionConfig = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callUpdateCluster() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.update_instance.js b/samples/generated/admin/v2/bigtable_instance_admin.update_instance.js index c4e62caad..ef2076454 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.update_instance.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.update_instance.js @@ -87,10 +87,10 @@ function main(displayName, state, createTime, satisfiesPzs, satisfiesPzi, tags) // const tags = [1,2,3,4] // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callUpdateInstance() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.update_logical_view.js b/samples/generated/admin/v2/bigtable_instance_admin.update_logical_view.js index d3a0d897b..c65190ac5 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.update_logical_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.update_logical_view.js @@ -41,10 +41,10 @@ function main(logicalView) { // const updateMask = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callUpdateLogicalView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_instance_admin.update_materialized_view.js b/samples/generated/admin/v2/bigtable_instance_admin.update_materialized_view.js index 6f2cee935..d44547084 100644 --- a/samples/generated/admin/v2/bigtable_instance_admin.update_materialized_view.js +++ b/samples/generated/admin/v2/bigtable_instance_admin.update_materialized_view.js @@ -41,10 +41,10 @@ function main(materializedView) { // const updateMask = {} // Imports the Admin library - const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {InstanceAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableInstanceAdminClient(); + const adminClient = new InstanceAdminClient(); async function callUpdateMaterializedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.check_consistency.js b/samples/generated/admin/v2/bigtable_table_admin.check_consistency.js index 96b2ec17b..8a502e963 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.check_consistency.js +++ b/samples/generated/admin/v2/bigtable_table_admin.check_consistency.js @@ -52,10 +52,10 @@ function main(name, consistencyToken) { // const dataBoostReadLocalWrites = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCheckConsistency() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.copy_backup.js b/samples/generated/admin/v2/bigtable_table_admin.copy_backup.js index 26f32e7fd..bfe94f6c9 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.copy_backup.js +++ b/samples/generated/admin/v2/bigtable_table_admin.copy_backup.js @@ -63,10 +63,10 @@ function main(parent, backupId, sourceBackup, expireTime) { // const expireTime = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCopyBackup() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.create_authorized_view.js b/samples/generated/admin/v2/bigtable_table_admin.create_authorized_view.js index a3202eb99..240f7c870 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.create_authorized_view.js +++ b/samples/generated/admin/v2/bigtable_table_admin.create_authorized_view.js @@ -47,10 +47,10 @@ function main(parent, authorizedViewId, authorizedView) { // const authorizedView = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCreateAuthorizedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.create_backup.js b/samples/generated/admin/v2/bigtable_table_admin.create_backup.js index 8071d67fd..de54aec6c 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.create_backup.js +++ b/samples/generated/admin/v2/bigtable_table_admin.create_backup.js @@ -49,10 +49,10 @@ function main(parent, backupId, backup) { // const backup = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCreateBackup() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.create_schema_bundle.js b/samples/generated/admin/v2/bigtable_table_admin.create_schema_bundle.js index a3384de79..5f38fb6c0 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.create_schema_bundle.js +++ b/samples/generated/admin/v2/bigtable_table_admin.create_schema_bundle.js @@ -45,10 +45,10 @@ function main(parent, schemaBundleId, schemaBundle) { // const schemaBundle = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCreateSchemaBundle() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.create_table.js b/samples/generated/admin/v2/bigtable_table_admin.create_table.js index 7570337fd..0e874701c 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.create_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.create_table.js @@ -62,10 +62,10 @@ function main(parent, tableId, table) { // const initialSplits = [1,2,3,4] // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCreateTable() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.create_table_from_snapshot.js b/samples/generated/admin/v2/bigtable_table_admin.create_table_from_snapshot.js index d050aa997..4f69a37dc 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.create_table_from_snapshot.js +++ b/samples/generated/admin/v2/bigtable_table_admin.create_table_from_snapshot.js @@ -47,10 +47,10 @@ function main(parent, tableId, sourceSnapshot) { // const sourceSnapshot = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callCreateTableFromSnapshot() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.delete_authorized_view.js b/samples/generated/admin/v2/bigtable_table_admin.delete_authorized_view.js index 55d33aa17..36840ffda 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.delete_authorized_view.js +++ b/samples/generated/admin/v2/bigtable_table_admin.delete_authorized_view.js @@ -43,10 +43,10 @@ function main(name) { // const etag = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callDeleteAuthorizedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.delete_backup.js b/samples/generated/admin/v2/bigtable_table_admin.delete_backup.js index 85aebd315..e21057d2f 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.delete_backup.js +++ b/samples/generated/admin/v2/bigtable_table_admin.delete_backup.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callDeleteBackup() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.delete_schema_bundle.js b/samples/generated/admin/v2/bigtable_table_admin.delete_schema_bundle.js index 29e54e25b..022c1663e 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.delete_schema_bundle.js +++ b/samples/generated/admin/v2/bigtable_table_admin.delete_schema_bundle.js @@ -42,10 +42,10 @@ function main(name) { // const etag = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callDeleteSchemaBundle() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.delete_snapshot.js b/samples/generated/admin/v2/bigtable_table_admin.delete_snapshot.js index 7d3f6e312..5cd59ce8e 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.delete_snapshot.js +++ b/samples/generated/admin/v2/bigtable_table_admin.delete_snapshot.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callDeleteSnapshot() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.delete_table.js b/samples/generated/admin/v2/bigtable_table_admin.delete_table.js index 7ba394330..92cff8f6f 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.delete_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.delete_table.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callDeleteTable() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.drop_row_range.js b/samples/generated/admin/v2/bigtable_table_admin.drop_row_range.js index cd0c22b5c..26c1d7a3b 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.drop_row_range.js +++ b/samples/generated/admin/v2/bigtable_table_admin.drop_row_range.js @@ -45,10 +45,10 @@ function main(name) { // const deleteAllDataFromTable = true // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callDropRowRange() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.generate_consistency_token.js b/samples/generated/admin/v2/bigtable_table_admin.generate_consistency_token.js index ebec6a009..0918721d2 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.generate_consistency_token.js +++ b/samples/generated/admin/v2/bigtable_table_admin.generate_consistency_token.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGenerateConsistencyToken() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.get_authorized_view.js b/samples/generated/admin/v2/bigtable_table_admin.get_authorized_view.js index 8ff90df7c..e742a0a63 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.get_authorized_view.js +++ b/samples/generated/admin/v2/bigtable_table_admin.get_authorized_view.js @@ -41,10 +41,10 @@ function main(name) { // const view = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGetAuthorizedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.get_backup.js b/samples/generated/admin/v2/bigtable_table_admin.get_backup.js index 5ec2d2422..74a344c40 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.get_backup.js +++ b/samples/generated/admin/v2/bigtable_table_admin.get_backup.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGetBackup() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.get_iam_policy.js b/samples/generated/admin/v2/bigtable_table_admin.get_iam_policy.js index 45fa65637..4aef8347f 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.get_iam_policy.js +++ b/samples/generated/admin/v2/bigtable_table_admin.get_iam_policy.js @@ -40,10 +40,10 @@ function main(resource) { // const options = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGetIamPolicy() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.get_schema_bundle.js b/samples/generated/admin/v2/bigtable_table_admin.get_schema_bundle.js index d3c666a3a..a8f635b63 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.get_schema_bundle.js +++ b/samples/generated/admin/v2/bigtable_table_admin.get_schema_bundle.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGetSchemaBundle() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.get_snapshot.js b/samples/generated/admin/v2/bigtable_table_admin.get_snapshot.js index 0131aa4ec..7b7925ad0 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.get_snapshot.js +++ b/samples/generated/admin/v2/bigtable_table_admin.get_snapshot.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGetSnapshot() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.get_table.js b/samples/generated/admin/v2/bigtable_table_admin.get_table.js index c3ec7ad2c..3fbe9efe1 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.get_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.get_table.js @@ -41,10 +41,10 @@ function main(name) { // const view = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callGetTable() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.list_authorized_views.js b/samples/generated/admin/v2/bigtable_table_admin.list_authorized_views.js index 4dfab178e..966db55bc 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.list_authorized_views.js +++ b/samples/generated/admin/v2/bigtable_table_admin.list_authorized_views.js @@ -55,10 +55,10 @@ function main(parent) { // const view = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callListAuthorizedViews() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.list_backups.js b/samples/generated/admin/v2/bigtable_table_admin.list_backups.js index 9bd6da602..18b2d729c 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.list_backups.js +++ b/samples/generated/admin/v2/bigtable_table_admin.list_backups.js @@ -102,10 +102,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callListBackups() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.list_schema_bundles.js b/samples/generated/admin/v2/bigtable_table_admin.list_schema_bundles.js index 9ce4d3796..859d28f09 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.list_schema_bundles.js +++ b/samples/generated/admin/v2/bigtable_table_admin.list_schema_bundles.js @@ -49,10 +49,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callListSchemaBundles() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.list_snapshots.js b/samples/generated/admin/v2/bigtable_table_admin.list_snapshots.js index e06fc0c4d..cc098c1bd 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.list_snapshots.js +++ b/samples/generated/admin/v2/bigtable_table_admin.list_snapshots.js @@ -47,10 +47,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callListSnapshots() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.list_tables.js b/samples/generated/admin/v2/bigtable_table_admin.list_tables.js index 06c6b8744..c1df69980 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.list_tables.js +++ b/samples/generated/admin/v2/bigtable_table_admin.list_tables.js @@ -54,10 +54,10 @@ function main(parent) { // const pageToken = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callListTables() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.modify_column_families.js b/samples/generated/admin/v2/bigtable_table_admin.modify_column_families.js index 95ca2063b..040331569 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.modify_column_families.js +++ b/samples/generated/admin/v2/bigtable_table_admin.modify_column_families.js @@ -47,10 +47,10 @@ function main(name, modifications) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callModifyColumnFamilies() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.restore_table.js b/samples/generated/admin/v2/bigtable_table_admin.restore_table.js index 3ec27b23d..f7ba4b886 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.restore_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.restore_table.js @@ -47,10 +47,10 @@ function main(parent, tableId) { // const backup = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callRestoreTable() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.set_iam_policy.js b/samples/generated/admin/v2/bigtable_table_admin.set_iam_policy.js index 5bdc4b27b..c90243024 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.set_iam_policy.js +++ b/samples/generated/admin/v2/bigtable_table_admin.set_iam_policy.js @@ -49,10 +49,10 @@ function main(resource, policy) { // const updateMask = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callSetIamPolicy() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.snapshot_table.js b/samples/generated/admin/v2/bigtable_table_admin.snapshot_table.js index 97862a4b1..152e9764a 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.snapshot_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.snapshot_table.js @@ -60,10 +60,10 @@ function main(name, cluster, snapshotId) { // const description = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callSnapshotTable() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.test_iam_permissions.js b/samples/generated/admin/v2/bigtable_table_admin.test_iam_permissions.js index 0f0c030a5..7555a9480 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.test_iam_permissions.js +++ b/samples/generated/admin/v2/bigtable_table_admin.test_iam_permissions.js @@ -42,10 +42,10 @@ function main(resource, permissions) { // const permissions = ['abc','def'] // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callTestIamPermissions() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.undelete_table.js b/samples/generated/admin/v2/bigtable_table_admin.undelete_table.js index 046cf8603..e9a0031d6 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.undelete_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.undelete_table.js @@ -36,10 +36,10 @@ function main(name) { // const name = 'abc123' // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callUndeleteTable() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.update_authorized_view.js b/samples/generated/admin/v2/bigtable_table_admin.update_authorized_view.js index aefb1983e..48daf3dbc 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.update_authorized_view.js +++ b/samples/generated/admin/v2/bigtable_table_admin.update_authorized_view.js @@ -52,10 +52,10 @@ function main(authorizedView) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callUpdateAuthorizedView() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.update_backup.js b/samples/generated/admin/v2/bigtable_table_admin.update_backup.js index 3ba1dd23a..3a1dca4fd 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.update_backup.js +++ b/samples/generated/admin/v2/bigtable_table_admin.update_backup.js @@ -45,10 +45,10 @@ function main(backup, updateMask) { // const updateMask = {} // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callUpdateBackup() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.update_schema_bundle.js b/samples/generated/admin/v2/bigtable_table_admin.update_schema_bundle.js index 67d006a41..ec957fb32 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.update_schema_bundle.js +++ b/samples/generated/admin/v2/bigtable_table_admin.update_schema_bundle.js @@ -48,10 +48,10 @@ function main(schemaBundle) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callUpdateSchemaBundle() { // Construct request diff --git a/samples/generated/admin/v2/bigtable_table_admin.update_table.js b/samples/generated/admin/v2/bigtable_table_admin.update_table.js index 4be9fb376..612331e48 100644 --- a/samples/generated/admin/v2/bigtable_table_admin.update_table.js +++ b/samples/generated/admin/v2/bigtable_table_admin.update_table.js @@ -53,10 +53,10 @@ function main(table, updateMask) { // const ignoreWarnings = true // Imports the Admin library - const {BigtableTableAdminClient} = require('@google-cloud/bigtable').admin.v2; + const {TableAdminClient} = require('@google-cloud/bigtable').admin; // Instantiates a client - const adminClient = new BigtableTableAdminClient(); + const adminClient = new TableAdminClient(); async function callUpdateTable() { // Construct request diff --git a/src/admin/v2/bigtable_instance_admin_client.ts b/src/admin/v2/bigtable_instance_admin_client.ts index 504946961..18251284e 100644 --- a/src/admin/v2/bigtable_instance_admin_client.ts +++ b/src/admin/v2/bigtable_instance_admin_client.ts @@ -150,6 +150,9 @@ export class BigtableInstanceAdminClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + 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 !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; diff --git a/src/admin/v2/bigtable_table_admin_client.ts b/src/admin/v2/bigtable_table_admin_client.ts index 2d113f85d..a654d5df8 100644 --- a/src/admin/v2/bigtable_table_admin_client.ts +++ b/src/admin/v2/bigtable_table_admin_client.ts @@ -151,6 +151,9 @@ export class BigtableTableAdminClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + 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 !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -4552,8 +4555,6 @@ export class BigtableTableAdminClient { >; } /** - * @internal WARNING: This method is internal to the bigtableadmin_v2 api and should not be used by clients. - * * Create a new table by restoring from a completed backup. The * returned table {@link protos.google.longrunning.Operation|long-running operation} can * be used to track the progress of the operation, and to cancel it. The diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index 9768482a4..1782b4f9e 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -142,6 +142,9 @@ export class BigtableClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + 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 !== this._servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -477,8 +480,6 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.MutateRowResponse|MutateRowResponse}. * 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:bigtable_v2_generated_Bigtable_MutateRow_async */ mutateRow( request?: protos.google.bigtable.v2.IMutateRowRequest, @@ -677,8 +678,6 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.CheckAndMutateRowResponse|CheckAndMutateRowResponse}. * 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:bigtable_v2_generated_Bigtable_CheckAndMutateRow_async */ checkAndMutateRow( request?: protos.google.bigtable.v2.ICheckAndMutateRowRequest, @@ -854,8 +853,6 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.PingAndWarmResponse|PingAndWarmResponse}. * 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:bigtable_v2_generated_Bigtable_PingAndWarm_async */ pingAndWarm( request?: protos.google.bigtable.v2.IPingAndWarmRequest, @@ -1026,8 +1023,6 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.ReadModifyWriteRowResponse|ReadModifyWriteRowResponse}. * 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:bigtable_v2_generated_Bigtable_ReadModifyWriteRow_async */ readModifyWriteRow( request?: protos.google.bigtable.v2.IReadModifyWriteRowRequest, @@ -1221,8 +1216,6 @@ export class BigtableClient { * The first element of the array is an object representing {@link protos.google.bigtable.v2.PrepareQueryResponse|PrepareQueryResponse}. * 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:bigtable_v2_generated_Bigtable_PrepareQuery_async */ prepareQuery( request?: protos.google.bigtable.v2.IPrepareQueryRequest, @@ -1413,8 +1406,6 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.ReadRowsResponse|ReadRowsResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. - * @example - * region_tag:bigtable_v2_generated_Bigtable_ReadRows_async */ readRows( request?: protos.google.bigtable.v2.IReadRowsRequest, @@ -1523,8 +1514,6 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.SampleRowKeysResponse|SampleRowKeysResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. - * @example - * region_tag:bigtable_v2_generated_Bigtable_SampleRowKeys_async */ sampleRowKeys( request?: protos.google.bigtable.v2.ISampleRowKeysRequest, @@ -1634,8 +1623,6 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.MutateRowsResponse|MutateRowsResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. - * @example - * region_tag:bigtable_v2_generated_Bigtable_MutateRows_async */ mutateRows( request?: protos.google.bigtable.v2.IMutateRowsRequest, @@ -1722,8 +1709,6 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse|GenerateInitialChangeStreamPartitionsResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. - * @example - * region_tag:bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_async */ generateInitialChangeStreamPartitions( request?: protos.google.bigtable.v2.IGenerateInitialChangeStreamPartitionsRequest, @@ -1795,8 +1780,6 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.ReadChangeStreamResponse|ReadChangeStreamResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. - * @example - * region_tag:bigtable_v2_generated_Bigtable_ReadChangeStream_async */ readChangeStream( request?: protos.google.bigtable.v2.IReadChangeStreamRequest, @@ -1885,8 +1868,6 @@ export class BigtableClient { * An object stream which emits {@link protos.google.bigtable.v2.ExecuteQueryResponse|ExecuteQueryResponse} on 'data' event. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } * for more details and examples. - * @example - * region_tag:bigtable_v2_generated_Bigtable_ExecuteQuery_async */ executeQuery( request?: protos.google.bigtable.v2.IExecuteQueryRequest, diff --git a/test/admin/v2/gapic_bigtable_instance_admin_v2.ts b/test/admin/v2/gapic_bigtable_instance_admin_v2.ts index 10ef61d48..e7eec14e2 100644 --- a/test/admin/v2/gapic_bigtable_instance_admin_v2.ts +++ b/test/admin/v2/gapic_bigtable_instance_admin_v2.ts @@ -163,14 +163,14 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('Common methods', () => { it('has apiEndpoint', () => { const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + new bigtableinstanceadminModule.admin.InstanceAdminClient(); const apiEndpoint = client.apiEndpoint; assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); }); it('has universeDomain', () => { const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + new bigtableinstanceadminModule.admin.InstanceAdminClient(); const universeDomain = client.universeDomain; assert.strictEqual(universeDomain, 'googleapis.com'); }); @@ -182,8 +182,7 @@ describe('v2.BigtableInstanceAdminClient', () => { it('throws DeprecationWarning if static servicePath is used', () => { const stub = sinon.stub(process, 'emitWarning'); const servicePath = - bigtableinstanceadminModule.v2.BigtableInstanceAdminClient - .servicePath; + bigtableinstanceadminModule.admin.InstanceAdminClient.servicePath; assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); assert(stub.called); stub.restore(); @@ -192,27 +191,24 @@ describe('v2.BigtableInstanceAdminClient', () => { it('throws DeprecationWarning if static apiEndpoint is used', () => { const stub = sinon.stub(process, 'emitWarning'); const apiEndpoint = - bigtableinstanceadminModule.v2.BigtableInstanceAdminClient - .apiEndpoint; + bigtableinstanceadminModule.admin.InstanceAdminClient.apiEndpoint; assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); assert(stub.called); stub.restore(); }); } it('sets apiEndpoint according to universe domain camelCase', () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - universeDomain: 'example.com', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + universeDomain: 'example.com', + }); const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - universe_domain: 'example.com', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + universe_domain: 'example.com', + }); const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); }); @@ -223,7 +219,7 @@ describe('v2.BigtableInstanceAdminClient', () => { const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + new bigtableinstanceadminModule.admin.InstanceAdminClient(); const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); if (saved) { @@ -237,7 +233,7 @@ describe('v2.BigtableInstanceAdminClient', () => { const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + new bigtableinstanceadminModule.admin.InstanceAdminClient({ universeDomain: 'configured.example.com', }); const servicePath = client.apiEndpoint; @@ -255,7 +251,7 @@ describe('v2.BigtableInstanceAdminClient', () => { } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + new bigtableinstanceadminModule.admin.InstanceAdminClient({ universe_domain: 'example.com', universeDomain: 'example.net', }); @@ -263,43 +259,39 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('has port', () => { - const port = - bigtableinstanceadminModule.v2.BigtableInstanceAdminClient.port; + const port = bigtableinstanceadminModule.admin.InstanceAdminClient.port; assert(port); assert(typeof port === 'number'); }); it('should create a client with no option', () => { const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient(); + new bigtableinstanceadminModule.admin.InstanceAdminClient(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - fallback: true, - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + fallback: true, + }); assert(client); }); it('has initialize method and supports deferred initialization', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); assert.strictEqual(client.bigtableInstanceAdminStub, undefined); await client.initialize(); assert(client.bigtableInstanceAdminStub); }); it('has close method for the initialized client', done => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); client.initialize().catch(err => { throw err; }); @@ -315,11 +307,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('has close method for the non-initialized client', done => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); assert.strictEqual(client.bigtableInstanceAdminStub, undefined); client .close() @@ -333,11 +324,10 @@ describe('v2.BigtableInstanceAdminClient', () => { it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); const result = await client.getProjectId(); assert.strictEqual(result, fakeProjectId); @@ -346,11 +336,10 @@ describe('v2.BigtableInstanceAdminClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); client.auth.getProjectId = sinon .stub() .callsArgWith(0, null, fakeProjectId); @@ -370,11 +359,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('getInstance', () => { it('invokes getInstance without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetInstanceRequest(), @@ -402,11 +390,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getInstance without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetInstanceRequest(), @@ -450,11 +437,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getInstance with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetInstanceRequest(), @@ -482,11 +468,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getInstance with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetInstanceRequest(), @@ -506,11 +491,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('listInstances', () => { it('invokes listInstances without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListInstancesRequest(), @@ -538,11 +522,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listInstances without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListInstancesRequest(), @@ -586,11 +569,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listInstances with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListInstancesRequest(), @@ -618,11 +600,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listInstances with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListInstancesRequest(), @@ -642,11 +623,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('updateInstance', () => { it('invokes updateInstance without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Instance(), @@ -674,11 +654,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateInstance without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Instance(), @@ -722,11 +701,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateInstance with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Instance(), @@ -754,11 +732,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateInstance with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Instance(), @@ -778,11 +755,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('deleteInstance', () => { it('invokes deleteInstance without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), @@ -810,11 +786,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteInstance without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), @@ -858,11 +833,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteInstance with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), @@ -890,11 +864,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteInstance with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteInstanceRequest(), @@ -914,11 +887,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('getCluster', () => { it('invokes getCluster without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetClusterRequest(), @@ -946,11 +918,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getCluster without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetClusterRequest(), @@ -994,11 +965,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getCluster with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetClusterRequest(), @@ -1026,11 +996,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getCluster with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetClusterRequest(), @@ -1050,11 +1019,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('listClusters', () => { it('invokes listClusters without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListClustersRequest(), @@ -1082,11 +1050,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listClusters without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListClustersRequest(), @@ -1130,11 +1097,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listClusters with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListClustersRequest(), @@ -1162,11 +1128,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listClusters with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListClustersRequest(), @@ -1186,11 +1151,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('deleteCluster', () => { it('invokes deleteCluster without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteClusterRequest(), @@ -1218,11 +1182,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteCluster without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteClusterRequest(), @@ -1266,11 +1229,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteCluster with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteClusterRequest(), @@ -1298,11 +1260,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteCluster with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteClusterRequest(), @@ -1322,11 +1283,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('createAppProfile', () => { it('invokes createAppProfile without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), @@ -1354,11 +1314,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createAppProfile without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), @@ -1402,11 +1361,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createAppProfile with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), @@ -1434,11 +1392,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createAppProfile with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateAppProfileRequest(), @@ -1458,11 +1415,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('getAppProfile', () => { it('invokes getAppProfile without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetAppProfileRequest(), @@ -1490,11 +1446,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getAppProfile without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetAppProfileRequest(), @@ -1538,11 +1493,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getAppProfile with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetAppProfileRequest(), @@ -1570,11 +1524,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getAppProfile with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetAppProfileRequest(), @@ -1594,11 +1547,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('deleteAppProfile', () => { it('invokes deleteAppProfile without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), @@ -1626,11 +1578,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteAppProfile without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), @@ -1674,11 +1625,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteAppProfile with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), @@ -1706,11 +1656,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteAppProfile with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteAppProfileRequest(), @@ -1730,11 +1679,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('getIamPolicy', () => { it('invokes getIamPolicy without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest(), @@ -1762,11 +1710,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getIamPolicy without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest(), @@ -1810,11 +1757,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getIamPolicy with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest(), @@ -1842,11 +1788,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getIamPolicy with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.GetIamPolicyRequest(), @@ -1866,11 +1811,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('setIamPolicy', () => { it('invokes setIamPolicy without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest(), @@ -1898,11 +1842,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes setIamPolicy without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest(), @@ -1946,11 +1889,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes setIamPolicy with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest(), @@ -1978,11 +1920,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes setIamPolicy with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.SetIamPolicyRequest(), @@ -2002,11 +1943,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('testIamPermissions', () => { it('invokes testIamPermissions without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest(), @@ -2035,11 +1975,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes testIamPermissions without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest(), @@ -2083,11 +2022,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes testIamPermissions with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest(), @@ -2115,11 +2053,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes testIamPermissions with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.iam.v1.TestIamPermissionsRequest(), @@ -2139,11 +2076,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('getLogicalView', () => { it('invokes getLogicalView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), @@ -2171,11 +2107,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getLogicalView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), @@ -2219,11 +2154,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getLogicalView with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), @@ -2251,11 +2185,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getLogicalView with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetLogicalViewRequest(), @@ -2275,11 +2208,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('deleteLogicalView', () => { it('invokes deleteLogicalView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), @@ -2307,11 +2239,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteLogicalView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), @@ -2355,11 +2286,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteLogicalView with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), @@ -2387,11 +2317,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteLogicalView with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteLogicalViewRequest(), @@ -2411,11 +2340,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('getMaterializedView', () => { it('invokes getMaterializedView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), @@ -2444,11 +2372,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getMaterializedView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), @@ -2492,11 +2419,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getMaterializedView with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), @@ -2524,11 +2450,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes getMaterializedView with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.GetMaterializedViewRequest(), @@ -2548,11 +2473,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('deleteMaterializedView', () => { it('invokes deleteMaterializedView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), @@ -2581,11 +2505,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteMaterializedView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), @@ -2629,11 +2552,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteMaterializedView with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), @@ -2664,11 +2586,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes deleteMaterializedView with closed client', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.DeleteMaterializedViewRequest(), @@ -2691,11 +2612,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('createInstance', () => { it('invokes createInstance without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateInstanceRequest(), @@ -2725,11 +2645,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createInstance without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateInstanceRequest(), @@ -2780,11 +2699,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createInstance with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateInstanceRequest(), @@ -2812,11 +2730,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createInstance with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateInstanceRequest(), @@ -2846,11 +2763,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateInstanceProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -2869,11 +2785,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateInstanceProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -2891,11 +2806,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('partialUpdateInstance', () => { it('invokes partialUpdateInstance without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), @@ -2926,11 +2840,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes partialUpdateInstance without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), @@ -2982,11 +2895,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes partialUpdateInstance with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), @@ -3018,11 +2930,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes partialUpdateInstance with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateInstanceRequest(), @@ -3053,11 +2964,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkPartialUpdateInstanceProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -3076,11 +2986,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkPartialUpdateInstanceProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -3098,11 +3007,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('createCluster', () => { it('invokes createCluster without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateClusterRequest(), @@ -3132,11 +3040,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createCluster without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateClusterRequest(), @@ -3187,11 +3094,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createCluster with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateClusterRequest(), @@ -3219,11 +3125,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createCluster with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateClusterRequest(), @@ -3253,11 +3158,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateClusterProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -3276,11 +3180,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateClusterProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -3298,11 +3201,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('updateCluster', () => { it('invokes updateCluster without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Cluster(), @@ -3332,11 +3234,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateCluster without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Cluster(), @@ -3387,11 +3288,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateCluster with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Cluster(), @@ -3419,11 +3319,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateCluster with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.Cluster(), @@ -3453,11 +3352,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateClusterProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -3476,11 +3374,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateClusterProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -3498,11 +3395,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('partialUpdateCluster', () => { it('invokes partialUpdateCluster without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), @@ -3533,11 +3429,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes partialUpdateCluster without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), @@ -3589,11 +3484,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes partialUpdateCluster with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), @@ -3622,11 +3516,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes partialUpdateCluster with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest(), @@ -3657,11 +3550,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkPartialUpdateClusterProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -3680,11 +3572,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkPartialUpdateClusterProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -3702,11 +3593,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('updateAppProfile', () => { it('invokes updateAppProfile without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), @@ -3737,11 +3627,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateAppProfile without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), @@ -3793,11 +3682,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateAppProfile with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), @@ -3826,11 +3714,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateAppProfile with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateAppProfileRequest(), @@ -3861,11 +3748,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateAppProfileProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -3884,11 +3770,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateAppProfileProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -3906,11 +3791,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('createLogicalView', () => { it('invokes createLogicalView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), @@ -3940,11 +3824,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createLogicalView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), @@ -3995,11 +3878,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createLogicalView with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), @@ -4027,11 +3909,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createLogicalView with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateLogicalViewRequest(), @@ -4061,11 +3942,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateLogicalViewProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -4084,11 +3964,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateLogicalViewProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -4106,11 +3985,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('updateLogicalView', () => { it('invokes updateLogicalView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), @@ -4141,11 +4019,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateLogicalView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), @@ -4197,11 +4074,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateLogicalView with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), @@ -4230,11 +4106,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateLogicalView with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateLogicalViewRequest(), @@ -4265,11 +4140,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateLogicalViewProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -4288,11 +4162,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateLogicalViewProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -4310,11 +4183,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('createMaterializedView', () => { it('invokes createMaterializedView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), @@ -4344,11 +4216,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createMaterializedView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), @@ -4399,11 +4270,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createMaterializedView with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), @@ -4434,11 +4304,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes createMaterializedView with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.CreateMaterializedViewRequest(), @@ -4468,11 +4337,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateMaterializedViewProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -4491,11 +4359,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkCreateMaterializedViewProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -4513,11 +4380,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('updateMaterializedView', () => { it('invokes updateMaterializedView without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), @@ -4548,11 +4414,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateMaterializedView without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), @@ -4604,11 +4469,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateMaterializedView with call error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), @@ -4640,11 +4504,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes updateMaterializedView with LRO error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.UpdateMaterializedViewRequest(), @@ -4675,11 +4538,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateMaterializedViewProgress without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation(), @@ -4698,11 +4560,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes checkUpdateMaterializedViewProgress with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const expectedError = new Error('expected'); @@ -4720,11 +4581,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('listAppProfiles', () => { it('invokes listAppProfiles without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -4754,11 +4614,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listAppProfiles without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -4804,11 +4663,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listAppProfiles with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -4836,11 +4694,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listAppProfilesStream without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -4891,11 +4748,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listAppProfilesStream with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -4941,11 +4797,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listAppProfiles without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -4985,11 +4840,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listAppProfiles with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListAppProfilesRequest(), @@ -5028,11 +4882,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('listHotTablets', () => { it('invokes listHotTablets without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5062,11 +4915,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listHotTablets without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5112,11 +4964,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listHotTablets with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5144,11 +4995,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listHotTabletsStream without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5199,11 +5049,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listHotTabletsStream with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5249,11 +5098,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listHotTablets without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5293,11 +5141,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listHotTablets with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListHotTabletsRequest(), @@ -5336,11 +5183,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('listLogicalViews', () => { it('invokes listLogicalViews without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5376,11 +5222,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listLogicalViews without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5432,11 +5277,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listLogicalViews with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5464,11 +5308,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listLogicalViewsStream without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5525,11 +5368,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listLogicalViewsStream with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5575,11 +5417,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listLogicalViews without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5625,11 +5466,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listLogicalViews with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListLogicalViewsRequest(), @@ -5668,11 +5508,10 @@ describe('v2.BigtableInstanceAdminClient', () => { describe('listMaterializedViews', () => { it('invokes listMaterializedViews without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -5709,11 +5548,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listMaterializedViews without error using callback', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -5765,11 +5603,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listMaterializedViews with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -5800,11 +5637,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listMaterializedViewsStream without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -5868,11 +5704,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('invokes listMaterializedViewsStream with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -5925,11 +5760,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listMaterializedViews without error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -5979,11 +5813,10 @@ describe('v2.BigtableInstanceAdminClient', () => { }); it('uses async iteration with listMaterializedViews with error', async () => { - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); const request = generateSampleMessage( new protos.google.bigtable.admin.v2.ListMaterializedViewsRequest(), @@ -6033,11 +5866,10 @@ describe('v2.BigtableInstanceAdminClient', () => { instance: 'instanceValue', app_profile: 'appProfileValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.appProfilePathTemplate.render = sinon .stub() @@ -6099,11 +5931,10 @@ describe('v2.BigtableInstanceAdminClient', () => { table: 'tableValue', authorized_view: 'authorizedViewValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.authorizedViewPathTemplate.render = sinon .stub() @@ -6177,11 +6008,10 @@ describe('v2.BigtableInstanceAdminClient', () => { cluster: 'clusterValue', backup: 'backupValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.backupPathTemplate.render = sinon .stub() @@ -6253,11 +6083,10 @@ describe('v2.BigtableInstanceAdminClient', () => { instance: 'instanceValue', cluster: 'clusterValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.clusterPathTemplate.render = sinon .stub() @@ -6319,11 +6148,10 @@ describe('v2.BigtableInstanceAdminClient', () => { cluster: 'clusterValue', hot_tablet: 'hotTabletValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.hotTabletPathTemplate.render = sinon .stub() @@ -6394,11 +6222,10 @@ describe('v2.BigtableInstanceAdminClient', () => { project: 'projectValue', instance: 'instanceValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.instancePathTemplate.render = sinon .stub() @@ -6445,11 +6272,10 @@ describe('v2.BigtableInstanceAdminClient', () => { instance: 'instanceValue', logical_view: 'logicalViewValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.logicalViewPathTemplate.render = sinon .stub() @@ -6510,11 +6336,10 @@ describe('v2.BigtableInstanceAdminClient', () => { instance: 'instanceValue', materialized_view: 'materializedViewValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.materializedViewPathTemplate.render = sinon .stub() @@ -6577,11 +6402,10 @@ describe('v2.BigtableInstanceAdminClient', () => { const expectedParameters = { project: 'projectValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() @@ -6619,11 +6443,10 @@ describe('v2.BigtableInstanceAdminClient', () => { table: 'tableValue', schema_bundle: 'schemaBundleValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.schemaBundlePathTemplate.render = sinon .stub() @@ -6696,11 +6519,10 @@ describe('v2.BigtableInstanceAdminClient', () => { cluster: 'clusterValue', snapshot: 'snapshotValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.snapshotPathTemplate.render = sinon .stub() @@ -6772,11 +6594,10 @@ describe('v2.BigtableInstanceAdminClient', () => { instance: 'instanceValue', table: 'tableValue', }; - const client = - new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); + const client = new bigtableinstanceadminModule.admin.InstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); await client.initialize(); client.pathTemplates.tablePathTemplate.render = sinon .stub() diff --git a/test/admin/v2/gapic_bigtable_table_admin_v2.ts b/test/admin/v2/gapic_bigtable_table_admin_v2.ts index 9a8e7cf7c..d70d42ff3 100644 --- a/test/admin/v2/gapic_bigtable_table_admin_v2.ts +++ b/test/admin/v2/gapic_bigtable_table_admin_v2.ts @@ -162,13 +162,13 @@ function stubAsyncIterationCall( describe('v2.BigtableTableAdminClient', () => { describe('Common methods', () => { it('has apiEndpoint', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const client = new bigtabletableadminModule.admin.TableAdminClient(); const apiEndpoint = client.apiEndpoint; assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); }); it('has universeDomain', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const client = new bigtabletableadminModule.admin.TableAdminClient(); const universeDomain = client.universeDomain; assert.strictEqual(universeDomain, 'googleapis.com'); }); @@ -180,7 +180,7 @@ describe('v2.BigtableTableAdminClient', () => { it('throws DeprecationWarning if static servicePath is used', () => { const stub = sinon.stub(process, 'emitWarning'); const servicePath = - bigtabletableadminModule.v2.BigtableTableAdminClient.servicePath; + bigtabletableadminModule.admin.TableAdminClient.servicePath; assert.strictEqual(servicePath, 'bigtableadmin.googleapis.com'); assert(stub.called); stub.restore(); @@ -189,14 +189,14 @@ describe('v2.BigtableTableAdminClient', () => { it('throws DeprecationWarning if static apiEndpoint is used', () => { const stub = sinon.stub(process, 'emitWarning'); const apiEndpoint = - bigtabletableadminModule.v2.BigtableTableAdminClient.apiEndpoint; + bigtabletableadminModule.admin.TableAdminClient.apiEndpoint; assert.strictEqual(apiEndpoint, 'bigtableadmin.googleapis.com'); assert(stub.called); stub.restore(); }); } it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ universeDomain: 'example.com', }); const servicePath = client.apiEndpoint; @@ -204,7 +204,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ universe_domain: 'example.com', }); const servicePath = client.apiEndpoint; @@ -216,8 +216,7 @@ describe('v2.BigtableTableAdminClient', () => { 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 client = new bigtabletableadminModule.admin.TableAdminClient(); const servicePath = client.apiEndpoint; assert.strictEqual(servicePath, 'bigtableadmin.example.com'); if (saved) { @@ -230,10 +229,9 @@ describe('v2.BigtableTableAdminClient', () => { 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 client = new bigtabletableadminModule.admin.TableAdminClient({ + universeDomain: 'configured.example.com', + }); const servicePath = client.apiEndpoint; assert.strictEqual( servicePath, @@ -249,7 +247,7 @@ describe('v2.BigtableTableAdminClient', () => { } it('does not allow setting both universeDomain and universe_domain', () => { assert.throws(() => { - new bigtabletableadminModule.v2.BigtableTableAdminClient({ + new bigtabletableadminModule.admin.TableAdminClient({ universe_domain: 'example.com', universeDomain: 'example.net', }); @@ -257,25 +255,25 @@ describe('v2.BigtableTableAdminClient', () => { }); it('has port', () => { - const port = bigtabletableadminModule.v2.BigtableTableAdminClient.port; + const port = bigtabletableadminModule.admin.TableAdminClient.port; assert(port); assert(typeof port === 'number'); }); it('should create a client with no option', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient(); + const client = new bigtabletableadminModule.admin.TableAdminClient(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ fallback: true, }); assert(client); }); it('has initialize method and supports deferred initialization', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -285,7 +283,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('has close method for the initialized client', done => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -304,7 +302,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('has close method for the non-initialized client', done => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -321,7 +319,7 @@ describe('v2.BigtableTableAdminClient', () => { it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -333,7 +331,7 @@ describe('v2.BigtableTableAdminClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -356,7 +354,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('createTable', () => { it('invokes createTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -387,7 +385,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -434,7 +432,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createTable with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -465,7 +463,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createTable with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -488,7 +486,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('getTable', () => { it('invokes getTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -519,7 +517,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -566,7 +564,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getTable with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -594,7 +592,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getTable with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -617,7 +615,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('deleteTable', () => { it('invokes deleteTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -648,7 +646,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -695,7 +693,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteTable with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -726,7 +724,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteTable with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -749,7 +747,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('getAuthorizedView', () => { it('invokes getAuthorizedView without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -780,7 +778,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getAuthorizedView without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -827,7 +825,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getAuthorizedView with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -858,7 +856,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getAuthorizedView with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -881,7 +879,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('deleteAuthorizedView', () => { it('invokes deleteAuthorizedView without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -913,7 +911,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteAuthorizedView without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -960,7 +958,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteAuthorizedView with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -991,7 +989,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteAuthorizedView with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1014,7 +1012,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('modifyColumnFamilies', () => { it('invokes modifyColumnFamilies without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1046,7 +1044,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes modifyColumnFamilies without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1093,7 +1091,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes modifyColumnFamilies with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1124,7 +1122,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes modifyColumnFamilies with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1147,7 +1145,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('dropRowRange', () => { it('invokes dropRowRange without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1178,7 +1176,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes dropRowRange without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1225,7 +1223,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes dropRowRange with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1256,7 +1254,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes dropRowRange with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1279,7 +1277,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('generateConsistencyToken', () => { it('invokes generateConsistencyToken without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1311,7 +1309,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes generateConsistencyToken without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1358,7 +1356,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes generateConsistencyToken with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1392,7 +1390,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes generateConsistencyToken with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1418,7 +1416,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('checkConsistency', () => { it('invokes checkConsistency without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1449,7 +1447,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkConsistency without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1496,7 +1494,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkConsistency with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1527,7 +1525,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkConsistency with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1550,7 +1548,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('getSnapshot', () => { it('invokes getSnapshot without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1581,7 +1579,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getSnapshot without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1628,7 +1626,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getSnapshot with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1659,7 +1657,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getSnapshot with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1682,7 +1680,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('deleteSnapshot', () => { it('invokes deleteSnapshot without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1713,7 +1711,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteSnapshot without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1760,7 +1758,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteSnapshot with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1791,7 +1789,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteSnapshot with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1814,7 +1812,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('getBackup', () => { it('invokes getBackup without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1845,7 +1843,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getBackup without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1892,7 +1890,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getBackup with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1920,7 +1918,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getBackup with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1943,7 +1941,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('updateBackup', () => { it('invokes updateBackup without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -1975,7 +1973,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateBackup without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2023,7 +2021,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateBackup with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2055,7 +2053,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateBackup with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2079,7 +2077,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('deleteBackup', () => { it('invokes deleteBackup without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2110,7 +2108,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteBackup without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2157,7 +2155,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteBackup with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2188,7 +2186,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteBackup with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2211,7 +2209,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('getIamPolicy', () => { it('invokes getIamPolicy without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2242,7 +2240,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getIamPolicy without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2289,7 +2287,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getIamPolicy with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2320,7 +2318,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getIamPolicy with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2343,7 +2341,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('setIamPolicy', () => { it('invokes setIamPolicy without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2374,7 +2372,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes setIamPolicy without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2421,7 +2419,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes setIamPolicy with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2452,7 +2450,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes setIamPolicy with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2475,7 +2473,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('testIamPermissions', () => { it('invokes testIamPermissions without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2507,7 +2505,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes testIamPermissions without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2554,7 +2552,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes testIamPermissions with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2585,7 +2583,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes testIamPermissions with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2608,7 +2606,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('getSchemaBundle', () => { it('invokes getSchemaBundle without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2639,7 +2637,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getSchemaBundle without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2686,7 +2684,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getSchemaBundle with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2717,7 +2715,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes getSchemaBundle with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2740,7 +2738,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('deleteSchemaBundle', () => { it('invokes deleteSchemaBundle without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2772,7 +2770,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteSchemaBundle without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2819,7 +2817,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteSchemaBundle with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2850,7 +2848,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes deleteSchemaBundle with closed client', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2873,7 +2871,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('createTableFromSnapshot', () => { it('invokes createTableFromSnapshot without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2906,7 +2904,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createTableFromSnapshot without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2960,7 +2958,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createTableFromSnapshot with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -2994,7 +2992,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createTableFromSnapshot with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3027,7 +3025,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateTableFromSnapshotProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3050,7 +3048,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateTableFromSnapshotProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3071,7 +3069,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('updateTable', () => { it('invokes updateTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3104,7 +3102,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3159,7 +3157,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateTable with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3191,7 +3189,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateTable with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3225,7 +3223,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUpdateTableProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3247,7 +3245,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUpdateTableProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3265,7 +3263,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('undeleteTable', () => { it('invokes undeleteTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3298,7 +3296,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes undeleteTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3352,7 +3350,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes undeleteTable with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3383,7 +3381,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes undeleteTable with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3416,7 +3414,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUndeleteTableProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3438,7 +3436,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUndeleteTableProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3459,7 +3457,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('createAuthorizedView', () => { it('invokes createAuthorizedView without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3492,7 +3490,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createAuthorizedView without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3546,7 +3544,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createAuthorizedView with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3577,7 +3575,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createAuthorizedView with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3610,7 +3608,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateAuthorizedViewProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3632,7 +3630,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateAuthorizedViewProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3653,7 +3651,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('updateAuthorizedView', () => { it('invokes updateAuthorizedView without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3687,7 +3685,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateAuthorizedView without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3742,7 +3740,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateAuthorizedView with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3774,7 +3772,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateAuthorizedView with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3808,7 +3806,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUpdateAuthorizedViewProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3830,7 +3828,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUpdateAuthorizedViewProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3851,7 +3849,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('snapshotTable', () => { it('invokes snapshotTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3884,7 +3882,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes snapshotTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3938,7 +3936,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes snapshotTable with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -3969,7 +3967,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes snapshotTable with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4002,7 +4000,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkSnapshotTableProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4024,7 +4022,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkSnapshotTableProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4045,7 +4043,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('createBackup', () => { it('invokes createBackup without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4077,7 +4075,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createBackup without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4131,7 +4129,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createBackup with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4162,7 +4160,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createBackup with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4195,7 +4193,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateBackupProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4217,7 +4215,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateBackupProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4235,7 +4233,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('restoreTable', () => { it('invokes restoreTable without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4267,7 +4265,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes restoreTable without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4321,7 +4319,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes restoreTable with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4352,7 +4350,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes restoreTable with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4385,7 +4383,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkRestoreTableProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4407,7 +4405,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkRestoreTableProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4425,7 +4423,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('copyBackup', () => { it('invokes copyBackup without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4457,7 +4455,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes copyBackup without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4511,7 +4509,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes copyBackup with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4542,7 +4540,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes copyBackup with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4575,7 +4573,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCopyBackupProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4597,7 +4595,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCopyBackupProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4615,7 +4613,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('createSchemaBundle', () => { it('invokes createSchemaBundle without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4648,7 +4646,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createSchemaBundle without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4702,7 +4700,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createSchemaBundle with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4733,7 +4731,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes createSchemaBundle with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4766,7 +4764,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateSchemaBundleProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4788,7 +4786,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkCreateSchemaBundleProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4809,7 +4807,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('updateSchemaBundle', () => { it('invokes updateSchemaBundle without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4843,7 +4841,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateSchemaBundle without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4898,7 +4896,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateSchemaBundle with call error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4930,7 +4928,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes updateSchemaBundle with LRO error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4964,7 +4962,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUpdateSchemaBundleProgress without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -4986,7 +4984,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes checkUpdateSchemaBundleProgress with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5007,7 +5005,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('listTables', () => { it('invokes listTables without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5040,7 +5038,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listTables without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5089,7 +5087,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listTables with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5120,7 +5118,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listTablesStream without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5171,7 +5169,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listTablesStream with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5219,7 +5217,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listTables without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5262,7 +5260,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listTables with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5306,7 +5304,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('listAuthorizedViews', () => { it('invokes listAuthorizedViews without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5346,7 +5344,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listAuthorizedViews without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5401,7 +5399,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listAuthorizedViews with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5432,7 +5430,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listAuthorizedViewsStream without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5492,7 +5490,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listAuthorizedViewsStream with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5541,7 +5539,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listAuthorizedViews without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5590,7 +5588,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listAuthorizedViews with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5632,7 +5630,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('listSnapshots', () => { it('invokes listSnapshots without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5665,7 +5663,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSnapshots without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5714,7 +5712,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSnapshots with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5745,7 +5743,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSnapshotsStream without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5799,7 +5797,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSnapshotsStream with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5848,7 +5846,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listSnapshots without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5891,7 +5889,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listSnapshots with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5933,7 +5931,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('listBackups', () => { it('invokes listBackups without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -5966,7 +5964,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listBackups without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6015,7 +6013,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listBackups with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6046,7 +6044,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listBackupsStream without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6100,7 +6098,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listBackupsStream with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6151,7 +6149,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listBackups without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6194,7 +6192,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listBackups with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6238,7 +6236,7 @@ describe('v2.BigtableTableAdminClient', () => { describe('listSchemaBundles', () => { it('invokes listSchemaBundles without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6277,7 +6275,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSchemaBundles without error using callback', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6332,7 +6330,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSchemaBundles with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6363,7 +6361,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSchemaBundlesStream without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6423,7 +6421,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('invokes listSchemaBundlesStream with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6472,7 +6470,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listSchemaBundles without error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6521,7 +6519,7 @@ describe('v2.BigtableTableAdminClient', () => { }); it('uses async iteration with listSchemaBundles with error', async () => { - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6569,7 +6567,7 @@ describe('v2.BigtableTableAdminClient', () => { instance: 'instanceValue', app_profile: 'appProfileValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6634,7 +6632,7 @@ describe('v2.BigtableTableAdminClient', () => { table: 'tableValue', authorized_view: 'authorizedViewValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6711,7 +6709,7 @@ describe('v2.BigtableTableAdminClient', () => { cluster: 'clusterValue', backup: 'backupValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6786,7 +6784,7 @@ describe('v2.BigtableTableAdminClient', () => { instance: 'instanceValue', cluster: 'clusterValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6851,7 +6849,7 @@ describe('v2.BigtableTableAdminClient', () => { cluster: 'clusterValue', hot_tablet: 'hotTabletValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6925,7 +6923,7 @@ describe('v2.BigtableTableAdminClient', () => { project: 'projectValue', instance: 'instanceValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -6975,7 +6973,7 @@ describe('v2.BigtableTableAdminClient', () => { instance: 'instanceValue', logical_view: 'logicalViewValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -7039,7 +7037,7 @@ describe('v2.BigtableTableAdminClient', () => { instance: 'instanceValue', materialized_view: 'materializedViewValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -7105,7 +7103,7 @@ describe('v2.BigtableTableAdminClient', () => { const expectedParameters = { project: 'projectValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -7146,7 +7144,7 @@ describe('v2.BigtableTableAdminClient', () => { table: 'tableValue', schema_bundle: 'schemaBundleValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -7222,7 +7220,7 @@ describe('v2.BigtableTableAdminClient', () => { cluster: 'clusterValue', snapshot: 'snapshotValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); @@ -7297,7 +7295,7 @@ describe('v2.BigtableTableAdminClient', () => { instance: 'instanceValue', table: 'tableValue', }; - const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + const client = new bigtabletableadminModule.admin.TableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); From b350d5ea80e09401d25995e35c73561b32a10171 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Fri, 12 Dec 2025 14:47:32 -0500 Subject: [PATCH 18/20] feat: improve the type safety of GcRuleBuilder and add tests --- src/admin/gc-rule-builder.ts | 82 ++++++++++---- test/admin/gc-rule-builder.ts | 194 ++++++++++++++++++++++++++++++++++ 2 files changed, 255 insertions(+), 21 deletions(-) create mode 100644 test/admin/gc-rule-builder.ts diff --git a/src/admin/gc-rule-builder.ts b/src/admin/gc-rule-builder.ts index 18020c0b8..caccca697 100644 --- a/src/admin/gc-rule-builder.ts +++ b/src/admin/gc-rule-builder.ts @@ -18,10 +18,21 @@ import {google} from '../../protos/protos'; export type IGcRule = google.bigtable.admin.v2.IGcRule; export type IDuration = google.protobuf.IDuration; +// Builds a type that has exactly one key from another type. +type RequireExactlyOne = { + [K in Keys]-?: Required> & + Partial, never>>; +}[Keys]; + +// Builds a type from RequireExactlyOne that excludes certain keys. +type BuildExclusiveType = RequireExactlyOne< + Omit +>; + export type GcUnion = Pick; export type GcIntersection = Pick; export type GcGrouping = GcUnion | GcIntersection; -export type GcRuleItem = Omit; +export type GcRuleItem = BuildExclusiveType; function isUnion(rule: IGcRule): rule is GcUnion { return !!rule.union; @@ -35,8 +46,15 @@ function isGrouping(rule: IGcRule): rule is GcGrouping { return isUnion(rule) || isIntersection(rule); } +function nonGroupKeys(rule: IGcRule): string[] { + return Object.keys(rule).filter(k => k !== 'union' && k !== 'intersection'); +} + function isRuleItem(rule: IGcRule): rule is GcRuleItem { - return !isUnion(rule) && !isIntersection(rule); + const keys = nonGroupKeys(rule); + + // We'll handle === 1 below. + return keys.length > 0; } /** @@ -46,24 +64,45 @@ function isRuleItem(rule: IGcRule): rule is GcRuleItem { * JavaScript users as well. */ export class GcRuleBuilder { + /** + * Formats exception strings. + * + * @private + * @param p The IGcRule parameter that's failing + * @param why A string describing why it's failing + * @returns A formatted exception message + */ + static formatErrorParameter(p: IGcRule, why: string): string { + return `Parameter ${util.format('%o', p)} ${why}`; + } + /** * Runtime checks for JavaScript code. * @private */ static checkGroupingItem(p: GcGrouping | GcRuleItem): void { - if (!isGrouping(p) && !isRuleItem(p)) { + if (isUnion(p) && isIntersection(p)) { throw new Error( - `Parameter ${util.format('%o', p)} is not a union, intersection, or rule`, + GcRuleBuilder.formatErrorParameter( + p, + 'is both a union and intersection', + ), ); } - if (isUnion(p) && isIntersection(p)) { + if (isGrouping(p) && isRuleItem(p)) { throw new Error( - `Parameter ${util.format('%o', p)} is both a union and intersection`, + GcRuleBuilder.formatErrorParameter( + p, + 'is both a union and/or intersection, and a rule', + ), ); } - if (isGrouping(p) && isRuleItem(p)) { + if (!isGrouping(p) && !isRuleItem(p)) { throw new Error( - `Parameter ${util.format('%o', p)} is both a union and/or intersection, and a rule`, + GcRuleBuilder.formatErrorParameter( + p, + 'does not appear to be a rule or a union/intersection', + ), ); } } @@ -73,9 +112,22 @@ export class GcRuleBuilder { * @private */ static checkRuleItem(p: GcRuleItem): void { + if (isGrouping(p)) { + throw new Error( + GcRuleBuilder.formatErrorParameter( + p, + 'is a union or intersection, not a rule', + ), + ); + } if (!isRuleItem(p)) { throw new Error( - `Parameter ${util.format('%o', p)} is not a rule (or not only a rule)`, + GcRuleBuilder.formatErrorParameter(p, 'does not appear to be a rule'), + ); + } + if (nonGroupKeys(p).length > 1) { + throw new Error( + GcRuleBuilder.formatErrorParameter(p, 'is an invalid multiple-rule'), ); } } @@ -88,12 +140,6 @@ export class GcRuleBuilder { * @returns [IGcRule] A newly built group */ static union(...params: Array): GcGrouping { - if (params.length < 2) { - throw new Error( - `Unions should contain at least two items (passed: ${params.length})`, - ); - } - params.forEach(GcRuleBuilder.checkGroupingItem); return { @@ -111,12 +157,6 @@ export class GcRuleBuilder { * @returns [IGcRule] A newly built group */ static intersection(...params: Array): GcGrouping { - if (params.length < 2) { - throw new Error( - `Intersections should contain at least two items (passed: ${params.length})`, - ); - } - params.forEach(GcRuleBuilder.checkGroupingItem); return { diff --git a/test/admin/gc-rule-builder.ts b/test/admin/gc-rule-builder.ts new file mode 100644 index 000000000..46ec18dbc --- /dev/null +++ b/test/admin/gc-rule-builder.ts @@ -0,0 +1,194 @@ +// Copyright 2025 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. + +import * as gc from '../../src/admin/gc-rule-builder'; +import {GcRuleBuilder} from '../../src/admin/gc-rule-builder'; + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; + +describe('GcRuleBuilder', () => { + it('has working TypeScript types', () => { + // Not really much to do here at runtime, but this will break + // if one of them is wrong. + const union: gc.GcUnion = { + union: {}, + }; + const intersection: gc.GcIntersection = { + intersection: {}, + }; + + const grouping: gc.GcGrouping = { + union: {}, + }; + + const ruleItem: gc.GcRuleItem = { + maxNumVersions: 10, + }; + + assert.ok(union); + assert.ok(intersection); + assert.ok(grouping); + assert.ok(ruleItem); + }); + + it('makes basic rules', () => { + // This is a no-op outside of checking, which is tested below. + GcRuleBuilder.rule({ + maxNumVersions: 1, + }); + }); + + it('has working union building', () => { + const rule = GcRuleBuilder.union( + GcRuleBuilder.rule({ + maxNumVersions: 1, + }), + GcRuleBuilder.rule({ + maxAge: { + seconds: 1, + }, + }), + ); + + assert.deepStrictEqual(rule, { + union: { + rules: [ + { + maxNumVersions: 1, + }, + { + maxAge: { + seconds: 1, + }, + }, + ], + }, + }); + }); + + it('has working intersection building', () => { + const rule = GcRuleBuilder.intersection( + GcRuleBuilder.rule({ + maxNumVersions: 1, + }), + GcRuleBuilder.rule({ + maxAge: { + seconds: 1, + }, + }), + ); + + assert.deepStrictEqual(rule, { + intersection: { + rules: [ + { + maxNumVersions: 1, + }, + { + maxAge: { + seconds: 1, + }, + }, + ], + }, + }); + }); + + it('can nest', () => { + const rule = GcRuleBuilder.intersection( + GcRuleBuilder.union( + GcRuleBuilder.rule({ + maxNumVersions: 10, + }), + ), + GcRuleBuilder.rule({ + maxNumVersions: 1, + }), + GcRuleBuilder.rule({ + maxAge: { + seconds: 1, + }, + }), + ); + + assert.deepStrictEqual(rule, { + intersection: { + rules: [ + { + union: { + rules: [ + { + maxNumVersions: 10, + }, + ], + }, + }, + { + maxNumVersions: 1, + }, + { + maxAge: { + seconds: 1, + }, + }, + ], + }, + }); + }); + + it('catches invalid groupings', () => { + // Both a union and intersection + assert.throws(() => { + GcRuleBuilder.union({ + union: {}, + intersection: {}, + }); + }); + + // Union/intersection + rules + assert.throws(() => { + GcRuleBuilder.union({ + union: {}, + maxNumVersions: 1, + }); + }); + + // Union/intersection as rule + assert.throws(() => { + GcRuleBuilder.rule( + GcRuleBuilder.union({ + maxNumVersions: 1, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }) as any, + ); + }); + }); + + it('catches invalid rules', () => { + // Unfortunately, limitations in TypeScript keep us from doing a really + // thorough check on rule validity (no runtime types). We can at least check + // that the user didn't pass more than one thing. + assert.throws(() => { + // TS won't compile this. + GcRuleBuilder.rule({ + maxNumVersions: 1, + maxAge: { + seconds: 1, + }, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any); + }); + }); +}); From 3f2eaa479891ed12939e171a477f8f0581ce495d Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:05:52 -0500 Subject: [PATCH 19/20] tests: add tests for TableAdmin --- test/admin/bigtable-admin.ts | 177 +++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 test/admin/bigtable-admin.ts diff --git a/test/admin/bigtable-admin.ts b/test/admin/bigtable-admin.ts new file mode 100644 index 000000000..a6a5e728e --- /dev/null +++ b/test/admin/bigtable-admin.ts @@ -0,0 +1,177 @@ +// Copyright 2025 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. + +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub, SinonSandbox} from 'sinon'; +import {describe, it} from 'mocha'; +import * as bigtabletableadminModule from '../../src'; + +import {protobuf, operationsProtos} from 'google-gax'; +import {TableAdminClient} from '../../src/admin'; + +// Copied from v2/gapic_bigtable_table_admin_v2.ts +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +// Copied from v2/gapic_bigtable_table_admin_v2.ts +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +// The GAPIC generated tests don't cover our supplemental methods, so this +// basically just copies the code for checkRestoreTableProgress. +describe('restoreTable', () => { + it('invokes checkOptimizeRestoredTableProgress without error', async () => { + const client = new bigtabletableadminModule.admin.TableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await 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.checkOptimizeRestoredTableProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkOptimizeRestoredTableProgress with error', async () => { + const client = new bigtabletableadminModule.admin.TableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkOptimizeRestoredTableProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); +}); + +describe('waitForConsistency', () => { + let sandbox: SinonSandbox; + + beforeEach(() => { + sandbox = sinon.createSandbox(); + }); + + afterEach(() => { + sandbox.restore(); + }); + + it('calls without error', async () => { + const tableName = 'test'; + const consistencyToken = 'token'; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const config: any = { + toFake: [ + 'setTimeout', + 'clearTimeout', + 'setInterval', + 'clearInterval', + 'Date', + ], + }; + + const fakeTimers = sandbox.useFakeTimers(config); + + const client = new TableAdminClient(); + sandbox.stub(client, 'generateConsistencyToken').callsFake(tn => { + assert.strictEqual(tn.name, tableName); + return [ + { + consistencyToken, + }, + ]; + }); + + let consistent = false; + const checkStub = sandbox + .stub(client, 'checkConsistency') + .callsFake(req => { + assert.strictEqual(req.consistencyToken, consistencyToken); + const rv = { + consistent, + }; + consistent = true; + return [rv]; + }); + + const promise = client.waitForConsistency(tableName); + while (!consistent) { + // This is gross, but we basically have to wait a few ticks + // to make sure the function has called setTimeout, before + // advancing the fake timer. + for (let i = 0; i < 5; i++) { + await Promise.resolve(); + } + } + fakeTimers.tick(5500); + + await promise; + + assert.strictEqual(checkStub.callCount, 2); + }); + + it('errors on generateConsistencyToken', async () => { + const client = new TableAdminClient(); + sandbox.stub(client, 'generateConsistencyToken').callsFake(() => { + throw new Error('it failed!'); + }); + sandbox.stub(client, 'checkConsistency').callsFake(() => { + throw new Error('should not be called'); + }); + + await assert.rejects(() => client.waitForConsistency('foo')); + }); + + it('errors on checkConsistency', async () => { + const client = new TableAdminClient(); + sandbox.stub(client, 'generateConsistencyToken').callsFake(() => [ + { + consistencyToken: 'foo', + }, + ]); + sandbox.stub(client, 'checkConsistency').callsFake(() => { + throw new Error('it failed!'); + }); + + await assert.rejects(() => client.waitForConsistency('foo')); + }); +}); From 01403015a4bf011d8d2db97685613185955e6979 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:08:43 -0500 Subject: [PATCH 20/20] samples: update GcRule samples for GcRuleBuilder --- samples/tableadmin.js | 117 ++++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/samples/tableadmin.js b/samples/tableadmin.js index 7d3d23fc1..672d18c8f 100644 --- a/samples/tableadmin.js +++ b/samples/tableadmin.js @@ -13,9 +13,10 @@ // limitations under the License. // Imports the Google Cloud client library -const {Bigtable, GCRuleMaker} = require('@google-cloud/bigtable'); -const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2; -const adminClient = new BigtableTableAdminClient(); +const {Bigtable} = require('@google-cloud/bigtable'); +const {TableAdminClient, GcRuleBuilder} = + require('@google-cloud/bigtable').admin; +const adminClient = new TableAdminClient(); async function runTableOperations(instanceID, tableID) { const bigtable = new Bigtable(); @@ -86,22 +87,20 @@ async function runTableOperations(instanceID, tableID) { // where age = current time minus cell timestamp // Define the GC rule to retain data with max age of 5 days - const maxAgeRule = { - rule: { - maxAge: { - // Value must be atleast 1 millisecond - seconds: 60 * 60 * 24 * 5, - nanos: 0, - }, + const maxAgeRule = GcRuleBuilder.rule({ + maxAge: { + // Value must be atleast 1 millisecond + seconds: 60 * 60 * 24 * 5, + nanos: 0, }, - }; + }); let [family] = await adminClient.modifyColumnFamilies({ name: table.name, modifications: [ { id: 'cf1', create: { - gcRule: GCRuleMaker.makeRule(maxAgeRule), + gcRule: maxAgeRule, }, }, ], @@ -116,11 +115,9 @@ async function runTableOperations(instanceID, tableID) { // where 1 = most recent version // Define the GC policy to retain only the most recent 2 versions - const maxVersionsRule = { - rule: { - maxVersions: 2, - }, - }; + const maxVersionsRule = GcRuleBuilder.rule({ + maxVersions: 2, + }); // Create a column family with given GC rule [family] = await adminClient.modifyColumnFamilies({ @@ -129,7 +126,7 @@ async function runTableOperations(instanceID, tableID) { { id: 'cf2', create: { - gcRule: GCRuleMaker.makeRule(maxVersionsRule), + gcRule: maxVersionsRule, }, }, ], @@ -143,14 +140,17 @@ async function runTableOperations(instanceID, tableID) { // Create a column family with GC policy to drop data that matches at least one condition. // Define a GC rule to drop cells older than 5 days or not the most recent version - const unionRule = { - ruleType: 'union', - maxVersions: 1, - maxAge: { - seconds: 60 * 60 * 24 * 5, - nanos: 0, - }, - }; + const unionRule = GcRuleBuilder.union( + GcRuleBuilder.rule({ + maxVersions: 1, + }), + GcRuleBuilder.rule({ + maxAge: { + seconds: 60 * 60 * 24 * 5, + nanos: 0, + }, + }), + ); [family] = await adminClient.modifyColumnFamilies({ name: table.name, @@ -158,7 +158,7 @@ async function runTableOperations(instanceID, tableID) { { id: 'cf3', create: { - gcRule: GCRuleMaker.makeRule(unionRule), + gcRule: unionRule, }, }, ], @@ -172,21 +172,24 @@ async function runTableOperations(instanceID, tableID) { // Create a column family with GC policy to drop data that matches all conditions // GC rule: Drop cells older than 5 days AND older than the most recent 2 versions - const intersectionRule = { - ruleType: 'intersection', - maxVersions: 2, - maxAge: { - seconds: 60 * 60 * 24 * 5, - nanos: 0, - }, - }; + const intersectionRule = GcRuleBuilder.intersection( + GcRuleBuilder.rule({ + maxVersions: 2, + }), + GcRuleBuilder.rule({ + maxAge: { + seconds: 60 * 60 * 24 * 5, + nanos: 0, + }, + }), + ); [family] = await adminClient.modifyColumnFamilies({ name: table.name, modifications: [ { id: 'cf4', create: { - gcRule: GCRuleMaker.makeRule(intersectionRule), + gcRule: intersectionRule, }, }, ], @@ -201,19 +204,23 @@ async function runTableOperations(instanceID, tableID) { // Drop cells that are either older than the 10 recent versions // OR // Drop cells that are older than a month AND older than the 2 recent versions - const nestedRule = { - ruleType: 'union', - maxVersions: 10, - rule: { - ruleType: 'intersection', - maxVersions: 2, - maxAge: { - // one month - seconds: 60 * 60 * 24 * 30, - nanos: 0, - }, - }, - }; + const nestedRule = GcRuleBuilder.union( + GcRuleBuilder.rule({ + maxVersions: 10, + }), + GcRuleBuilder.intersection( + GcRuleBuilder.rule({ + maxVersions: 2, + }), + GcRuleBuilder.rule({ + maxAge: { + // one month + seconds: 60 * 60 * 24 * 30, + nanos: 0, + }, + }), + ), + ); [family] = await adminClient.modifyColumnFamilies({ name: table.name, @@ -221,7 +228,7 @@ async function runTableOperations(instanceID, tableID) { { id: 'cf5', create: { - gcRule: GCRuleMaker.makeRule(nestedRule), + gcRule: nestedRule, }, }, ], @@ -255,11 +262,9 @@ async function runTableOperations(instanceID, tableID) { // Update the column family metadata to update the GC rule // Update a column family GC rule - const updatedMetadata = { - rule: { - versions: 1, - }, - }; + const updatedMetadata = GcRuleBuilder.rule({ + maxNumVersions: 1, + }); const [apiResponse] = await adminClient.modifyColumnFamilies({ name: table.name, @@ -267,7 +272,7 @@ async function runTableOperations(instanceID, tableID) { { id: 'cf1', update: { - gcRule: GCRuleMaker.makeRule(updatedMetadata.rule), + gcRule: updatedMetadata, }, }, ],
include:samples/generated/v2/bigtable.mutate_row.jsinclude:samples/generated/v2/bigtable.check_and_mutate_row.jsinclude:samples/generated/v2/bigtable.ping_and_warm.jsinclude:samples/generated/v2/bigtable.read_modify_write_row.jsinclude:samples/generated/v2/bigtable.prepare_query.jsinclude:samples/generated/v2/bigtable.read_rows.jsinclude:samples/generated/v2/bigtable.sample_row_keys.jsinclude:samples/generated/v2/bigtable.mutate_rows.jsinclude:samples/generated/v2/bigtable.generate_initial_change_stream_partitions.jsinclude:samples/generated/v2/bigtable.read_change_stream.jsinclude:samples/generated/v2/bigtable.execute_query.js