diff --git a/protos/google/bigtable/admin/v2/instance.proto b/protos/google/bigtable/admin/v2/instance.proto index aecf7ee53..ed811ef27 100644 --- a/protos/google/bigtable/admin/v2/instance.proto +++ b/protos/google/bigtable/admin/v2/instance.proto @@ -19,6 +19,8 @@ package google.bigtable.admin.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/bigtable/admin/v2/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; @@ -105,6 +107,11 @@ message Instance { // * No more than 64 labels can be associated with a given resource. // * Keys and values must both be under 128 bytes. map labels = 5; + + // Output only. A server-assigned timestamp representing when this Instance was created. + // For instances created before this field was added (August 2021), this value + // is `seconds: 0, nanos: 1`. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A resizable group of nodes in a particular cloud location, capable diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 5451a5a3d..aef4d9122 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -2620,6 +2620,9 @@ export namespace google { /** Instance labels */ labels?: ({ [k: string]: string }|null); + + /** Instance createTime */ + createTime?: (google.protobuf.ITimestamp|null); } /** Represents an Instance. */ @@ -2646,6 +2649,9 @@ export namespace google { /** Instance labels. */ public labels: { [k: string]: string }; + /** Instance createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + /** * Creates a new Instance instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 4a5590a65..ec7b0bf2b 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -5754,6 +5754,7 @@ * @property {google.bigtable.admin.v2.Instance.State|null} [state] Instance state * @property {google.bigtable.admin.v2.Instance.Type|null} [type] Instance type * @property {Object.|null} [labels] Instance labels + * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime */ /** @@ -5812,6 +5813,14 @@ */ Instance.prototype.labels = $util.emptyObject; + /** + * Instance createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.createTime = null; + /** * Creates a new Instance instance using the specified properties. * @function create @@ -5847,6 +5856,8 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -5915,6 +5926,9 @@ } message.labels[key] = value; break; + case 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -5982,6 +5996,11 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } return null; }; @@ -6036,6 +6055,11 @@ for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } return message; }; @@ -6059,6 +6083,7 @@ object.displayName = ""; object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -6074,6 +6099,8 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; diff --git a/protos/protos.json b/protos/protos.json index a30ec916c..ff000c002 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -835,6 +835,13 @@ "keyType": "string", "type": "string", "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { diff --git a/samples/generated/v2/bigtable_instance_admin.update_instance.js b/samples/generated/v2/bigtable_instance_admin.update_instance.js index a7d792530..565df41c3 100644 --- a/samples/generated/v2/bigtable_instance_admin.update_instance.js +++ b/samples/generated/v2/bigtable_instance_admin.update_instance.js @@ -14,7 +14,7 @@ 'use strict'; -function main(name, displayName) { +function main(name, displayName, createTime) { // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async] /** * TODO(developer): Uncomment these variables before running the sample. @@ -52,6 +52,12 @@ function main(name, displayName) { * * Keys and values must both be under 128 bytes. */ // const labels = 1234 + /** + * Output only. A server-assigned timestamp representing when this Instance was created. + * For instances created before this field was added (August 2021), this value + * is `seconds: 0, nanos: 1`. + */ + // const createTime = '' // Imports the Admin library const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2; @@ -64,6 +70,7 @@ function main(name, displayName) { const request = { name, displayName, + createTime, }; // Run request diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index a57583250..1f3770c56 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -670,6 +670,10 @@ export class BigtableInstanceAdminClient { * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. + * @param {google.protobuf.Timestamp} request.createTime + * Output only. A server-assigned timestamp representing when this Instance was created. + * For instances created before this field was added (August 2021), this value + * is `seconds: 0, nanos: 1`. * @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.