diff --git a/protos/google/bigtable/v2/bigtable.proto b/protos/google/bigtable/v2/bigtable.proto index 17b145665..215b573cb 100644 --- a/protos/google/bigtable/v2/bigtable.proto +++ b/protos/google/bigtable/v2/bigtable.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,6 +36,10 @@ option (google.api.resource_definition) = { type: "bigtableadmin.googleapis.com/Table" pattern: "projects/{project}/instances/{instance}/tables/{table}" }; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" +}; // Service for reading from and writing to existing Bigtable tables. service Bigtable { @@ -152,6 +156,26 @@ service Bigtable { option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id"; } + // Warm up associated instance metadata for this connection. + // This call is not required but may be useful for connection keep-alive. + rpc PingAndWarm(PingAndWarmRequest) returns (PingAndWarmResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/instances/*}:ping" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{name=projects/*/instances/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,app_profile_id"; + } + // 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 @@ -450,6 +474,27 @@ message CheckAndMutateRowResponse { bool predicate_matched = 1; } +// Request message for client connection keep-alive and warming. +message PingAndWarmRequest { + // Required. The unique name of the instance to check permissions for as well as + // respond. Values are of the form `projects//instances/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + string app_profile_id = 2; +} + +// Response message for Bigtable.PingAndWarm connection keepalive and warming. +message PingAndWarmResponse { + +} + // Request message for Bigtable.ReadModifyWriteRow. message ReadModifyWriteRowRequest { // Required. The unique name of the table to which the read/modify/write rules should be diff --git a/protos/google/bigtable/v2/data.proto b/protos/google/bigtable/v2/data.proto index 7193ee753..9e5a05c2e 100644 --- a/protos/google/bigtable/v2/data.proto +++ b/protos/google/bigtable/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2022 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 7ba732019..1c9e11055 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -8871,6 +8871,20 @@ export namespace google { */ public checkAndMutateRow(request: google.bigtable.v2.ICheckAndMutateRowRequest): Promise; + /** + * Calls PingAndWarm. + * @param request PingAndWarmRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PingAndWarmResponse + */ + public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest, callback: google.bigtable.v2.Bigtable.PingAndWarmCallback): void; + + /** + * Calls PingAndWarm. + * @param request PingAndWarmRequest message or plain object + * @returns Promise + */ + public pingAndWarm(request: google.bigtable.v2.IPingAndWarmRequest): Promise; + /** * Calls ReadModifyWriteRow. * @param request ReadModifyWriteRowRequest message or plain object @@ -8923,6 +8937,13 @@ export namespace google { */ type CheckAndMutateRowCallback = (error: (Error|null), response?: google.bigtable.v2.CheckAndMutateRowResponse) => void; + /** + * Callback as used by {@link google.bigtable.v2.Bigtable#pingAndWarm}. + * @param error Error, if any + * @param [response] PingAndWarmResponse + */ + type PingAndWarmCallback = (error: (Error|null), response?: google.bigtable.v2.PingAndWarmResponse) => void; + /** * Callback as used by {@link google.bigtable.v2.Bigtable#readModifyWriteRow}. * @param error Error, if any @@ -10269,6 +10290,186 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a PingAndWarmRequest. */ + interface IPingAndWarmRequest { + + /** PingAndWarmRequest name */ + name?: (string|null); + + /** PingAndWarmRequest appProfileId */ + appProfileId?: (string|null); + } + + /** Represents a PingAndWarmRequest. */ + class PingAndWarmRequest implements IPingAndWarmRequest { + + /** + * Constructs a new PingAndWarmRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPingAndWarmRequest); + + /** PingAndWarmRequest name. */ + public name: string; + + /** PingAndWarmRequest appProfileId. */ + public appProfileId: string; + + /** + * Creates a new PingAndWarmRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PingAndWarmRequest instance + */ + public static create(properties?: google.bigtable.v2.IPingAndWarmRequest): google.bigtable.v2.PingAndWarmRequest; + + /** + * Encodes the specified PingAndWarmRequest message. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @param message PingAndWarmRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingAndWarmRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @param message PingAndWarmRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPingAndWarmRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingAndWarmRequest + * @throws {Error} If the payload is 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.PingAndWarmRequest; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingAndWarmRequest + * @throws {Error} If the 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.PingAndWarmRequest; + + /** + * Verifies a PingAndWarmRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingAndWarmRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmRequest; + + /** + * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. + * @param message PingAndWarmRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PingAndWarmRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingAndWarmRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PingAndWarmResponse. */ + interface IPingAndWarmResponse { + } + + /** Represents a PingAndWarmResponse. */ + class PingAndWarmResponse implements IPingAndWarmResponse { + + /** + * Constructs a new PingAndWarmResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.v2.IPingAndWarmResponse); + + /** + * Creates a new PingAndWarmResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PingAndWarmResponse instance + */ + public static create(properties?: google.bigtable.v2.IPingAndWarmResponse): google.bigtable.v2.PingAndWarmResponse; + + /** + * Encodes the specified PingAndWarmResponse message. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @param message PingAndWarmResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.v2.IPingAndWarmResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PingAndWarmResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @param message PingAndWarmResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.v2.IPingAndWarmResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PingAndWarmResponse + * @throws {Error} If the payload is 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.PingAndWarmResponse; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PingAndWarmResponse + * @throws {Error} If the 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.PingAndWarmResponse; + + /** + * Verifies a PingAndWarmResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PingAndWarmResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PingAndWarmResponse + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.v2.PingAndWarmResponse; + + /** + * Creates a plain object from a PingAndWarmResponse message. Also converts values to other types if specified. + * @param message PingAndWarmResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.v2.PingAndWarmResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PingAndWarmResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ReadModifyWriteRowRequest. */ interface IReadModifyWriteRowRequest { diff --git a/protos/protos.js b/protos/protos.js index f29dd53c6..0e08f5852 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -20437,6 +20437,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.bigtable.v2.Bigtable#pingAndWarm}. + * @memberof google.bigtable.v2.Bigtable + * @typedef PingAndWarmCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.bigtable.v2.PingAndWarmResponse} [response] PingAndWarmResponse + */ + + /** + * Calls PingAndWarm. + * @function pingAndWarm + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IPingAndWarmRequest} request PingAndWarmRequest message or plain object + * @param {google.bigtable.v2.Bigtable.PingAndWarmCallback} callback Node-style callback called with the error, if any, and PingAndWarmResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Bigtable.prototype.pingAndWarm = function pingAndWarm(request, callback) { + return this.rpcCall(pingAndWarm, $root.google.bigtable.v2.PingAndWarmRequest, $root.google.bigtable.v2.PingAndWarmResponse, request, callback); + }, "name", { value: "PingAndWarm" }); + + /** + * Calls PingAndWarm. + * @function pingAndWarm + * @memberof google.bigtable.v2.Bigtable + * @instance + * @param {google.bigtable.v2.IPingAndWarmRequest} request PingAndWarmRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.bigtable.v2.Bigtable#readModifyWriteRow}. * @memberof google.bigtable.v2.Bigtable @@ -23823,6 +23856,376 @@ return CheckAndMutateRowResponse; })(); + v2.PingAndWarmRequest = (function() { + + /** + * Properties of a PingAndWarmRequest. + * @memberof google.bigtable.v2 + * @interface IPingAndWarmRequest + * @property {string|null} [name] PingAndWarmRequest name + * @property {string|null} [appProfileId] PingAndWarmRequest appProfileId + */ + + /** + * Constructs a new PingAndWarmRequest. + * @memberof google.bigtable.v2 + * @classdesc Represents a PingAndWarmRequest. + * @implements IPingAndWarmRequest + * @constructor + * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set + */ + function PingAndWarmRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PingAndWarmRequest name. + * @member {string} name + * @memberof google.bigtable.v2.PingAndWarmRequest + * @instance + */ + PingAndWarmRequest.prototype.name = ""; + + /** + * PingAndWarmRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.v2.PingAndWarmRequest + * @instance + */ + PingAndWarmRequest.prototype.appProfileId = ""; + + /** + * Creates a new PingAndWarmRequest instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.IPingAndWarmRequest=} [properties] Properties to set + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest instance + */ + PingAndWarmRequest.create = function create(properties) { + return new PingAndWarmRequest(properties); + }; + + /** + * Encodes the specified PingAndWarmRequest message. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.IPingAndWarmRequest} message PingAndWarmRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + return writer; + }; + + /** + * Encodes the specified PingAndWarmRequest message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.IPingAndWarmRequest} message PingAndWarmRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.appProfileId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PingAndWarmRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingAndWarmRequest message. + * @function verify + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingAndWarmRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + return null; + }; + + /** + * Creates a PingAndWarmRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PingAndWarmRequest} PingAndWarmRequest + */ + PingAndWarmRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmRequest) + return object; + var message = new $root.google.bigtable.v2.PingAndWarmRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.appProfileId != null) + message.appProfileId = String(object.appProfileId); + return message; + }; + + /** + * Creates a plain object from a PingAndWarmRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PingAndWarmRequest + * @static + * @param {google.bigtable.v2.PingAndWarmRequest} message PingAndWarmRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingAndWarmRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.appProfileId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + return object; + }; + + /** + * Converts this PingAndWarmRequest to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PingAndWarmRequest + * @instance + * @returns {Object.} JSON object + */ + PingAndWarmRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PingAndWarmRequest; + })(); + + v2.PingAndWarmResponse = (function() { + + /** + * Properties of a PingAndWarmResponse. + * @memberof google.bigtable.v2 + * @interface IPingAndWarmResponse + */ + + /** + * Constructs a new PingAndWarmResponse. + * @memberof google.bigtable.v2 + * @classdesc Represents a PingAndWarmResponse. + * @implements IPingAndWarmResponse + * @constructor + * @param {google.bigtable.v2.IPingAndWarmResponse=} [properties] Properties to set + */ + function PingAndWarmResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PingAndWarmResponse instance using the specified properties. + * @function create + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.IPingAndWarmResponse=} [properties] Properties to set + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse instance + */ + PingAndWarmResponse.create = function create(properties) { + return new PingAndWarmResponse(properties); + }; + + /** + * Encodes the specified PingAndWarmResponse message. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @function encode + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.IPingAndWarmResponse} message PingAndWarmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PingAndWarmResponse message, length delimited. Does not implicitly {@link google.bigtable.v2.PingAndWarmResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.IPingAndWarmResponse} message PingAndWarmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PingAndWarmResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.v2.PingAndWarmResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PingAndWarmResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PingAndWarmResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PingAndWarmResponse message. + * @function verify + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PingAndWarmResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PingAndWarmResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.v2.PingAndWarmResponse} PingAndWarmResponse + */ + PingAndWarmResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.v2.PingAndWarmResponse) + return object; + return new $root.google.bigtable.v2.PingAndWarmResponse(); + }; + + /** + * Creates a plain object from a PingAndWarmResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.v2.PingAndWarmResponse + * @static + * @param {google.bigtable.v2.PingAndWarmResponse} message PingAndWarmResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PingAndWarmResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PingAndWarmResponse to JSON. + * @function toJSON + * @memberof google.bigtable.v2.PingAndWarmResponse + * @instance + * @returns {Object.} JSON object + */ + PingAndWarmResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PingAndWarmResponse; + })(); + v2.ReadModifyWriteRowRequest = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index 69288d77a..4486599ed 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -2551,8 +2551,8 @@ "java_package": "com.google.bigtable.v2", "php_namespace": "Google\\Cloud\\Bigtable\\V2", "ruby_package": "Google::Cloud::Bigtable::V2", - "(google.api.resource_definition).type": "bigtableadmin.googleapis.com/Table", - "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}/tables/{table}" + "(google.api.resource_definition).type": "bigtableadmin.googleapis.com/Instance", + "(google.api.resource_definition).pattern": "projects/{project}/instances/{instance}" }, "nested": { "Bigtable": { @@ -2752,6 +2752,44 @@ } ] }, + "PingAndWarm": { + "requestType": "PingAndWarmRequest", + "responseType": "PingAndWarmResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/instances/*}:ping", + "(google.api.http).body": "*", + "(google.api.routing).routing_parameters.field": "app_profile_id", + "(google.api.routing).routing_parameters.path_template": "{name=projects/*/instances/*}", + "(google.api.method_signature)": "name,app_profile_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*}:ping", + "body": "*" + } + }, + { + "(google.api.routing)": { + "routing_parameters": [ + { + "field": "name", + "path_template": "{name=projects/*/instances/*}" + }, + { + "field": "app_profile_id" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.api.method_signature)": "name,app_profile_id" + } + ] + }, "ReadModifyWriteRow": { "requestType": "ReadModifyWriteRowRequest", "responseType": "ReadModifyWriteRowResponse", @@ -3056,6 +3094,25 @@ } } }, + "PingAndWarmRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigtableadmin.googleapis.com/Instance" + } + }, + "appProfileId": { + "type": "string", + "id": 2 + } + } + }, + "PingAndWarmResponse": { + "fields": {} + }, "ReadModifyWriteRowRequest": { "fields": { "tableName": { diff --git a/samples/generated/v2/bigtable.check_and_mutate_row.js b/samples/generated/v2/bigtable.check_and_mutate_row.js index 0175b8960..281ac8562 100644 --- a/samples/generated/v2/bigtable.check_and_mutate_row.js +++ b/samples/generated/v2/bigtable.check_and_mutate_row.js @@ -1,18 +1,27 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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, rowKey) { diff --git a/samples/generated/v2/bigtable.mutate_row.js b/samples/generated/v2/bigtable.mutate_row.js index 16e28ad77..13e45188d 100644 --- a/samples/generated/v2/bigtable.mutate_row.js +++ b/samples/generated/v2/bigtable.mutate_row.js @@ -1,18 +1,27 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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, rowKey, mutations) { diff --git a/samples/generated/v2/bigtable.mutate_rows.js b/samples/generated/v2/bigtable.mutate_rows.js index 0e5ec322b..3be0d8a4d 100644 --- a/samples/generated/v2/bigtable.mutate_rows.js +++ b/samples/generated/v2/bigtable.mutate_rows.js @@ -1,18 +1,27 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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, entries) { diff --git a/samples/generated/v2/bigtable.ping_and_warm.js b/samples/generated/v2/bigtable.ping_and_warm.js new file mode 100644 index 000000000..c68e61757 --- /dev/null +++ b/samples/generated/v2/bigtable.ping_and_warm.js @@ -0,0 +1,68 @@ +// Copyright 2022 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] + /** + * 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.read_modify_write_row.js b/samples/generated/v2/bigtable.read_modify_write_row.js index 2a3f7e049..ae7934b8f 100644 --- a/samples/generated/v2/bigtable.read_modify_write_row.js +++ b/samples/generated/v2/bigtable.read_modify_write_row.js @@ -1,18 +1,27 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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, rowKey, rules) { diff --git a/samples/generated/v2/bigtable.read_rows.js b/samples/generated/v2/bigtable.read_rows.js index 8d8156eb0..9b5354905 100644 --- a/samples/generated/v2/bigtable.read_rows.js +++ b/samples/generated/v2/bigtable.read_rows.js @@ -1,18 +1,27 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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) { diff --git a/samples/generated/v2/bigtable.sample_row_keys.js b/samples/generated/v2/bigtable.sample_row_keys.js index 902385fbd..d7364fe17 100644 --- a/samples/generated/v2/bigtable.sample_row_keys.js +++ b/samples/generated/v2/bigtable.sample_row_keys.js @@ -1,18 +1,27 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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) { diff --git a/samples/generated/v2/bigtable_instance_admin.create_app_profile.js b/samples/generated/v2/bigtable_instance_admin.create_app_profile.js index 7acc378d8..a18c932bd 100644 --- a/samples/generated/v2/bigtable_instance_admin.create_app_profile.js +++ b/samples/generated/v2/bigtable_instance_admin.create_app_profile.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.create_cluster.js b/samples/generated/v2/bigtable_instance_admin.create_cluster.js index 125cde6c0..14aba24d0 100644 --- a/samples/generated/v2/bigtable_instance_admin.create_cluster.js +++ b/samples/generated/v2/bigtable_instance_admin.create_cluster.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.create_instance.js b/samples/generated/v2/bigtable_instance_admin.create_instance.js index 0ac32e2ad..80125b099 100644 --- a/samples/generated/v2/bigtable_instance_admin.create_instance.js +++ b/samples/generated/v2/bigtable_instance_admin.create_instance.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js b/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js index d14915bcb..5074cabf1 100644 --- a/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js +++ b/samples/generated/v2/bigtable_instance_admin.delete_app_profile.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.delete_cluster.js b/samples/generated/v2/bigtable_instance_admin.delete_cluster.js index 9c213f7a3..e66fba3b3 100644 --- a/samples/generated/v2/bigtable_instance_admin.delete_cluster.js +++ b/samples/generated/v2/bigtable_instance_admin.delete_cluster.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.delete_instance.js b/samples/generated/v2/bigtable_instance_admin.delete_instance.js index 4586477c1..71cc7487f 100644 --- a/samples/generated/v2/bigtable_instance_admin.delete_instance.js +++ b/samples/generated/v2/bigtable_instance_admin.delete_instance.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.get_app_profile.js b/samples/generated/v2/bigtable_instance_admin.get_app_profile.js index 0abaf2ab5..f5bb4df4b 100644 --- a/samples/generated/v2/bigtable_instance_admin.get_app_profile.js +++ b/samples/generated/v2/bigtable_instance_admin.get_app_profile.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.get_cluster.js b/samples/generated/v2/bigtable_instance_admin.get_cluster.js index 6206027c4..da86f66dc 100644 --- a/samples/generated/v2/bigtable_instance_admin.get_cluster.js +++ b/samples/generated/v2/bigtable_instance_admin.get_cluster.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js b/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js index fdbec9e0a..337a3df8b 100644 --- a/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js +++ b/samples/generated/v2/bigtable_instance_admin.get_iam_policy.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.get_instance.js b/samples/generated/v2/bigtable_instance_admin.get_instance.js index 1f9801eec..153ee1a90 100644 --- a/samples/generated/v2/bigtable_instance_admin.get_instance.js +++ b/samples/generated/v2/bigtable_instance_admin.get_instance.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js b/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js index 4a3fd8dda..34139bc14 100644 --- a/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js +++ b/samples/generated/v2/bigtable_instance_admin.list_app_profiles.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -57,7 +63,7 @@ function main(parent) { // Run request const iterable = await adminClient.listAppProfilesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/samples/generated/v2/bigtable_instance_admin.list_clusters.js b/samples/generated/v2/bigtable_instance_admin.list_clusters.js index b73e9a8a8..2fd8ff90f 100644 --- a/samples/generated/v2/bigtable_instance_admin.list_clusters.js +++ b/samples/generated/v2/bigtable_instance_admin.list_clusters.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.list_instances.js b/samples/generated/v2/bigtable_instance_admin.list_instances.js index 0d968cf16..69af4530a 100644 --- a/samples/generated/v2/bigtable_instance_admin.list_instances.js +++ b/samples/generated/v2/bigtable_instance_admin.list_instances.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js b/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js index 1feb933ab..fe17f5f5c 100644 --- a/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js +++ b/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js b/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js index 9fd50f0a8..bf58de3f3 100644 --- a/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js +++ b/samples/generated/v2/bigtable_instance_admin.partial_update_instance.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js b/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js index fbe0bdc26..9c58200bf 100644 --- a/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js +++ b/samples/generated/v2/bigtable_instance_admin.set_iam_policy.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js b/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js index 91d090a38..2639051ac 100644 --- a/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js +++ b/samples/generated/v2/bigtable_instance_admin.test_iam_permissions.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.update_app_profile.js b/samples/generated/v2/bigtable_instance_admin.update_app_profile.js index 9d802700a..3f597b3da 100644 --- a/samples/generated/v2/bigtable_instance_admin.update_app_profile.js +++ b/samples/generated/v2/bigtable_instance_admin.update_app_profile.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.update_cluster.js b/samples/generated/v2/bigtable_instance_admin.update_cluster.js index 78366e6c1..9a8ced3c2 100644 --- a/samples/generated/v2/bigtable_instance_admin.update_cluster.js +++ b/samples/generated/v2/bigtable_instance_admin.update_cluster.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_instance_admin.update_instance.js b/samples/generated/v2/bigtable_instance_admin.update_instance.js index d3ae1aff1..83cc071a9 100644 --- a/samples/generated/v2/bigtable_instance_admin.update_instance.js +++ b/samples/generated/v2/bigtable_instance_admin.update_instance.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.check_consistency.js b/samples/generated/v2/bigtable_table_admin.check_consistency.js index e8aeb158f..1de65f0dd 100644 --- a/samples/generated/v2/bigtable_table_admin.check_consistency.js +++ b/samples/generated/v2/bigtable_table_admin.check_consistency.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.create_backup.js b/samples/generated/v2/bigtable_table_admin.create_backup.js index 993e37fcc..eef56574f 100644 --- a/samples/generated/v2/bigtable_table_admin.create_backup.js +++ b/samples/generated/v2/bigtable_table_admin.create_backup.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.create_table.js b/samples/generated/v2/bigtable_table_admin.create_table.js index 5d195272a..38c853cc7 100644 --- a/samples/generated/v2/bigtable_table_admin.create_table.js +++ b/samples/generated/v2/bigtable_table_admin.create_table.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js b/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js index 91d9a8fb2..f64723b92 100644 --- a/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js +++ b/samples/generated/v2/bigtable_table_admin.create_table_from_snapshot.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.delete_backup.js b/samples/generated/v2/bigtable_table_admin.delete_backup.js index 37ec5d974..6ff49c189 100644 --- a/samples/generated/v2/bigtable_table_admin.delete_backup.js +++ b/samples/generated/v2/bigtable_table_admin.delete_backup.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.delete_snapshot.js b/samples/generated/v2/bigtable_table_admin.delete_snapshot.js index 560fc27ca..22a602e60 100644 --- a/samples/generated/v2/bigtable_table_admin.delete_snapshot.js +++ b/samples/generated/v2/bigtable_table_admin.delete_snapshot.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.delete_table.js b/samples/generated/v2/bigtable_table_admin.delete_table.js index 3db57773e..b5bd9bcc2 100644 --- a/samples/generated/v2/bigtable_table_admin.delete_table.js +++ b/samples/generated/v2/bigtable_table_admin.delete_table.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.drop_row_range.js b/samples/generated/v2/bigtable_table_admin.drop_row_range.js index 4423c716d..2c7593bb1 100644 --- a/samples/generated/v2/bigtable_table_admin.drop_row_range.js +++ b/samples/generated/v2/bigtable_table_admin.drop_row_range.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js b/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js index 5fae03a07..a85007500 100644 --- a/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js +++ b/samples/generated/v2/bigtable_table_admin.generate_consistency_token.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.get_backup.js b/samples/generated/v2/bigtable_table_admin.get_backup.js index 5ecb2d00e..415d8bbfa 100644 --- a/samples/generated/v2/bigtable_table_admin.get_backup.js +++ b/samples/generated/v2/bigtable_table_admin.get_backup.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.get_iam_policy.js b/samples/generated/v2/bigtable_table_admin.get_iam_policy.js index 013268924..568cd6ccc 100644 --- a/samples/generated/v2/bigtable_table_admin.get_iam_policy.js +++ b/samples/generated/v2/bigtable_table_admin.get_iam_policy.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.get_snapshot.js b/samples/generated/v2/bigtable_table_admin.get_snapshot.js index ccf0673b5..75eed032e 100644 --- a/samples/generated/v2/bigtable_table_admin.get_snapshot.js +++ b/samples/generated/v2/bigtable_table_admin.get_snapshot.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.get_table.js b/samples/generated/v2/bigtable_table_admin.get_table.js index a9dbb03c4..8a193836f 100644 --- a/samples/generated/v2/bigtable_table_admin.get_table.js +++ b/samples/generated/v2/bigtable_table_admin.get_table.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.list_backups.js b/samples/generated/v2/bigtable_table_admin.list_backups.js index a47e78223..5645d9771 100644 --- a/samples/generated/v2/bigtable_table_admin.list_backups.js +++ b/samples/generated/v2/bigtable_table_admin.list_backups.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -105,7 +111,7 @@ function main(parent) { // Run request const iterable = await adminClient.listBackupsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/samples/generated/v2/bigtable_table_admin.list_snapshots.js b/samples/generated/v2/bigtable_table_admin.list_snapshots.js index 721340456..e7dd971e8 100644 --- a/samples/generated/v2/bigtable_table_admin.list_snapshots.js +++ b/samples/generated/v2/bigtable_table_admin.list_snapshots.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -52,7 +58,7 @@ function main(parent) { // Run request const iterable = await adminClient.listSnapshotsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/samples/generated/v2/bigtable_table_admin.list_tables.js b/samples/generated/v2/bigtable_table_admin.list_tables.js index 84c82f920..50cb12c84 100644 --- a/samples/generated/v2/bigtable_table_admin.list_tables.js +++ b/samples/generated/v2/bigtable_table_admin.list_tables.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; @@ -59,7 +65,7 @@ function main(parent) { // Run request const iterable = await adminClient.listTablesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/samples/generated/v2/bigtable_table_admin.modify_column_families.js b/samples/generated/v2/bigtable_table_admin.modify_column_families.js index 1d6ccd467..55f0b9edb 100644 --- a/samples/generated/v2/bigtable_table_admin.modify_column_families.js +++ b/samples/generated/v2/bigtable_table_admin.modify_column_families.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.restore_table.js b/samples/generated/v2/bigtable_table_admin.restore_table.js index d97bb6829..c2263f3d3 100644 --- a/samples/generated/v2/bigtable_table_admin.restore_table.js +++ b/samples/generated/v2/bigtable_table_admin.restore_table.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.set_iam_policy.js b/samples/generated/v2/bigtable_table_admin.set_iam_policy.js index 9ad6cef38..c95cda298 100644 --- a/samples/generated/v2/bigtable_table_admin.set_iam_policy.js +++ b/samples/generated/v2/bigtable_table_admin.set_iam_policy.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.snapshot_table.js b/samples/generated/v2/bigtable_table_admin.snapshot_table.js index 12bbfdc7c..39e4efb21 100644 --- a/samples/generated/v2/bigtable_table_admin.snapshot_table.js +++ b/samples/generated/v2/bigtable_table_admin.snapshot_table.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js b/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js index 5bada2fed..cdfbac097 100644 --- a/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js +++ b/samples/generated/v2/bigtable_table_admin.test_iam_permissions.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/bigtable_table_admin.update_backup.js b/samples/generated/v2/bigtable_table_admin.update_backup.js index 26f4d5dcc..89a7b332c 100644 --- a/samples/generated/v2/bigtable_table_admin.update_backup.js +++ b/samples/generated/v2/bigtable_table_admin.update_backup.js @@ -1,16 +1,22 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + 'use strict'; diff --git a/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json b/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json new file mode 100644 index 000000000..657432f09 --- /dev/null +++ b/samples/generated/v2/snippet_metadata.google.bigtable.admin.v2.json @@ -0,0 +1,1943 @@ +{ + "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": 74, + "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": 51, + "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": 55, + "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": 87, + "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" + } + ], + "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": 57, + "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": 51, + "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": 66, + "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": 51, + "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": 57, + "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": 85, + "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": 57, + "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": 51, + "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": 69, + "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": 51, + "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": 70, + "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": 61, + "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": 56, + "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": 56, + "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": 59, + "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" + } + ], + "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": 59, + "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_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": 80, + "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": 66, + "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": 72, + "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": 57, + "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_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": 52, + "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_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": 60, + "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": 61, + "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": 52, + "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": 57, + "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": 79, + "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": 52, + "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": 65, + "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": 52, + "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": 68, + "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": 52, + "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": 62, + "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": 52, + "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": 118, + "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": 66, + "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": 56, + "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": 59, + "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" + } + ], + "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": 59, + "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 index dedcd3fb3..03d917cb9 100644 --- a/samples/generated/v2/snippet_metadata.google.bigtable.v2.json +++ b/samples/generated/v2/snippet_metadata.google.bigtable.v2.json @@ -16,13 +16,13 @@ "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": true, + "canonical": false, "file": "bigtable.read_rows.js", "language": "JAVASCRIPT", "segments": [ { - "start": 20, - "end": 69, + "start": 29, + "end": 78, "type": "FULL" } ], @@ -72,13 +72,13 @@ "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": true, + "canonical": false, "file": "bigtable.sample_row_keys.js", "language": "JAVASCRIPT", "segments": [ { - "start": 20, - "end": 54, + "start": 29, + "end": 63, "type": "FULL" } ], @@ -116,13 +116,13 @@ "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": true, + "canonical": false, "file": "bigtable.mutate_row.js", "language": "JAVASCRIPT", "segments": [ { - "start": 20, - "end": 64, + "start": 29, + "end": 73, "type": "FULL" } ], @@ -168,13 +168,13 @@ "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": true, + "canonical": false, "file": "bigtable.mutate_rows.js", "language": "JAVASCRIPT", "segments": [ { - "start": 20, - "end": 61, + "start": 29, + "end": 70, "type": "FULL" } ], @@ -216,13 +216,13 @@ "title": "bigtable checkAndMutateRow Sample", "origin": "API_DEFINITION", "description": " Mutates a row atomically based on the output of a predicate Reader filter.", - "canonical": true, + "canonical": false, "file": "bigtable.check_and_mutate_row.js", "language": "JAVASCRIPT", "segments": [ { - "start": 20, - "end": 81, + "start": 29, + "end": 90, "type": "FULL" } ], @@ -271,18 +271,62 @@ } } }, + { + "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": 60, + "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": true, + "canonical": false, "file": "bigtable.read_modify_write_row.js", "language": "JAVASCRIPT", "segments": [ { - "start": 20, - "end": 65, + "start": 29, + "end": 74, "type": "FULL" } ], diff --git a/src/table.ts b/src/table.ts index 711f69dbd..e558c3cbf 100644 --- a/src/table.ts +++ b/src/table.ts @@ -787,7 +787,7 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); if (activeRequestStream) { activeRequestStream.abort(); } - end(); + return end(); }; let chunkTransformer: ChunkTransformer; diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index be3b1ee5e..db28c40b5 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -162,6 +162,9 @@ export class BigtableClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/instances/{instance}' + ), tablePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/instances/{instance}/tables/{table}' ), @@ -236,6 +239,7 @@ export class BigtableClient { 'mutateRow', 'mutateRows', 'checkAndMutateRow', + 'pingAndWarm', 'readModifyWriteRow', ]; for (const methodName of bigtableStubMethods) { @@ -362,8 +366,6 @@ export class BigtableClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * 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, @@ -491,8 +493,6 @@ export class BigtableClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * 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, @@ -583,6 +583,111 @@ export class BigtableClient { this.initialize(); return this.innerApiCalls.checkAndMutateRow(request, options, callback); } + /** + * Warm up associated instance metadata for this connection. + * This call is not required but may be useful for connection keep-alive. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique name of the instance to check permissions for as well as + * respond. Values are of the form `projects//instances/`. + * @param {string} request.appProfileId + * This value specifies routing for replication. If not specified, the + * "default" application profile will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [PingAndWarmResponse]{@link google.bigtable.v2.PingAndWarmResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + */ + pingAndWarm( + request?: protos.google.bigtable.v2.IPingAndWarmRequest, + options?: CallOptions + ): Promise< + [ + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | undefined, + {} | undefined + ] + >; + pingAndWarm( + request: protos.google.bigtable.v2.IPingAndWarmRequest, + options: CallOptions, + callback: Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + > + ): void; + pingAndWarm( + request: protos.google.bigtable.v2.IPingAndWarmRequest, + callback: Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + > + ): void; + pingAndWarm( + request?: protos.google.bigtable.v2.IPingAndWarmRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.bigtable.v2.IPingAndWarmResponse, + protos.google.bigtable.v2.IPingAndWarmRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const routingParameter = {}; + if ( + typeof request.name !== 'undefined' && + RegExp('(?projects)/[^/]+/instances/[^/]+').test(request.name!) + ) { + Object.assign(routingParameter, { + name: request.name!.match( + RegExp('(?projects/[^/]+/instances/[^/]+)') + )![0], + }); + } + + if ( + typeof request.appProfileId !== 'undefined' && + RegExp('[^/]+').test(request.appProfileId!) + ) { + Object.assign(routingParameter, { + app_profile_id: request.appProfileId!.match(RegExp('[^/]+'))![0], + }); + } + + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams(routingParameter); + this.initialize(); + return this.innerApiCalls.pingAndWarm(request, options, callback); + } /** * Modifies a row atomically on the server. The method reads the latest * existing timestamp and value from the specified columns and writes a new @@ -613,8 +718,6 @@ export class BigtableClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * 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, @@ -738,8 +841,6 @@ export class BigtableClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) * 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, @@ -800,8 +901,6 @@ export class BigtableClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) * 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, @@ -865,8 +964,6 @@ export class BigtableClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming) * 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, @@ -909,6 +1006,42 @@ export class BigtableClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project: string, instance: string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + /** * Return a fully-qualified table resource name string. * @@ -965,9 +1098,8 @@ export class BigtableClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.bigtableStub!.then(stub => { + if (this.bigtableStub && !this._terminated) { + return this.bigtableStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/src/v2/bigtable_client_config.json b/src/v2/bigtable_client_config.json index 2c2765aa6..9a86aabbc 100644 --- a/src/v2/bigtable_client_config.json +++ b/src/v2/bigtable_client_config.json @@ -32,12 +32,12 @@ "ReadRows": { "timeout_millis": 43200000, "retry_codes_name": "non_idempotent", - "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + "retry_params_name": "default" }, "SampleRowKeys": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", - "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + "retry_params_name": "default" }, "MutateRow": { "timeout_millis": 60000, @@ -47,17 +47,21 @@ "MutateRows": { "timeout_millis": 600000, "retry_codes_name": "non_idempotent", - "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + "retry_params_name": "default" }, "CheckAndMutateRow": { "timeout_millis": 20000, "retry_codes_name": "non_idempotent", - "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + "retry_params_name": "default" + }, + "PingAndWarm": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" }, "ReadModifyWriteRow": { "timeout_millis": 20000, "retry_codes_name": "non_idempotent", - "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" + "retry_params_name": "default" } } } diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index c2ec98235..6c2517af7 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -3114,9 +3114,8 @@ export class BigtableInstanceAdminClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.bigtableInstanceAdminStub!.then(stub => { + if (this.bigtableInstanceAdminStub && !this._terminated) { + return this.bigtableInstanceAdminStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index 440cc1a6b..8caf897dd 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -3593,9 +3593,8 @@ export class BigtableTableAdminClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.bigtableTableAdminStub!.then(stub => { + if (this.bigtableTableAdminStub && !this._terminated) { + return this.bigtableTableAdminStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/src/v2/gapic_metadata.json b/src/v2/gapic_metadata.json index 6e578d2c9..f53c67d90 100644 --- a/src/v2/gapic_metadata.json +++ b/src/v2/gapic_metadata.json @@ -2,62 +2,467 @@ "schema": "1.0", "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", "language": "typescript", - "protoPackage": "google.bigtable.v2", + "protoPackage": "google.bigtable.admin.v2", "libraryPackage": "@google-cloud/bigtable", "services": { - "Bigtable": { + "BigtableInstanceAdmin": { "clients": { "grpc": { - "libraryClient": "BigtableClient", + "libraryClient": "BigtableInstanceAdminClient", "rpcs": { - "MutateRow": { + "GetInstance": { "methods": [ - "mutateRow" + "getInstance" ] }, - "CheckAndMutateRow": { + "ListInstances": { "methods": [ - "checkAndMutateRow" + "listInstances" ] }, - "ReadModifyWriteRow": { + "UpdateInstance": { "methods": [ - "readModifyWriteRow" + "updateInstance" ] }, - "ReadRows": { + "DeleteInstance": { "methods": [ - "readRows" + "deleteInstance" ] }, - "SampleRowKeys": { + "GetCluster": { "methods": [ - "sampleRowKeys" + "getCluster" ] }, - "MutateRows": { + "ListClusters": { "methods": [ - "mutateRows" + "listClusters" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" ] } } }, "grpc-fallback": { - "libraryClient": "BigtableClient", + "libraryClient": "BigtableInstanceAdminClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + } + } + } + } + }, + "BigtableTableAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableTableAdminClient", "rpcs": { - "MutateRow": { + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BigtableTableAdminClient", + "rpcs": { + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "ListTables": { "methods": [ - "mutateRow" + "listTables", + "listTablesStream", + "listTablesAsync" ] }, - "CheckAndMutateRow": { + "ListSnapshots": { "methods": [ - "checkAndMutateRow" + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" ] }, - "ReadModifyWriteRow": { + "ListBackups": { "methods": [ - "readModifyWriteRow" + "listBackups", + "listBackupsStream", + "listBackupsAsync" ] } } diff --git a/system-test/mutate-rows.ts b/system-test/mutate-rows.ts index 8bb7540c3..f7e15ec8e 100644 --- a/system-test/mutate-rows.ts +++ b/system-test/mutate-rows.ts @@ -117,7 +117,7 @@ describe('Bigtable/Table', () => { }); afterEach(() => { - clock.uninstall(); + clock.restore(); }); tests.forEach(test => { diff --git a/system-test/read-rows.ts b/system-test/read-rows.ts index 224527e92..218ecf910 100644 --- a/system-test/read-rows.ts +++ b/system-test/read-rows.ts @@ -146,7 +146,7 @@ describe('Bigtable/Table', () => { }); afterEach(() => { - clock.uninstall(); + clock.restore(); stub.restore(); }); diff --git a/test/gapic_bigtable_instance_admin_v2.ts b/test/gapic_bigtable_instance_admin_v2.ts index c48f8d358..c9ec8cb63 100644 --- a/test/gapic_bigtable_instance_admin_v2.ts +++ b/test/gapic_bigtable_instance_admin_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -189,13 +189,29 @@ describe('v2.BigtableInstanceAdminClient', () => { assert(client.bigtableInstanceAdminStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.bigtableInstanceAdminStub); + client.close().then(() => { + done(); + }); + }); + + 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', + }); + assert.strictEqual(client.bigtableInstanceAdminStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -346,6 +362,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getInstance with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getInstance(request), expectedError); + }); }); describe('listInstances', () => { @@ -460,6 +493,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes listInstances with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListInstancesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listInstances(request), expectedError); + }); }); describe('updateInstance', () => { @@ -574,6 +624,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateInstance with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.Instance() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateInstance(request), expectedError); + }); }); describe('deleteInstance', () => { @@ -688,6 +755,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteInstance with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteInstanceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteInstance(request), expectedError); + }); }); describe('getCluster', () => { @@ -802,6 +886,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCluster with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetClusterRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCluster(request), expectedError); + }); }); describe('listClusters', () => { @@ -916,6 +1017,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes listClusters with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ListClustersRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listClusters(request), expectedError); + }); }); describe('deleteCluster', () => { @@ -1030,6 +1148,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteCluster with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteClusterRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteCluster(request), expectedError); + }); }); describe('createAppProfile', () => { @@ -1144,6 +1279,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createAppProfile with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateAppProfileRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createAppProfile(request), expectedError); + }); }); describe('getAppProfile', () => { @@ -1258,6 +1410,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getAppProfile with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetAppProfileRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAppProfile(request), expectedError); + }); }); describe('deleteAppProfile', () => { @@ -1372,6 +1541,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteAppProfile with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteAppProfileRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAppProfile(request), expectedError); + }); }); describe('getIamPolicy', () => { @@ -1486,6 +1672,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getIamPolicy with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); }); describe('setIamPolicy', () => { @@ -1600,6 +1803,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes setIamPolicy with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); }); describe('testIamPermissions', () => { @@ -1715,6 +1935,23 @@ describe('v2.BigtableInstanceAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes testIamPermissions with closed client', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); }); describe('createInstance', () => { diff --git a/test/gapic_bigtable_table_admin_v2.ts b/test/gapic_bigtable_table_admin_v2.ts index f5748578a..a0265b9d2 100644 --- a/test/gapic_bigtable_table_admin_v2.ts +++ b/test/gapic_bigtable_table_admin_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -185,12 +185,27 @@ describe('v2.BigtableTableAdminClient', () => { assert(client.bigtableTableAdminStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.bigtableTableAdminStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableTableAdminStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -336,6 +351,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createTable with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CreateTableRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createTable(request), expectedError); + }); }); describe('getTable', () => { @@ -444,6 +475,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getTable with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetTableRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTable(request), expectedError); + }); }); describe('deleteTable', () => { @@ -555,6 +602,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteTable with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteTableRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteTable(request), expectedError); + }); }); describe('modifyColumnFamilies', () => { @@ -667,6 +730,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes modifyColumnFamilies with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.ModifyColumnFamiliesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.modifyColumnFamilies(request), expectedError); + }); }); describe('dropRowRange', () => { @@ -778,6 +857,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes dropRowRange with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DropRowRangeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.dropRowRange(request), expectedError); + }); }); describe('generateConsistencyToken', () => { @@ -893,6 +988,25 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes generateConsistencyToken with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GenerateConsistencyTokenRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.generateConsistencyToken(request), + expectedError + ); + }); }); describe('checkConsistency', () => { @@ -1004,6 +1118,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes checkConsistency with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.CheckConsistencyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.checkConsistency(request), expectedError); + }); }); describe('getSnapshot', () => { @@ -1115,6 +1245,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getSnapshot with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetSnapshotRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSnapshot(request), expectedError); + }); }); describe('deleteSnapshot', () => { @@ -1226,6 +1372,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteSnapshot with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteSnapshotRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteSnapshot(request), expectedError); + }); }); describe('getBackup', () => { @@ -1334,6 +1496,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getBackup with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.GetBackupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackup(request), expectedError); + }); }); describe('updateBackup', () => { @@ -1448,6 +1626,23 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateBackup with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.UpdateBackupRequest() + ); + request.backup = {}; + request.backup.name = ''; + const expectedHeaderRequestParams = 'backup.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateBackup(request), expectedError); + }); }); describe('deleteBackup', () => { @@ -1559,6 +1754,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteBackup with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.DeleteBackupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteBackup(request), expectedError); + }); }); describe('getIamPolicy', () => { @@ -1670,6 +1881,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); }); describe('setIamPolicy', () => { @@ -1781,6 +2008,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); }); describe('testIamPermissions', () => { @@ -1893,6 +2136,22 @@ describe('v2.BigtableTableAdminClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new bigtabletableadminModule.v2.BigtableTableAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); }); describe('createTableFromSnapshot', () => { diff --git a/test/gapic_bigtable_v2.ts b/test/gapic_bigtable_v2.ts index 03b0e1522..a5bb9cdfa 100644 --- a/test/gapic_bigtable_v2.ts +++ b/test/gapic_bigtable_v2.ts @@ -111,12 +111,27 @@ describe('v2.BigtableClient', () => { assert(client.bigtableStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new bigtableModule.v2.BigtableClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.bigtableStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.bigtableStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -256,6 +271,21 @@ describe('v2.BigtableClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes mutateRow with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.MutateRowRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.mutateRow(request), expectedError); + }); }); describe('checkAndMutateRow', () => { @@ -364,6 +394,144 @@ describe('v2.BigtableClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes checkAndMutateRow with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.CheckAndMutateRowRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.checkAndMutateRow(request), expectedError); + }); + }); + + describe('pingAndWarm', () => { + it('invokes pingAndWarm without error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmResponse() + ); + client.innerApiCalls.pingAndWarm = stubSimpleCall(expectedResponse); + const [response] = await client.pingAndWarm(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pingAndWarm as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pingAndWarm without error using callback', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmResponse() + ); + client.innerApiCalls.pingAndWarm = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pingAndWarm( + request, + ( + err?: Error | null, + result?: protos.google.bigtable.v2.IPingAndWarmResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.pingAndWarm as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes pingAndWarm with error', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.pingAndWarm = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.pingAndWarm(request), expectedError); + assert( + (client.innerApiCalls.pingAndWarm as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes pingAndWarm with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.PingAndWarmRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pingAndWarm(request), expectedError); + }); }); describe('readModifyWriteRow', () => { @@ -473,6 +641,21 @@ describe('v2.BigtableClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes readModifyWriteRow with closed client', async () => { + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.v2.ReadModifyWriteRowRequest() + ); + const expectedHeaderRequestParams = ''; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.readModifyWriteRow(request), expectedError); + }); }); describe('readRows', () => { @@ -814,6 +997,55 @@ describe('v2.BigtableClient', () => { }); describe('Path templates', () => { + describe('instance', () => { + const fakePath = '/rendered/path/instance'; + const expectedParameters = { + project: 'projectValue', + instance: 'instanceValue', + }; + const client = new bigtableModule.v2.BigtableClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.instancePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.instancePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath('projectValue', 'instanceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, 'instanceValue'); + assert( + (client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('table', () => { const fakePath = '/rendered/path/table'; const expectedParameters = {