@google-cloud/spanner 5.16.3 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +28 -12
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +177 -9
  4. package/build/protos/google/spanner/admin/database/v1/common.proto +14 -2
  5. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +40 -5
  6. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +8 -5
  7. package/build/protos/google/spanner/v1/commit_response.proto +2 -4
  8. package/build/protos/google/spanner/v1/keys.proto +0 -1
  9. package/build/protos/google/spanner/v1/mutation.proto +5 -5
  10. package/build/protos/google/spanner/v1/query_plan.proto +18 -19
  11. package/build/protos/google/spanner/v1/result_set.proto +1 -1
  12. package/build/protos/google/spanner/v1/spanner.proto +21 -19
  13. package/build/protos/google/spanner/v1/transaction.proto +19 -32
  14. package/build/protos/google/spanner/v1/type.proto +33 -7
  15. package/build/protos/protos.d.ts +684 -64
  16. package/build/protos/protos.js +1760 -84
  17. package/build/protos/protos.json +273 -21
  18. package/build/src/backup.d.ts +27 -5
  19. package/build/src/backup.js +62 -31
  20. package/build/src/batch-transaction.js +1 -1
  21. package/build/src/codec.d.ts +11 -0
  22. package/build/src/codec.js +39 -2
  23. package/build/src/common-grpc/service-object.js +1 -1
  24. package/build/src/common-grpc/service.js +2 -2
  25. package/build/src/database.d.ts +26 -6
  26. package/build/src/database.js +8 -8
  27. package/build/src/index.d.ts +18 -3
  28. package/build/src/index.js +26 -7
  29. package/build/src/instance.d.ts +42 -2
  30. package/build/src/instance.js +56 -2
  31. package/build/src/session-pool.d.ts +1 -0
  32. package/build/src/session-pool.js +46 -46
  33. package/build/src/session.js +1 -1
  34. package/build/src/table.d.ts +5 -1
  35. package/build/src/table.js +1 -1
  36. package/build/src/transaction-runner.js +3 -3
  37. package/build/src/transaction.d.ts +10 -2
  38. package/build/src/transaction.js +12 -12
  39. package/build/src/v1/database_admin_client.d.ts +271 -28
  40. package/build/src/v1/database_admin_client.js +113 -11
  41. package/build/src/v1/database_admin_client_config.json +5 -0
  42. package/build/src/v1/index.js +1 -0
  43. package/build/src/v1/instance_admin_client.d.ts +57 -11
  44. package/build/src/v1/instance_admin_client.js +2 -3
  45. package/build/src/v1/spanner_client.d.ts +66 -44
  46. package/build/src/v1/spanner_client.js +13 -11
  47. package/package.json +11 -11
@@ -5489,6 +5489,7 @@
5489
5489
  * @property {boolean|null} [packed] FieldOptions packed
5490
5490
  * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
5491
5491
  * @property {boolean|null} [lazy] FieldOptions lazy
5492
+ * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy
5492
5493
  * @property {boolean|null} [deprecated] FieldOptions deprecated
5493
5494
  * @property {boolean|null} [weak] FieldOptions weak
5494
5495
  * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FieldOptions uninterpretedOption
@@ -5545,6 +5546,14 @@
5545
5546
  */
5546
5547
  FieldOptions.prototype.lazy = false;
5547
5548
 
5549
+ /**
5550
+ * FieldOptions unverifiedLazy.
5551
+ * @member {boolean} unverifiedLazy
5552
+ * @memberof google.protobuf.FieldOptions
5553
+ * @instance
5554
+ */
5555
+ FieldOptions.prototype.unverifiedLazy = false;
5556
+
5548
5557
  /**
5549
5558
  * FieldOptions deprecated.
5550
5559
  * @member {boolean} deprecated
@@ -5621,6 +5630,8 @@
5621
5630
  writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
5622
5631
  if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
5623
5632
  writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
5633
+ if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy"))
5634
+ writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy);
5624
5635
  if (message.uninterpretedOption != null && message.uninterpretedOption.length)
5625
5636
  for (var i = 0; i < message.uninterpretedOption.length; ++i)
5626
5637
  $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
@@ -5678,6 +5689,9 @@
5678
5689
  case 5:
5679
5690
  message.lazy = reader.bool();
5680
5691
  break;
5692
+ case 15:
5693
+ message.unverifiedLazy = reader.bool();
5694
+ break;
5681
5695
  case 3:
5682
5696
  message.deprecated = reader.bool();
5683
5697
  break;
@@ -5761,6 +5775,9 @@
5761
5775
  if (message.lazy != null && message.hasOwnProperty("lazy"))
5762
5776
  if (typeof message.lazy !== "boolean")
5763
5777
  return "lazy: boolean expected";
5778
+ if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
5779
+ if (typeof message.unverifiedLazy !== "boolean")
5780
+ return "unverifiedLazy: boolean expected";
5764
5781
  if (message.deprecated != null && message.hasOwnProperty("deprecated"))
5765
5782
  if (typeof message.deprecated !== "boolean")
5766
5783
  return "deprecated: boolean expected";
@@ -5846,6 +5863,8 @@
5846
5863
  }
5847
5864
  if (object.lazy != null)
5848
5865
  message.lazy = Boolean(object.lazy);
5866
+ if (object.unverifiedLazy != null)
5867
+ message.unverifiedLazy = Boolean(object.unverifiedLazy);
5849
5868
  if (object.deprecated != null)
5850
5869
  message.deprecated = Boolean(object.deprecated);
5851
5870
  if (object.weak != null)
@@ -5933,6 +5952,7 @@
5933
5952
  object.lazy = false;
5934
5953
  object.jstype = options.enums === String ? "JS_NORMAL" : 0;
5935
5954
  object.weak = false;
5955
+ object.unverifiedLazy = false;
5936
5956
  object[".google.api.resourceReference"] = null;
5937
5957
  }
5938
5958
  if (message.ctype != null && message.hasOwnProperty("ctype"))
@@ -5947,6 +5967,8 @@
5947
5967
  object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
5948
5968
  if (message.weak != null && message.hasOwnProperty("weak"))
5949
5969
  object.weak = message.weak;
5970
+ if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
5971
+ object.unverifiedLazy = message.unverifiedLazy;
5950
5972
  if (message.uninterpretedOption && message.uninterpretedOption.length) {
5951
5973
  object.uninterpretedOption = [];
5952
5974
  for (var j = 0; j < message.uninterpretedOption.length; ++j)
@@ -13978,6 +14000,9 @@
13978
14000
  * @property {google.spanner.admin.database.v1.Backup.State|null} [state] Backup state
13979
14001
  * @property {Array.<string>|null} [referencingDatabases] Backup referencingDatabases
13980
14002
  * @property {google.spanner.admin.database.v1.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo
14003
+ * @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] Backup databaseDialect
14004
+ * @property {Array.<string>|null} [referencingBackups] Backup referencingBackups
14005
+ * @property {google.protobuf.ITimestamp|null} [maxExpireTime] Backup maxExpireTime
13981
14006
  */
13982
14007
 
13983
14008
  /**
@@ -13990,6 +14015,7 @@
13990
14015
  */
13991
14016
  function Backup(properties) {
13992
14017
  this.referencingDatabases = [];
14018
+ this.referencingBackups = [];
13993
14019
  if (properties)
13994
14020
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13995
14021
  if (properties[keys[i]] != null)
@@ -14068,6 +14094,30 @@
14068
14094
  */
14069
14095
  Backup.prototype.encryptionInfo = null;
14070
14096
 
14097
+ /**
14098
+ * Backup databaseDialect.
14099
+ * @member {google.spanner.admin.database.v1.DatabaseDialect} databaseDialect
14100
+ * @memberof google.spanner.admin.database.v1.Backup
14101
+ * @instance
14102
+ */
14103
+ Backup.prototype.databaseDialect = 0;
14104
+
14105
+ /**
14106
+ * Backup referencingBackups.
14107
+ * @member {Array.<string>} referencingBackups
14108
+ * @memberof google.spanner.admin.database.v1.Backup
14109
+ * @instance
14110
+ */
14111
+ Backup.prototype.referencingBackups = $util.emptyArray;
14112
+
14113
+ /**
14114
+ * Backup maxExpireTime.
14115
+ * @member {google.protobuf.ITimestamp|null|undefined} maxExpireTime
14116
+ * @memberof google.spanner.admin.database.v1.Backup
14117
+ * @instance
14118
+ */
14119
+ Backup.prototype.maxExpireTime = null;
14120
+
14071
14121
  /**
14072
14122
  * Creates a new Backup instance using the specified properties.
14073
14123
  * @function create
@@ -14111,6 +14161,13 @@
14111
14161
  $root.google.spanner.admin.database.v1.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
14112
14162
  if (message.versionTime != null && Object.hasOwnProperty.call(message, "versionTime"))
14113
14163
  $root.google.protobuf.Timestamp.encode(message.versionTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
14164
+ if (message.databaseDialect != null && Object.hasOwnProperty.call(message, "databaseDialect"))
14165
+ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.databaseDialect);
14166
+ if (message.referencingBackups != null && message.referencingBackups.length)
14167
+ for (var i = 0; i < message.referencingBackups.length; ++i)
14168
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.referencingBackups[i]);
14169
+ if (message.maxExpireTime != null && Object.hasOwnProperty.call(message, "maxExpireTime"))
14170
+ $root.google.protobuf.Timestamp.encode(message.maxExpireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
14114
14171
  return writer;
14115
14172
  };
14116
14173
 
@@ -14174,6 +14231,17 @@
14174
14231
  case 8:
14175
14232
  message.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.decode(reader, reader.uint32());
14176
14233
  break;
14234
+ case 10:
14235
+ message.databaseDialect = reader.int32();
14236
+ break;
14237
+ case 11:
14238
+ if (!(message.referencingBackups && message.referencingBackups.length))
14239
+ message.referencingBackups = [];
14240
+ message.referencingBackups.push(reader.string());
14241
+ break;
14242
+ case 12:
14243
+ message.maxExpireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
14244
+ break;
14177
14245
  default:
14178
14246
  reader.skipType(tag & 7);
14179
14247
  break;
@@ -14254,6 +14322,27 @@
14254
14322
  if (error)
14255
14323
  return "encryptionInfo." + error;
14256
14324
  }
14325
+ if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
14326
+ switch (message.databaseDialect) {
14327
+ default:
14328
+ return "databaseDialect: enum value expected";
14329
+ case 0:
14330
+ case 1:
14331
+ case 2:
14332
+ break;
14333
+ }
14334
+ if (message.referencingBackups != null && message.hasOwnProperty("referencingBackups")) {
14335
+ if (!Array.isArray(message.referencingBackups))
14336
+ return "referencingBackups: array expected";
14337
+ for (var i = 0; i < message.referencingBackups.length; ++i)
14338
+ if (!$util.isString(message.referencingBackups[i]))
14339
+ return "referencingBackups: string[] expected";
14340
+ }
14341
+ if (message.maxExpireTime != null && message.hasOwnProperty("maxExpireTime")) {
14342
+ var error = $root.google.protobuf.Timestamp.verify(message.maxExpireTime);
14343
+ if (error)
14344
+ return "maxExpireTime." + error;
14345
+ }
14257
14346
  return null;
14258
14347
  };
14259
14348
 
@@ -14323,6 +14412,32 @@
14323
14412
  throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInfo: object expected");
14324
14413
  message.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.fromObject(object.encryptionInfo);
14325
14414
  }
14415
+ switch (object.databaseDialect) {
14416
+ case "DATABASE_DIALECT_UNSPECIFIED":
14417
+ case 0:
14418
+ message.databaseDialect = 0;
14419
+ break;
14420
+ case "GOOGLE_STANDARD_SQL":
14421
+ case 1:
14422
+ message.databaseDialect = 1;
14423
+ break;
14424
+ case "POSTGRESQL":
14425
+ case 2:
14426
+ message.databaseDialect = 2;
14427
+ break;
14428
+ }
14429
+ if (object.referencingBackups) {
14430
+ if (!Array.isArray(object.referencingBackups))
14431
+ throw TypeError(".google.spanner.admin.database.v1.Backup.referencingBackups: array expected");
14432
+ message.referencingBackups = [];
14433
+ for (var i = 0; i < object.referencingBackups.length; ++i)
14434
+ message.referencingBackups[i] = String(object.referencingBackups[i]);
14435
+ }
14436
+ if (object.maxExpireTime != null) {
14437
+ if (typeof object.maxExpireTime !== "object")
14438
+ throw TypeError(".google.spanner.admin.database.v1.Backup.maxExpireTime: object expected");
14439
+ message.maxExpireTime = $root.google.protobuf.Timestamp.fromObject(object.maxExpireTime);
14440
+ }
14326
14441
  return message;
14327
14442
  };
14328
14443
 
@@ -14339,8 +14454,10 @@
14339
14454
  if (!options)
14340
14455
  options = {};
14341
14456
  var object = {};
14342
- if (options.arrays || options.defaults)
14457
+ if (options.arrays || options.defaults) {
14343
14458
  object.referencingDatabases = [];
14459
+ object.referencingBackups = [];
14460
+ }
14344
14461
  if (options.defaults) {
14345
14462
  object.name = "";
14346
14463
  object.database = "";
@@ -14354,6 +14471,8 @@
14354
14471
  object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
14355
14472
  object.encryptionInfo = null;
14356
14473
  object.versionTime = null;
14474
+ object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0;
14475
+ object.maxExpireTime = null;
14357
14476
  }
14358
14477
  if (message.name != null && message.hasOwnProperty("name"))
14359
14478
  object.name = message.name;
@@ -14379,6 +14498,15 @@
14379
14498
  object.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.toObject(message.encryptionInfo, options);
14380
14499
  if (message.versionTime != null && message.hasOwnProperty("versionTime"))
14381
14500
  object.versionTime = $root.google.protobuf.Timestamp.toObject(message.versionTime, options);
14501
+ if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
14502
+ object.databaseDialect = options.enums === String ? $root.google.spanner.admin.database.v1.DatabaseDialect[message.databaseDialect] : message.databaseDialect;
14503
+ if (message.referencingBackups && message.referencingBackups.length) {
14504
+ object.referencingBackups = [];
14505
+ for (var j = 0; j < message.referencingBackups.length; ++j)
14506
+ object.referencingBackups[j] = message.referencingBackups[j];
14507
+ }
14508
+ if (message.maxExpireTime != null && message.hasOwnProperty("maxExpireTime"))
14509
+ object.maxExpireTime = $root.google.protobuf.Timestamp.toObject(message.maxExpireTime, options);
14382
14510
  return object;
14383
14511
  };
14384
14512
 
@@ -14940,6 +15068,556 @@
14940
15068
  return CreateBackupMetadata;
14941
15069
  })();
14942
15070
 
15071
+ v1.CopyBackupRequest = (function() {
15072
+
15073
+ /**
15074
+ * Properties of a CopyBackupRequest.
15075
+ * @memberof google.spanner.admin.database.v1
15076
+ * @interface ICopyBackupRequest
15077
+ * @property {string|null} [parent] CopyBackupRequest parent
15078
+ * @property {string|null} [backupId] CopyBackupRequest backupId
15079
+ * @property {string|null} [sourceBackup] CopyBackupRequest sourceBackup
15080
+ * @property {google.protobuf.ITimestamp|null} [expireTime] CopyBackupRequest expireTime
15081
+ * @property {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig|null} [encryptionConfig] CopyBackupRequest encryptionConfig
15082
+ */
15083
+
15084
+ /**
15085
+ * Constructs a new CopyBackupRequest.
15086
+ * @memberof google.spanner.admin.database.v1
15087
+ * @classdesc Represents a CopyBackupRequest.
15088
+ * @implements ICopyBackupRequest
15089
+ * @constructor
15090
+ * @param {google.spanner.admin.database.v1.ICopyBackupRequest=} [properties] Properties to set
15091
+ */
15092
+ function CopyBackupRequest(properties) {
15093
+ if (properties)
15094
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
15095
+ if (properties[keys[i]] != null)
15096
+ this[keys[i]] = properties[keys[i]];
15097
+ }
15098
+
15099
+ /**
15100
+ * CopyBackupRequest parent.
15101
+ * @member {string} parent
15102
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15103
+ * @instance
15104
+ */
15105
+ CopyBackupRequest.prototype.parent = "";
15106
+
15107
+ /**
15108
+ * CopyBackupRequest backupId.
15109
+ * @member {string} backupId
15110
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15111
+ * @instance
15112
+ */
15113
+ CopyBackupRequest.prototype.backupId = "";
15114
+
15115
+ /**
15116
+ * CopyBackupRequest sourceBackup.
15117
+ * @member {string} sourceBackup
15118
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15119
+ * @instance
15120
+ */
15121
+ CopyBackupRequest.prototype.sourceBackup = "";
15122
+
15123
+ /**
15124
+ * CopyBackupRequest expireTime.
15125
+ * @member {google.protobuf.ITimestamp|null|undefined} expireTime
15126
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15127
+ * @instance
15128
+ */
15129
+ CopyBackupRequest.prototype.expireTime = null;
15130
+
15131
+ /**
15132
+ * CopyBackupRequest encryptionConfig.
15133
+ * @member {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig|null|undefined} encryptionConfig
15134
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15135
+ * @instance
15136
+ */
15137
+ CopyBackupRequest.prototype.encryptionConfig = null;
15138
+
15139
+ /**
15140
+ * Creates a new CopyBackupRequest instance using the specified properties.
15141
+ * @function create
15142
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15143
+ * @static
15144
+ * @param {google.spanner.admin.database.v1.ICopyBackupRequest=} [properties] Properties to set
15145
+ * @returns {google.spanner.admin.database.v1.CopyBackupRequest} CopyBackupRequest instance
15146
+ */
15147
+ CopyBackupRequest.create = function create(properties) {
15148
+ return new CopyBackupRequest(properties);
15149
+ };
15150
+
15151
+ /**
15152
+ * Encodes the specified CopyBackupRequest message. Does not implicitly {@link google.spanner.admin.database.v1.CopyBackupRequest.verify|verify} messages.
15153
+ * @function encode
15154
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15155
+ * @static
15156
+ * @param {google.spanner.admin.database.v1.ICopyBackupRequest} message CopyBackupRequest message or plain object to encode
15157
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15158
+ * @returns {$protobuf.Writer} Writer
15159
+ */
15160
+ CopyBackupRequest.encode = function encode(message, writer) {
15161
+ if (!writer)
15162
+ writer = $Writer.create();
15163
+ if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
15164
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
15165
+ if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId"))
15166
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId);
15167
+ if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup"))
15168
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceBackup);
15169
+ if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime"))
15170
+ $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
15171
+ if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig"))
15172
+ $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
15173
+ return writer;
15174
+ };
15175
+
15176
+ /**
15177
+ * Encodes the specified CopyBackupRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.CopyBackupRequest.verify|verify} messages.
15178
+ * @function encodeDelimited
15179
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15180
+ * @static
15181
+ * @param {google.spanner.admin.database.v1.ICopyBackupRequest} message CopyBackupRequest message or plain object to encode
15182
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15183
+ * @returns {$protobuf.Writer} Writer
15184
+ */
15185
+ CopyBackupRequest.encodeDelimited = function encodeDelimited(message, writer) {
15186
+ return this.encode(message, writer).ldelim();
15187
+ };
15188
+
15189
+ /**
15190
+ * Decodes a CopyBackupRequest message from the specified reader or buffer.
15191
+ * @function decode
15192
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15193
+ * @static
15194
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15195
+ * @param {number} [length] Message length if known beforehand
15196
+ * @returns {google.spanner.admin.database.v1.CopyBackupRequest} CopyBackupRequest
15197
+ * @throws {Error} If the payload is not a reader or valid buffer
15198
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15199
+ */
15200
+ CopyBackupRequest.decode = function decode(reader, length) {
15201
+ if (!(reader instanceof $Reader))
15202
+ reader = $Reader.create(reader);
15203
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.CopyBackupRequest();
15204
+ while (reader.pos < end) {
15205
+ var tag = reader.uint32();
15206
+ switch (tag >>> 3) {
15207
+ case 1:
15208
+ message.parent = reader.string();
15209
+ break;
15210
+ case 2:
15211
+ message.backupId = reader.string();
15212
+ break;
15213
+ case 3:
15214
+ message.sourceBackup = reader.string();
15215
+ break;
15216
+ case 4:
15217
+ message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
15218
+ break;
15219
+ case 5:
15220
+ message.encryptionConfig = $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.decode(reader, reader.uint32());
15221
+ break;
15222
+ default:
15223
+ reader.skipType(tag & 7);
15224
+ break;
15225
+ }
15226
+ }
15227
+ return message;
15228
+ };
15229
+
15230
+ /**
15231
+ * Decodes a CopyBackupRequest message from the specified reader or buffer, length delimited.
15232
+ * @function decodeDelimited
15233
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15234
+ * @static
15235
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15236
+ * @returns {google.spanner.admin.database.v1.CopyBackupRequest} CopyBackupRequest
15237
+ * @throws {Error} If the payload is not a reader or valid buffer
15238
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15239
+ */
15240
+ CopyBackupRequest.decodeDelimited = function decodeDelimited(reader) {
15241
+ if (!(reader instanceof $Reader))
15242
+ reader = new $Reader(reader);
15243
+ return this.decode(reader, reader.uint32());
15244
+ };
15245
+
15246
+ /**
15247
+ * Verifies a CopyBackupRequest message.
15248
+ * @function verify
15249
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15250
+ * @static
15251
+ * @param {Object.<string,*>} message Plain object to verify
15252
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
15253
+ */
15254
+ CopyBackupRequest.verify = function verify(message) {
15255
+ if (typeof message !== "object" || message === null)
15256
+ return "object expected";
15257
+ if (message.parent != null && message.hasOwnProperty("parent"))
15258
+ if (!$util.isString(message.parent))
15259
+ return "parent: string expected";
15260
+ if (message.backupId != null && message.hasOwnProperty("backupId"))
15261
+ if (!$util.isString(message.backupId))
15262
+ return "backupId: string expected";
15263
+ if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup"))
15264
+ if (!$util.isString(message.sourceBackup))
15265
+ return "sourceBackup: string expected";
15266
+ if (message.expireTime != null && message.hasOwnProperty("expireTime")) {
15267
+ var error = $root.google.protobuf.Timestamp.verify(message.expireTime);
15268
+ if (error)
15269
+ return "expireTime." + error;
15270
+ }
15271
+ if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) {
15272
+ var error = $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.verify(message.encryptionConfig);
15273
+ if (error)
15274
+ return "encryptionConfig." + error;
15275
+ }
15276
+ return null;
15277
+ };
15278
+
15279
+ /**
15280
+ * Creates a CopyBackupRequest message from a plain object. Also converts values to their respective internal types.
15281
+ * @function fromObject
15282
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15283
+ * @static
15284
+ * @param {Object.<string,*>} object Plain object
15285
+ * @returns {google.spanner.admin.database.v1.CopyBackupRequest} CopyBackupRequest
15286
+ */
15287
+ CopyBackupRequest.fromObject = function fromObject(object) {
15288
+ if (object instanceof $root.google.spanner.admin.database.v1.CopyBackupRequest)
15289
+ return object;
15290
+ var message = new $root.google.spanner.admin.database.v1.CopyBackupRequest();
15291
+ if (object.parent != null)
15292
+ message.parent = String(object.parent);
15293
+ if (object.backupId != null)
15294
+ message.backupId = String(object.backupId);
15295
+ if (object.sourceBackup != null)
15296
+ message.sourceBackup = String(object.sourceBackup);
15297
+ if (object.expireTime != null) {
15298
+ if (typeof object.expireTime !== "object")
15299
+ throw TypeError(".google.spanner.admin.database.v1.CopyBackupRequest.expireTime: object expected");
15300
+ message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime);
15301
+ }
15302
+ if (object.encryptionConfig != null) {
15303
+ if (typeof object.encryptionConfig !== "object")
15304
+ throw TypeError(".google.spanner.admin.database.v1.CopyBackupRequest.encryptionConfig: object expected");
15305
+ message.encryptionConfig = $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.fromObject(object.encryptionConfig);
15306
+ }
15307
+ return message;
15308
+ };
15309
+
15310
+ /**
15311
+ * Creates a plain object from a CopyBackupRequest message. Also converts values to other types if specified.
15312
+ * @function toObject
15313
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15314
+ * @static
15315
+ * @param {google.spanner.admin.database.v1.CopyBackupRequest} message CopyBackupRequest
15316
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
15317
+ * @returns {Object.<string,*>} Plain object
15318
+ */
15319
+ CopyBackupRequest.toObject = function toObject(message, options) {
15320
+ if (!options)
15321
+ options = {};
15322
+ var object = {};
15323
+ if (options.defaults) {
15324
+ object.parent = "";
15325
+ object.backupId = "";
15326
+ object.sourceBackup = "";
15327
+ object.expireTime = null;
15328
+ object.encryptionConfig = null;
15329
+ }
15330
+ if (message.parent != null && message.hasOwnProperty("parent"))
15331
+ object.parent = message.parent;
15332
+ if (message.backupId != null && message.hasOwnProperty("backupId"))
15333
+ object.backupId = message.backupId;
15334
+ if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup"))
15335
+ object.sourceBackup = message.sourceBackup;
15336
+ if (message.expireTime != null && message.hasOwnProperty("expireTime"))
15337
+ object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options);
15338
+ if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig"))
15339
+ object.encryptionConfig = $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.toObject(message.encryptionConfig, options);
15340
+ return object;
15341
+ };
15342
+
15343
+ /**
15344
+ * Converts this CopyBackupRequest to JSON.
15345
+ * @function toJSON
15346
+ * @memberof google.spanner.admin.database.v1.CopyBackupRequest
15347
+ * @instance
15348
+ * @returns {Object.<string,*>} JSON object
15349
+ */
15350
+ CopyBackupRequest.prototype.toJSON = function toJSON() {
15351
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
15352
+ };
15353
+
15354
+ return CopyBackupRequest;
15355
+ })();
15356
+
15357
+ v1.CopyBackupMetadata = (function() {
15358
+
15359
+ /**
15360
+ * Properties of a CopyBackupMetadata.
15361
+ * @memberof google.spanner.admin.database.v1
15362
+ * @interface ICopyBackupMetadata
15363
+ * @property {string|null} [name] CopyBackupMetadata name
15364
+ * @property {string|null} [sourceBackup] CopyBackupMetadata sourceBackup
15365
+ * @property {google.spanner.admin.database.v1.IOperationProgress|null} [progress] CopyBackupMetadata progress
15366
+ * @property {google.protobuf.ITimestamp|null} [cancelTime] CopyBackupMetadata cancelTime
15367
+ */
15368
+
15369
+ /**
15370
+ * Constructs a new CopyBackupMetadata.
15371
+ * @memberof google.spanner.admin.database.v1
15372
+ * @classdesc Represents a CopyBackupMetadata.
15373
+ * @implements ICopyBackupMetadata
15374
+ * @constructor
15375
+ * @param {google.spanner.admin.database.v1.ICopyBackupMetadata=} [properties] Properties to set
15376
+ */
15377
+ function CopyBackupMetadata(properties) {
15378
+ if (properties)
15379
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
15380
+ if (properties[keys[i]] != null)
15381
+ this[keys[i]] = properties[keys[i]];
15382
+ }
15383
+
15384
+ /**
15385
+ * CopyBackupMetadata name.
15386
+ * @member {string} name
15387
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15388
+ * @instance
15389
+ */
15390
+ CopyBackupMetadata.prototype.name = "";
15391
+
15392
+ /**
15393
+ * CopyBackupMetadata sourceBackup.
15394
+ * @member {string} sourceBackup
15395
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15396
+ * @instance
15397
+ */
15398
+ CopyBackupMetadata.prototype.sourceBackup = "";
15399
+
15400
+ /**
15401
+ * CopyBackupMetadata progress.
15402
+ * @member {google.spanner.admin.database.v1.IOperationProgress|null|undefined} progress
15403
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15404
+ * @instance
15405
+ */
15406
+ CopyBackupMetadata.prototype.progress = null;
15407
+
15408
+ /**
15409
+ * CopyBackupMetadata cancelTime.
15410
+ * @member {google.protobuf.ITimestamp|null|undefined} cancelTime
15411
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15412
+ * @instance
15413
+ */
15414
+ CopyBackupMetadata.prototype.cancelTime = null;
15415
+
15416
+ /**
15417
+ * Creates a new CopyBackupMetadata instance using the specified properties.
15418
+ * @function create
15419
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15420
+ * @static
15421
+ * @param {google.spanner.admin.database.v1.ICopyBackupMetadata=} [properties] Properties to set
15422
+ * @returns {google.spanner.admin.database.v1.CopyBackupMetadata} CopyBackupMetadata instance
15423
+ */
15424
+ CopyBackupMetadata.create = function create(properties) {
15425
+ return new CopyBackupMetadata(properties);
15426
+ };
15427
+
15428
+ /**
15429
+ * Encodes the specified CopyBackupMetadata message. Does not implicitly {@link google.spanner.admin.database.v1.CopyBackupMetadata.verify|verify} messages.
15430
+ * @function encode
15431
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15432
+ * @static
15433
+ * @param {google.spanner.admin.database.v1.ICopyBackupMetadata} message CopyBackupMetadata message or plain object to encode
15434
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15435
+ * @returns {$protobuf.Writer} Writer
15436
+ */
15437
+ CopyBackupMetadata.encode = function encode(message, writer) {
15438
+ if (!writer)
15439
+ writer = $Writer.create();
15440
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
15441
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
15442
+ if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup"))
15443
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceBackup);
15444
+ if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
15445
+ $root.google.spanner.admin.database.v1.OperationProgress.encode(message.progress, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
15446
+ if (message.cancelTime != null && Object.hasOwnProperty.call(message, "cancelTime"))
15447
+ $root.google.protobuf.Timestamp.encode(message.cancelTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
15448
+ return writer;
15449
+ };
15450
+
15451
+ /**
15452
+ * Encodes the specified CopyBackupMetadata message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.CopyBackupMetadata.verify|verify} messages.
15453
+ * @function encodeDelimited
15454
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15455
+ * @static
15456
+ * @param {google.spanner.admin.database.v1.ICopyBackupMetadata} message CopyBackupMetadata message or plain object to encode
15457
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15458
+ * @returns {$protobuf.Writer} Writer
15459
+ */
15460
+ CopyBackupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
15461
+ return this.encode(message, writer).ldelim();
15462
+ };
15463
+
15464
+ /**
15465
+ * Decodes a CopyBackupMetadata message from the specified reader or buffer.
15466
+ * @function decode
15467
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15468
+ * @static
15469
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15470
+ * @param {number} [length] Message length if known beforehand
15471
+ * @returns {google.spanner.admin.database.v1.CopyBackupMetadata} CopyBackupMetadata
15472
+ * @throws {Error} If the payload is not a reader or valid buffer
15473
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15474
+ */
15475
+ CopyBackupMetadata.decode = function decode(reader, length) {
15476
+ if (!(reader instanceof $Reader))
15477
+ reader = $Reader.create(reader);
15478
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.CopyBackupMetadata();
15479
+ while (reader.pos < end) {
15480
+ var tag = reader.uint32();
15481
+ switch (tag >>> 3) {
15482
+ case 1:
15483
+ message.name = reader.string();
15484
+ break;
15485
+ case 2:
15486
+ message.sourceBackup = reader.string();
15487
+ break;
15488
+ case 3:
15489
+ message.progress = $root.google.spanner.admin.database.v1.OperationProgress.decode(reader, reader.uint32());
15490
+ break;
15491
+ case 4:
15492
+ message.cancelTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
15493
+ break;
15494
+ default:
15495
+ reader.skipType(tag & 7);
15496
+ break;
15497
+ }
15498
+ }
15499
+ return message;
15500
+ };
15501
+
15502
+ /**
15503
+ * Decodes a CopyBackupMetadata message from the specified reader or buffer, length delimited.
15504
+ * @function decodeDelimited
15505
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15506
+ * @static
15507
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15508
+ * @returns {google.spanner.admin.database.v1.CopyBackupMetadata} CopyBackupMetadata
15509
+ * @throws {Error} If the payload is not a reader or valid buffer
15510
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15511
+ */
15512
+ CopyBackupMetadata.decodeDelimited = function decodeDelimited(reader) {
15513
+ if (!(reader instanceof $Reader))
15514
+ reader = new $Reader(reader);
15515
+ return this.decode(reader, reader.uint32());
15516
+ };
15517
+
15518
+ /**
15519
+ * Verifies a CopyBackupMetadata message.
15520
+ * @function verify
15521
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15522
+ * @static
15523
+ * @param {Object.<string,*>} message Plain object to verify
15524
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
15525
+ */
15526
+ CopyBackupMetadata.verify = function verify(message) {
15527
+ if (typeof message !== "object" || message === null)
15528
+ return "object expected";
15529
+ if (message.name != null && message.hasOwnProperty("name"))
15530
+ if (!$util.isString(message.name))
15531
+ return "name: string expected";
15532
+ if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup"))
15533
+ if (!$util.isString(message.sourceBackup))
15534
+ return "sourceBackup: string expected";
15535
+ if (message.progress != null && message.hasOwnProperty("progress")) {
15536
+ var error = $root.google.spanner.admin.database.v1.OperationProgress.verify(message.progress);
15537
+ if (error)
15538
+ return "progress." + error;
15539
+ }
15540
+ if (message.cancelTime != null && message.hasOwnProperty("cancelTime")) {
15541
+ var error = $root.google.protobuf.Timestamp.verify(message.cancelTime);
15542
+ if (error)
15543
+ return "cancelTime." + error;
15544
+ }
15545
+ return null;
15546
+ };
15547
+
15548
+ /**
15549
+ * Creates a CopyBackupMetadata message from a plain object. Also converts values to their respective internal types.
15550
+ * @function fromObject
15551
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15552
+ * @static
15553
+ * @param {Object.<string,*>} object Plain object
15554
+ * @returns {google.spanner.admin.database.v1.CopyBackupMetadata} CopyBackupMetadata
15555
+ */
15556
+ CopyBackupMetadata.fromObject = function fromObject(object) {
15557
+ if (object instanceof $root.google.spanner.admin.database.v1.CopyBackupMetadata)
15558
+ return object;
15559
+ var message = new $root.google.spanner.admin.database.v1.CopyBackupMetadata();
15560
+ if (object.name != null)
15561
+ message.name = String(object.name);
15562
+ if (object.sourceBackup != null)
15563
+ message.sourceBackup = String(object.sourceBackup);
15564
+ if (object.progress != null) {
15565
+ if (typeof object.progress !== "object")
15566
+ throw TypeError(".google.spanner.admin.database.v1.CopyBackupMetadata.progress: object expected");
15567
+ message.progress = $root.google.spanner.admin.database.v1.OperationProgress.fromObject(object.progress);
15568
+ }
15569
+ if (object.cancelTime != null) {
15570
+ if (typeof object.cancelTime !== "object")
15571
+ throw TypeError(".google.spanner.admin.database.v1.CopyBackupMetadata.cancelTime: object expected");
15572
+ message.cancelTime = $root.google.protobuf.Timestamp.fromObject(object.cancelTime);
15573
+ }
15574
+ return message;
15575
+ };
15576
+
15577
+ /**
15578
+ * Creates a plain object from a CopyBackupMetadata message. Also converts values to other types if specified.
15579
+ * @function toObject
15580
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15581
+ * @static
15582
+ * @param {google.spanner.admin.database.v1.CopyBackupMetadata} message CopyBackupMetadata
15583
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
15584
+ * @returns {Object.<string,*>} Plain object
15585
+ */
15586
+ CopyBackupMetadata.toObject = function toObject(message, options) {
15587
+ if (!options)
15588
+ options = {};
15589
+ var object = {};
15590
+ if (options.defaults) {
15591
+ object.name = "";
15592
+ object.sourceBackup = "";
15593
+ object.progress = null;
15594
+ object.cancelTime = null;
15595
+ }
15596
+ if (message.name != null && message.hasOwnProperty("name"))
15597
+ object.name = message.name;
15598
+ if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup"))
15599
+ object.sourceBackup = message.sourceBackup;
15600
+ if (message.progress != null && message.hasOwnProperty("progress"))
15601
+ object.progress = $root.google.spanner.admin.database.v1.OperationProgress.toObject(message.progress, options);
15602
+ if (message.cancelTime != null && message.hasOwnProperty("cancelTime"))
15603
+ object.cancelTime = $root.google.protobuf.Timestamp.toObject(message.cancelTime, options);
15604
+ return object;
15605
+ };
15606
+
15607
+ /**
15608
+ * Converts this CopyBackupMetadata to JSON.
15609
+ * @function toJSON
15610
+ * @memberof google.spanner.admin.database.v1.CopyBackupMetadata
15611
+ * @instance
15612
+ * @returns {Object.<string,*>} JSON object
15613
+ */
15614
+ CopyBackupMetadata.prototype.toJSON = function toJSON() {
15615
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
15616
+ };
15617
+
15618
+ return CopyBackupMetadata;
15619
+ })();
15620
+
14943
15621
  v1.UpdateBackupRequest = (function() {
14944
15622
 
14945
15623
  /**
@@ -17019,6 +17697,257 @@
17019
17697
  return CreateBackupEncryptionConfig;
17020
17698
  })();
17021
17699
 
17700
+ v1.CopyBackupEncryptionConfig = (function() {
17701
+
17702
+ /**
17703
+ * Properties of a CopyBackupEncryptionConfig.
17704
+ * @memberof google.spanner.admin.database.v1
17705
+ * @interface ICopyBackupEncryptionConfig
17706
+ * @property {google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType|null} [encryptionType] CopyBackupEncryptionConfig encryptionType
17707
+ * @property {string|null} [kmsKeyName] CopyBackupEncryptionConfig kmsKeyName
17708
+ */
17709
+
17710
+ /**
17711
+ * Constructs a new CopyBackupEncryptionConfig.
17712
+ * @memberof google.spanner.admin.database.v1
17713
+ * @classdesc Represents a CopyBackupEncryptionConfig.
17714
+ * @implements ICopyBackupEncryptionConfig
17715
+ * @constructor
17716
+ * @param {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig=} [properties] Properties to set
17717
+ */
17718
+ function CopyBackupEncryptionConfig(properties) {
17719
+ if (properties)
17720
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
17721
+ if (properties[keys[i]] != null)
17722
+ this[keys[i]] = properties[keys[i]];
17723
+ }
17724
+
17725
+ /**
17726
+ * CopyBackupEncryptionConfig encryptionType.
17727
+ * @member {google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType} encryptionType
17728
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17729
+ * @instance
17730
+ */
17731
+ CopyBackupEncryptionConfig.prototype.encryptionType = 0;
17732
+
17733
+ /**
17734
+ * CopyBackupEncryptionConfig kmsKeyName.
17735
+ * @member {string} kmsKeyName
17736
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17737
+ * @instance
17738
+ */
17739
+ CopyBackupEncryptionConfig.prototype.kmsKeyName = "";
17740
+
17741
+ /**
17742
+ * Creates a new CopyBackupEncryptionConfig instance using the specified properties.
17743
+ * @function create
17744
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17745
+ * @static
17746
+ * @param {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig=} [properties] Properties to set
17747
+ * @returns {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} CopyBackupEncryptionConfig instance
17748
+ */
17749
+ CopyBackupEncryptionConfig.create = function create(properties) {
17750
+ return new CopyBackupEncryptionConfig(properties);
17751
+ };
17752
+
17753
+ /**
17754
+ * Encodes the specified CopyBackupEncryptionConfig message. Does not implicitly {@link google.spanner.admin.database.v1.CopyBackupEncryptionConfig.verify|verify} messages.
17755
+ * @function encode
17756
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17757
+ * @static
17758
+ * @param {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig} message CopyBackupEncryptionConfig message or plain object to encode
17759
+ * @param {$protobuf.Writer} [writer] Writer to encode to
17760
+ * @returns {$protobuf.Writer} Writer
17761
+ */
17762
+ CopyBackupEncryptionConfig.encode = function encode(message, writer) {
17763
+ if (!writer)
17764
+ writer = $Writer.create();
17765
+ if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType"))
17766
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType);
17767
+ if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName"))
17768
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName);
17769
+ return writer;
17770
+ };
17771
+
17772
+ /**
17773
+ * Encodes the specified CopyBackupEncryptionConfig message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.CopyBackupEncryptionConfig.verify|verify} messages.
17774
+ * @function encodeDelimited
17775
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17776
+ * @static
17777
+ * @param {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig} message CopyBackupEncryptionConfig message or plain object to encode
17778
+ * @param {$protobuf.Writer} [writer] Writer to encode to
17779
+ * @returns {$protobuf.Writer} Writer
17780
+ */
17781
+ CopyBackupEncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) {
17782
+ return this.encode(message, writer).ldelim();
17783
+ };
17784
+
17785
+ /**
17786
+ * Decodes a CopyBackupEncryptionConfig message from the specified reader or buffer.
17787
+ * @function decode
17788
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17789
+ * @static
17790
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17791
+ * @param {number} [length] Message length if known beforehand
17792
+ * @returns {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} CopyBackupEncryptionConfig
17793
+ * @throws {Error} If the payload is not a reader or valid buffer
17794
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17795
+ */
17796
+ CopyBackupEncryptionConfig.decode = function decode(reader, length) {
17797
+ if (!(reader instanceof $Reader))
17798
+ reader = $Reader.create(reader);
17799
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig();
17800
+ while (reader.pos < end) {
17801
+ var tag = reader.uint32();
17802
+ switch (tag >>> 3) {
17803
+ case 1:
17804
+ message.encryptionType = reader.int32();
17805
+ break;
17806
+ case 2:
17807
+ message.kmsKeyName = reader.string();
17808
+ break;
17809
+ default:
17810
+ reader.skipType(tag & 7);
17811
+ break;
17812
+ }
17813
+ }
17814
+ return message;
17815
+ };
17816
+
17817
+ /**
17818
+ * Decodes a CopyBackupEncryptionConfig message from the specified reader or buffer, length delimited.
17819
+ * @function decodeDelimited
17820
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17821
+ * @static
17822
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
17823
+ * @returns {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} CopyBackupEncryptionConfig
17824
+ * @throws {Error} If the payload is not a reader or valid buffer
17825
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17826
+ */
17827
+ CopyBackupEncryptionConfig.decodeDelimited = function decodeDelimited(reader) {
17828
+ if (!(reader instanceof $Reader))
17829
+ reader = new $Reader(reader);
17830
+ return this.decode(reader, reader.uint32());
17831
+ };
17832
+
17833
+ /**
17834
+ * Verifies a CopyBackupEncryptionConfig message.
17835
+ * @function verify
17836
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17837
+ * @static
17838
+ * @param {Object.<string,*>} message Plain object to verify
17839
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
17840
+ */
17841
+ CopyBackupEncryptionConfig.verify = function verify(message) {
17842
+ if (typeof message !== "object" || message === null)
17843
+ return "object expected";
17844
+ if (message.encryptionType != null && message.hasOwnProperty("encryptionType"))
17845
+ switch (message.encryptionType) {
17846
+ default:
17847
+ return "encryptionType: enum value expected";
17848
+ case 0:
17849
+ case 1:
17850
+ case 2:
17851
+ case 3:
17852
+ break;
17853
+ }
17854
+ if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
17855
+ if (!$util.isString(message.kmsKeyName))
17856
+ return "kmsKeyName: string expected";
17857
+ return null;
17858
+ };
17859
+
17860
+ /**
17861
+ * Creates a CopyBackupEncryptionConfig message from a plain object. Also converts values to their respective internal types.
17862
+ * @function fromObject
17863
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17864
+ * @static
17865
+ * @param {Object.<string,*>} object Plain object
17866
+ * @returns {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} CopyBackupEncryptionConfig
17867
+ */
17868
+ CopyBackupEncryptionConfig.fromObject = function fromObject(object) {
17869
+ if (object instanceof $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig)
17870
+ return object;
17871
+ var message = new $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig();
17872
+ switch (object.encryptionType) {
17873
+ case "ENCRYPTION_TYPE_UNSPECIFIED":
17874
+ case 0:
17875
+ message.encryptionType = 0;
17876
+ break;
17877
+ case "USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION":
17878
+ case 1:
17879
+ message.encryptionType = 1;
17880
+ break;
17881
+ case "GOOGLE_DEFAULT_ENCRYPTION":
17882
+ case 2:
17883
+ message.encryptionType = 2;
17884
+ break;
17885
+ case "CUSTOMER_MANAGED_ENCRYPTION":
17886
+ case 3:
17887
+ message.encryptionType = 3;
17888
+ break;
17889
+ }
17890
+ if (object.kmsKeyName != null)
17891
+ message.kmsKeyName = String(object.kmsKeyName);
17892
+ return message;
17893
+ };
17894
+
17895
+ /**
17896
+ * Creates a plain object from a CopyBackupEncryptionConfig message. Also converts values to other types if specified.
17897
+ * @function toObject
17898
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17899
+ * @static
17900
+ * @param {google.spanner.admin.database.v1.CopyBackupEncryptionConfig} message CopyBackupEncryptionConfig
17901
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
17902
+ * @returns {Object.<string,*>} Plain object
17903
+ */
17904
+ CopyBackupEncryptionConfig.toObject = function toObject(message, options) {
17905
+ if (!options)
17906
+ options = {};
17907
+ var object = {};
17908
+ if (options.defaults) {
17909
+ object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0;
17910
+ object.kmsKeyName = "";
17911
+ }
17912
+ if (message.encryptionType != null && message.hasOwnProperty("encryptionType"))
17913
+ object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType;
17914
+ if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
17915
+ object.kmsKeyName = message.kmsKeyName;
17916
+ return object;
17917
+ };
17918
+
17919
+ /**
17920
+ * Converts this CopyBackupEncryptionConfig to JSON.
17921
+ * @function toJSON
17922
+ * @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
17923
+ * @instance
17924
+ * @returns {Object.<string,*>} JSON object
17925
+ */
17926
+ CopyBackupEncryptionConfig.prototype.toJSON = function toJSON() {
17927
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
17928
+ };
17929
+
17930
+ /**
17931
+ * EncryptionType enum.
17932
+ * @name google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType
17933
+ * @enum {number}
17934
+ * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value
17935
+ * @property {number} USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION=1 USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION value
17936
+ * @property {number} GOOGLE_DEFAULT_ENCRYPTION=2 GOOGLE_DEFAULT_ENCRYPTION value
17937
+ * @property {number} CUSTOMER_MANAGED_ENCRYPTION=3 CUSTOMER_MANAGED_ENCRYPTION value
17938
+ */
17939
+ CopyBackupEncryptionConfig.EncryptionType = (function() {
17940
+ var valuesById = {}, values = Object.create(valuesById);
17941
+ values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0;
17942
+ values[valuesById[1] = "USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION"] = 1;
17943
+ values[valuesById[2] = "GOOGLE_DEFAULT_ENCRYPTION"] = 2;
17944
+ values[valuesById[3] = "CUSTOMER_MANAGED_ENCRYPTION"] = 3;
17945
+ return values;
17946
+ })();
17947
+
17948
+ return CopyBackupEncryptionConfig;
17949
+ })();
17950
+
17022
17951
  v1.OperationProgress = (function() {
17023
17952
 
17024
17953
  /**
@@ -17719,6 +18648,22 @@
17719
18648
  return EncryptionInfo;
17720
18649
  })();
17721
18650
 
18651
+ /**
18652
+ * DatabaseDialect enum.
18653
+ * @name google.spanner.admin.database.v1.DatabaseDialect
18654
+ * @enum {number}
18655
+ * @property {number} DATABASE_DIALECT_UNSPECIFIED=0 DATABASE_DIALECT_UNSPECIFIED value
18656
+ * @property {number} GOOGLE_STANDARD_SQL=1 GOOGLE_STANDARD_SQL value
18657
+ * @property {number} POSTGRESQL=2 POSTGRESQL value
18658
+ */
18659
+ v1.DatabaseDialect = (function() {
18660
+ var valuesById = {}, values = Object.create(valuesById);
18661
+ values[valuesById[0] = "DATABASE_DIALECT_UNSPECIFIED"] = 0;
18662
+ values[valuesById[1] = "GOOGLE_STANDARD_SQL"] = 1;
18663
+ values[valuesById[2] = "POSTGRESQL"] = 2;
18664
+ return values;
18665
+ })();
18666
+
17722
18667
  v1.DatabaseAdmin = (function() {
17723
18668
 
17724
18669
  /**
@@ -17752,7 +18697,7 @@
17752
18697
  };
17753
18698
 
17754
18699
  /**
17755
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#listDatabases}.
18700
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|listDatabases}.
17756
18701
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17757
18702
  * @typedef ListDatabasesCallback
17758
18703
  * @type {function}
@@ -17785,7 +18730,7 @@
17785
18730
  */
17786
18731
 
17787
18732
  /**
17788
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#createDatabase}.
18733
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|createDatabase}.
17789
18734
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17790
18735
  * @typedef CreateDatabaseCallback
17791
18736
  * @type {function}
@@ -17818,7 +18763,7 @@
17818
18763
  */
17819
18764
 
17820
18765
  /**
17821
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#getDatabase}.
18766
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|getDatabase}.
17822
18767
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17823
18768
  * @typedef GetDatabaseCallback
17824
18769
  * @type {function}
@@ -17851,7 +18796,7 @@
17851
18796
  */
17852
18797
 
17853
18798
  /**
17854
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#updateDatabaseDdl}.
18799
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|updateDatabaseDdl}.
17855
18800
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17856
18801
  * @typedef UpdateDatabaseDdlCallback
17857
18802
  * @type {function}
@@ -17884,7 +18829,7 @@
17884
18829
  */
17885
18830
 
17886
18831
  /**
17887
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#dropDatabase}.
18832
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|dropDatabase}.
17888
18833
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17889
18834
  * @typedef DropDatabaseCallback
17890
18835
  * @type {function}
@@ -17917,7 +18862,7 @@
17917
18862
  */
17918
18863
 
17919
18864
  /**
17920
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#getDatabaseDdl}.
18865
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|getDatabaseDdl}.
17921
18866
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17922
18867
  * @typedef GetDatabaseDdlCallback
17923
18868
  * @type {function}
@@ -17950,7 +18895,7 @@
17950
18895
  */
17951
18896
 
17952
18897
  /**
17953
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#setIamPolicy}.
18898
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|setIamPolicy}.
17954
18899
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17955
18900
  * @typedef SetIamPolicyCallback
17956
18901
  * @type {function}
@@ -17983,7 +18928,7 @@
17983
18928
  */
17984
18929
 
17985
18930
  /**
17986
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#getIamPolicy}.
18931
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|getIamPolicy}.
17987
18932
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
17988
18933
  * @typedef GetIamPolicyCallback
17989
18934
  * @type {function}
@@ -18016,7 +18961,7 @@
18016
18961
  */
18017
18962
 
18018
18963
  /**
18019
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#testIamPermissions}.
18964
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|testIamPermissions}.
18020
18965
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18021
18966
  * @typedef TestIamPermissionsCallback
18022
18967
  * @type {function}
@@ -18049,7 +18994,7 @@
18049
18994
  */
18050
18995
 
18051
18996
  /**
18052
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#createBackup}.
18997
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|createBackup}.
18053
18998
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18054
18999
  * @typedef CreateBackupCallback
18055
19000
  * @type {function}
@@ -18082,7 +19027,40 @@
18082
19027
  */
18083
19028
 
18084
19029
  /**
18085
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#getBackup}.
19030
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|copyBackup}.
19031
+ * @memberof google.spanner.admin.database.v1.DatabaseAdmin
19032
+ * @typedef CopyBackupCallback
19033
+ * @type {function}
19034
+ * @param {Error|null} error Error, if any
19035
+ * @param {google.longrunning.Operation} [response] Operation
19036
+ */
19037
+
19038
+ /**
19039
+ * Calls CopyBackup.
19040
+ * @function copyBackup
19041
+ * @memberof google.spanner.admin.database.v1.DatabaseAdmin
19042
+ * @instance
19043
+ * @param {google.spanner.admin.database.v1.ICopyBackupRequest} request CopyBackupRequest message or plain object
19044
+ * @param {google.spanner.admin.database.v1.DatabaseAdmin.CopyBackupCallback} callback Node-style callback called with the error, if any, and Operation
19045
+ * @returns {undefined}
19046
+ * @variation 1
19047
+ */
19048
+ Object.defineProperty(DatabaseAdmin.prototype.copyBackup = function copyBackup(request, callback) {
19049
+ return this.rpcCall(copyBackup, $root.google.spanner.admin.database.v1.CopyBackupRequest, $root.google.longrunning.Operation, request, callback);
19050
+ }, "name", { value: "CopyBackup" });
19051
+
19052
+ /**
19053
+ * Calls CopyBackup.
19054
+ * @function copyBackup
19055
+ * @memberof google.spanner.admin.database.v1.DatabaseAdmin
19056
+ * @instance
19057
+ * @param {google.spanner.admin.database.v1.ICopyBackupRequest} request CopyBackupRequest message or plain object
19058
+ * @returns {Promise<google.longrunning.Operation>} Promise
19059
+ * @variation 2
19060
+ */
19061
+
19062
+ /**
19063
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|getBackup}.
18086
19064
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18087
19065
  * @typedef GetBackupCallback
18088
19066
  * @type {function}
@@ -18115,7 +19093,7 @@
18115
19093
  */
18116
19094
 
18117
19095
  /**
18118
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#updateBackup}.
19096
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|updateBackup}.
18119
19097
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18120
19098
  * @typedef UpdateBackupCallback
18121
19099
  * @type {function}
@@ -18148,7 +19126,7 @@
18148
19126
  */
18149
19127
 
18150
19128
  /**
18151
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#deleteBackup}.
19129
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|deleteBackup}.
18152
19130
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18153
19131
  * @typedef DeleteBackupCallback
18154
19132
  * @type {function}
@@ -18181,7 +19159,7 @@
18181
19159
  */
18182
19160
 
18183
19161
  /**
18184
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#listBackups}.
19162
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|listBackups}.
18185
19163
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18186
19164
  * @typedef ListBackupsCallback
18187
19165
  * @type {function}
@@ -18214,7 +19192,7 @@
18214
19192
  */
18215
19193
 
18216
19194
  /**
18217
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#restoreDatabase}.
19195
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|restoreDatabase}.
18218
19196
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18219
19197
  * @typedef RestoreDatabaseCallback
18220
19198
  * @type {function}
@@ -18247,7 +19225,7 @@
18247
19225
  */
18248
19226
 
18249
19227
  /**
18250
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#listDatabaseOperations}.
19228
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|listDatabaseOperations}.
18251
19229
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18252
19230
  * @typedef ListDatabaseOperationsCallback
18253
19231
  * @type {function}
@@ -18280,7 +19258,7 @@
18280
19258
  */
18281
19259
 
18282
19260
  /**
18283
- * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin#listBackupOperations}.
19261
+ * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|listBackupOperations}.
18284
19262
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
18285
19263
  * @typedef ListBackupOperationsCallback
18286
19264
  * @type {function}
@@ -18577,6 +19555,7 @@
18577
19555
  * @property {string|null} [versionRetentionPeriod] Database versionRetentionPeriod
18578
19556
  * @property {google.protobuf.ITimestamp|null} [earliestVersionTime] Database earliestVersionTime
18579
19557
  * @property {string|null} [defaultLeader] Database defaultLeader
19558
+ * @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] Database databaseDialect
18580
19559
  */
18581
19560
 
18582
19561
  /**
@@ -18667,6 +19646,14 @@
18667
19646
  */
18668
19647
  Database.prototype.defaultLeader = "";
18669
19648
 
19649
+ /**
19650
+ * Database databaseDialect.
19651
+ * @member {google.spanner.admin.database.v1.DatabaseDialect} databaseDialect
19652
+ * @memberof google.spanner.admin.database.v1.Database
19653
+ * @instance
19654
+ */
19655
+ Database.prototype.databaseDialect = 0;
19656
+
18670
19657
  /**
18671
19658
  * Creates a new Database instance using the specified properties.
18672
19659
  * @function create
@@ -18710,6 +19697,8 @@
18710
19697
  $root.google.spanner.admin.database.v1.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
18711
19698
  if (message.defaultLeader != null && Object.hasOwnProperty.call(message, "defaultLeader"))
18712
19699
  writer.uint32(/* id 9, wireType 2 =*/74).string(message.defaultLeader);
19700
+ if (message.databaseDialect != null && Object.hasOwnProperty.call(message, "databaseDialect"))
19701
+ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.databaseDialect);
18713
19702
  return writer;
18714
19703
  };
18715
19704
 
@@ -18773,6 +19762,9 @@
18773
19762
  case 9:
18774
19763
  message.defaultLeader = reader.string();
18775
19764
  break;
19765
+ case 10:
19766
+ message.databaseDialect = reader.int32();
19767
+ break;
18776
19768
  default:
18777
19769
  reader.skipType(tag & 7);
18778
19770
  break;
@@ -18856,6 +19848,15 @@
18856
19848
  if (message.defaultLeader != null && message.hasOwnProperty("defaultLeader"))
18857
19849
  if (!$util.isString(message.defaultLeader))
18858
19850
  return "defaultLeader: string expected";
19851
+ if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
19852
+ switch (message.databaseDialect) {
19853
+ default:
19854
+ return "databaseDialect: enum value expected";
19855
+ case 0:
19856
+ case 1:
19857
+ case 2:
19858
+ break;
19859
+ }
18859
19860
  return null;
18860
19861
  };
18861
19862
 
@@ -18925,6 +19926,20 @@
18925
19926
  }
18926
19927
  if (object.defaultLeader != null)
18927
19928
  message.defaultLeader = String(object.defaultLeader);
19929
+ switch (object.databaseDialect) {
19930
+ case "DATABASE_DIALECT_UNSPECIFIED":
19931
+ case 0:
19932
+ message.databaseDialect = 0;
19933
+ break;
19934
+ case "GOOGLE_STANDARD_SQL":
19935
+ case 1:
19936
+ message.databaseDialect = 1;
19937
+ break;
19938
+ case "POSTGRESQL":
19939
+ case 2:
19940
+ message.databaseDialect = 2;
19941
+ break;
19942
+ }
18928
19943
  return message;
18929
19944
  };
18930
19945
 
@@ -18952,6 +19967,7 @@
18952
19967
  object.versionRetentionPeriod = "";
18953
19968
  object.earliestVersionTime = null;
18954
19969
  object.defaultLeader = "";
19970
+ object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0;
18955
19971
  }
18956
19972
  if (message.name != null && message.hasOwnProperty("name"))
18957
19973
  object.name = message.name;
@@ -18974,6 +19990,8 @@
18974
19990
  }
18975
19991
  if (message.defaultLeader != null && message.hasOwnProperty("defaultLeader"))
18976
19992
  object.defaultLeader = message.defaultLeader;
19993
+ if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
19994
+ object.databaseDialect = options.enums === String ? $root.google.spanner.admin.database.v1.DatabaseDialect[message.databaseDialect] : message.databaseDialect;
18977
19995
  return object;
18978
19996
  };
18979
19997
 
@@ -19482,6 +20500,7 @@
19482
20500
  * @property {string|null} [createStatement] CreateDatabaseRequest createStatement
19483
20501
  * @property {Array.<string>|null} [extraStatements] CreateDatabaseRequest extraStatements
19484
20502
  * @property {google.spanner.admin.database.v1.IEncryptionConfig|null} [encryptionConfig] CreateDatabaseRequest encryptionConfig
20503
+ * @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] CreateDatabaseRequest databaseDialect
19485
20504
  */
19486
20505
 
19487
20506
  /**
@@ -19532,6 +20551,14 @@
19532
20551
  */
19533
20552
  CreateDatabaseRequest.prototype.encryptionConfig = null;
19534
20553
 
20554
+ /**
20555
+ * CreateDatabaseRequest databaseDialect.
20556
+ * @member {google.spanner.admin.database.v1.DatabaseDialect} databaseDialect
20557
+ * @memberof google.spanner.admin.database.v1.CreateDatabaseRequest
20558
+ * @instance
20559
+ */
20560
+ CreateDatabaseRequest.prototype.databaseDialect = 0;
20561
+
19535
20562
  /**
19536
20563
  * Creates a new CreateDatabaseRequest instance using the specified properties.
19537
20564
  * @function create
@@ -19565,6 +20592,8 @@
19565
20592
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.extraStatements[i]);
19566
20593
  if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig"))
19567
20594
  $root.google.spanner.admin.database.v1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
20595
+ if (message.databaseDialect != null && Object.hasOwnProperty.call(message, "databaseDialect"))
20596
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.databaseDialect);
19568
20597
  return writer;
19569
20598
  };
19570
20599
 
@@ -19613,6 +20642,9 @@
19613
20642
  case 4:
19614
20643
  message.encryptionConfig = $root.google.spanner.admin.database.v1.EncryptionConfig.decode(reader, reader.uint32());
19615
20644
  break;
20645
+ case 5:
20646
+ message.databaseDialect = reader.int32();
20647
+ break;
19616
20648
  default:
19617
20649
  reader.skipType(tag & 7);
19618
20650
  break;
@@ -19666,6 +20698,15 @@
19666
20698
  if (error)
19667
20699
  return "encryptionConfig." + error;
19668
20700
  }
20701
+ if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
20702
+ switch (message.databaseDialect) {
20703
+ default:
20704
+ return "databaseDialect: enum value expected";
20705
+ case 0:
20706
+ case 1:
20707
+ case 2:
20708
+ break;
20709
+ }
19669
20710
  return null;
19670
20711
  };
19671
20712
 
@@ -19697,6 +20738,20 @@
19697
20738
  throw TypeError(".google.spanner.admin.database.v1.CreateDatabaseRequest.encryptionConfig: object expected");
19698
20739
  message.encryptionConfig = $root.google.spanner.admin.database.v1.EncryptionConfig.fromObject(object.encryptionConfig);
19699
20740
  }
20741
+ switch (object.databaseDialect) {
20742
+ case "DATABASE_DIALECT_UNSPECIFIED":
20743
+ case 0:
20744
+ message.databaseDialect = 0;
20745
+ break;
20746
+ case "GOOGLE_STANDARD_SQL":
20747
+ case 1:
20748
+ message.databaseDialect = 1;
20749
+ break;
20750
+ case "POSTGRESQL":
20751
+ case 2:
20752
+ message.databaseDialect = 2;
20753
+ break;
20754
+ }
19700
20755
  return message;
19701
20756
  };
19702
20757
 
@@ -19719,6 +20774,7 @@
19719
20774
  object.parent = "";
19720
20775
  object.createStatement = "";
19721
20776
  object.encryptionConfig = null;
20777
+ object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0;
19722
20778
  }
19723
20779
  if (message.parent != null && message.hasOwnProperty("parent"))
19724
20780
  object.parent = message.parent;
@@ -19731,6 +20787,8 @@
19731
20787
  }
19732
20788
  if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig"))
19733
20789
  object.encryptionConfig = $root.google.spanner.admin.database.v1.EncryptionConfig.toObject(message.encryptionConfig, options);
20790
+ if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
20791
+ object.databaseDialect = options.enums === String ? $root.google.spanner.admin.database.v1.DatabaseDialect[message.databaseDialect] : message.databaseDialect;
19734
20792
  return object;
19735
20793
  };
19736
20794
 
@@ -22930,7 +23988,7 @@
22930
23988
  };
22931
23989
 
22932
23990
  /**
22933
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#listInstanceConfigs}.
23991
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|listInstanceConfigs}.
22934
23992
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
22935
23993
  * @typedef ListInstanceConfigsCallback
22936
23994
  * @type {function}
@@ -22963,7 +24021,7 @@
22963
24021
  */
22964
24022
 
22965
24023
  /**
22966
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#getInstanceConfig}.
24024
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|getInstanceConfig}.
22967
24025
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
22968
24026
  * @typedef GetInstanceConfigCallback
22969
24027
  * @type {function}
@@ -22996,7 +24054,7 @@
22996
24054
  */
22997
24055
 
22998
24056
  /**
22999
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#listInstances}.
24057
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|listInstances}.
23000
24058
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23001
24059
  * @typedef ListInstancesCallback
23002
24060
  * @type {function}
@@ -23029,7 +24087,7 @@
23029
24087
  */
23030
24088
 
23031
24089
  /**
23032
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#getInstance}.
24090
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|getInstance}.
23033
24091
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23034
24092
  * @typedef GetInstanceCallback
23035
24093
  * @type {function}
@@ -23062,7 +24120,7 @@
23062
24120
  */
23063
24121
 
23064
24122
  /**
23065
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#createInstance}.
24123
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|createInstance}.
23066
24124
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23067
24125
  * @typedef CreateInstanceCallback
23068
24126
  * @type {function}
@@ -23095,7 +24153,7 @@
23095
24153
  */
23096
24154
 
23097
24155
  /**
23098
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#updateInstance}.
24156
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|updateInstance}.
23099
24157
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23100
24158
  * @typedef UpdateInstanceCallback
23101
24159
  * @type {function}
@@ -23128,7 +24186,7 @@
23128
24186
  */
23129
24187
 
23130
24188
  /**
23131
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#deleteInstance}.
24189
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|deleteInstance}.
23132
24190
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23133
24191
  * @typedef DeleteInstanceCallback
23134
24192
  * @type {function}
@@ -23161,7 +24219,7 @@
23161
24219
  */
23162
24220
 
23163
24221
  /**
23164
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#setIamPolicy}.
24222
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|setIamPolicy}.
23165
24223
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23166
24224
  * @typedef SetIamPolicyCallback
23167
24225
  * @type {function}
@@ -23194,7 +24252,7 @@
23194
24252
  */
23195
24253
 
23196
24254
  /**
23197
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#getIamPolicy}.
24255
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|getIamPolicy}.
23198
24256
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23199
24257
  * @typedef GetIamPolicyCallback
23200
24258
  * @type {function}
@@ -23227,7 +24285,7 @@
23227
24285
  */
23228
24286
 
23229
24287
  /**
23230
- * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin#testIamPermissions}.
24288
+ * Callback as used by {@link google.spanner.admin.instance.v1.InstanceAdmin|testIamPermissions}.
23231
24289
  * @memberof google.spanner.admin.instance.v1.InstanceAdmin
23232
24290
  * @typedef TestIamPermissionsCallback
23233
24291
  * @type {function}
@@ -29039,6 +30097,22 @@
29039
30097
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
29040
30098
  };
29041
30099
 
30100
+ /**
30101
+ * Kind enum.
30102
+ * @name google.spanner.v1.PlanNode.Kind
30103
+ * @enum {number}
30104
+ * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value
30105
+ * @property {number} RELATIONAL=1 RELATIONAL value
30106
+ * @property {number} SCALAR=2 SCALAR value
30107
+ */
30108
+ PlanNode.Kind = (function() {
30109
+ var valuesById = {}, values = Object.create(valuesById);
30110
+ values[valuesById[0] = "KIND_UNSPECIFIED"] = 0;
30111
+ values[valuesById[1] = "RELATIONAL"] = 1;
30112
+ values[valuesById[2] = "SCALAR"] = 2;
30113
+ return values;
30114
+ })();
30115
+
29042
30116
  PlanNode.ChildLink = (function() {
29043
30117
 
29044
30118
  /**
@@ -29516,22 +30590,6 @@
29516
30590
  return ShortRepresentation;
29517
30591
  })();
29518
30592
 
29519
- /**
29520
- * Kind enum.
29521
- * @name google.spanner.v1.PlanNode.Kind
29522
- * @enum {number}
29523
- * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value
29524
- * @property {number} RELATIONAL=1 RELATIONAL value
29525
- * @property {number} SCALAR=2 SCALAR value
29526
- */
29527
- PlanNode.Kind = (function() {
29528
- var valuesById = {}, values = Object.create(valuesById);
29529
- values[valuesById[0] = "KIND_UNSPECIFIED"] = 0;
29530
- values[valuesById[1] = "RELATIONAL"] = 1;
29531
- values[valuesById[2] = "SCALAR"] = 2;
29532
- return values;
29533
- })();
29534
-
29535
30593
  return PlanNode;
29536
30594
  })();
29537
30595
 
@@ -32325,6 +33383,7 @@
32325
33383
  * @property {google.spanner.v1.TypeCode|null} [code] Type code
32326
33384
  * @property {google.spanner.v1.IType|null} [arrayElementType] Type arrayElementType
32327
33385
  * @property {google.spanner.v1.IStructType|null} [structType] Type structType
33386
+ * @property {google.spanner.v1.TypeAnnotationCode|null} [typeAnnotation] Type typeAnnotation
32328
33387
  */
32329
33388
 
32330
33389
  /**
@@ -32366,6 +33425,14 @@
32366
33425
  */
32367
33426
  Type.prototype.structType = null;
32368
33427
 
33428
+ /**
33429
+ * Type typeAnnotation.
33430
+ * @member {google.spanner.v1.TypeAnnotationCode} typeAnnotation
33431
+ * @memberof google.spanner.v1.Type
33432
+ * @instance
33433
+ */
33434
+ Type.prototype.typeAnnotation = 0;
33435
+
32369
33436
  /**
32370
33437
  * Creates a new Type instance using the specified properties.
32371
33438
  * @function create
@@ -32396,6 +33463,8 @@
32396
33463
  $root.google.spanner.v1.Type.encode(message.arrayElementType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
32397
33464
  if (message.structType != null && Object.hasOwnProperty.call(message, "structType"))
32398
33465
  $root.google.spanner.v1.StructType.encode(message.structType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
33466
+ if (message.typeAnnotation != null && Object.hasOwnProperty.call(message, "typeAnnotation"))
33467
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.typeAnnotation);
32399
33468
  return writer;
32400
33469
  };
32401
33470
 
@@ -32439,6 +33508,9 @@
32439
33508
  case 3:
32440
33509
  message.structType = $root.google.spanner.v1.StructType.decode(reader, reader.uint32());
32441
33510
  break;
33511
+ case 4:
33512
+ message.typeAnnotation = reader.int32();
33513
+ break;
32442
33514
  default:
32443
33515
  reader.skipType(tag & 7);
32444
33516
  break;
@@ -32502,6 +33574,14 @@
32502
33574
  if (error)
32503
33575
  return "structType." + error;
32504
33576
  }
33577
+ if (message.typeAnnotation != null && message.hasOwnProperty("typeAnnotation"))
33578
+ switch (message.typeAnnotation) {
33579
+ default:
33580
+ return "typeAnnotation: enum value expected";
33581
+ case 0:
33582
+ case 2:
33583
+ break;
33584
+ }
32505
33585
  return null;
32506
33586
  };
32507
33587
 
@@ -32577,6 +33657,16 @@
32577
33657
  throw TypeError(".google.spanner.v1.Type.structType: object expected");
32578
33658
  message.structType = $root.google.spanner.v1.StructType.fromObject(object.structType);
32579
33659
  }
33660
+ switch (object.typeAnnotation) {
33661
+ case "TYPE_ANNOTATION_CODE_UNSPECIFIED":
33662
+ case 0:
33663
+ message.typeAnnotation = 0;
33664
+ break;
33665
+ case "PG_NUMERIC":
33666
+ case 2:
33667
+ message.typeAnnotation = 2;
33668
+ break;
33669
+ }
32580
33670
  return message;
32581
33671
  };
32582
33672
 
@@ -32597,6 +33687,7 @@
32597
33687
  object.code = options.enums === String ? "TYPE_CODE_UNSPECIFIED" : 0;
32598
33688
  object.arrayElementType = null;
32599
33689
  object.structType = null;
33690
+ object.typeAnnotation = options.enums === String ? "TYPE_ANNOTATION_CODE_UNSPECIFIED" : 0;
32600
33691
  }
32601
33692
  if (message.code != null && message.hasOwnProperty("code"))
32602
33693
  object.code = options.enums === String ? $root.google.spanner.v1.TypeCode[message.code] : message.code;
@@ -32604,6 +33695,8 @@
32604
33695
  object.arrayElementType = $root.google.spanner.v1.Type.toObject(message.arrayElementType, options);
32605
33696
  if (message.structType != null && message.hasOwnProperty("structType"))
32606
33697
  object.structType = $root.google.spanner.v1.StructType.toObject(message.structType, options);
33698
+ if (message.typeAnnotation != null && message.hasOwnProperty("typeAnnotation"))
33699
+ object.typeAnnotation = options.enums === String ? $root.google.spanner.v1.TypeAnnotationCode[message.typeAnnotation] : message.typeAnnotation;
32607
33700
  return object;
32608
33701
  };
32609
33702
 
@@ -33078,6 +34171,20 @@
33078
34171
  return values;
33079
34172
  })();
33080
34173
 
34174
+ /**
34175
+ * TypeAnnotationCode enum.
34176
+ * @name google.spanner.v1.TypeAnnotationCode
34177
+ * @enum {number}
34178
+ * @property {number} TYPE_ANNOTATION_CODE_UNSPECIFIED=0 TYPE_ANNOTATION_CODE_UNSPECIFIED value
34179
+ * @property {number} PG_NUMERIC=2 PG_NUMERIC value
34180
+ */
34181
+ v1.TypeAnnotationCode = (function() {
34182
+ var valuesById = {}, values = Object.create(valuesById);
34183
+ values[valuesById[0] = "TYPE_ANNOTATION_CODE_UNSPECIFIED"] = 0;
34184
+ values[valuesById[2] = "PG_NUMERIC"] = 2;
34185
+ return values;
34186
+ })();
34187
+
33081
34188
  v1.Spanner = (function() {
33082
34189
 
33083
34190
  /**
@@ -33111,7 +34218,7 @@
33111
34218
  };
33112
34219
 
33113
34220
  /**
33114
- * Callback as used by {@link google.spanner.v1.Spanner#createSession}.
34221
+ * Callback as used by {@link google.spanner.v1.Spanner|createSession}.
33115
34222
  * @memberof google.spanner.v1.Spanner
33116
34223
  * @typedef CreateSessionCallback
33117
34224
  * @type {function}
@@ -33144,7 +34251,7 @@
33144
34251
  */
33145
34252
 
33146
34253
  /**
33147
- * Callback as used by {@link google.spanner.v1.Spanner#batchCreateSessions}.
34254
+ * Callback as used by {@link google.spanner.v1.Spanner|batchCreateSessions}.
33148
34255
  * @memberof google.spanner.v1.Spanner
33149
34256
  * @typedef BatchCreateSessionsCallback
33150
34257
  * @type {function}
@@ -33177,7 +34284,7 @@
33177
34284
  */
33178
34285
 
33179
34286
  /**
33180
- * Callback as used by {@link google.spanner.v1.Spanner#getSession}.
34287
+ * Callback as used by {@link google.spanner.v1.Spanner|getSession}.
33181
34288
  * @memberof google.spanner.v1.Spanner
33182
34289
  * @typedef GetSessionCallback
33183
34290
  * @type {function}
@@ -33210,7 +34317,7 @@
33210
34317
  */
33211
34318
 
33212
34319
  /**
33213
- * Callback as used by {@link google.spanner.v1.Spanner#listSessions}.
34320
+ * Callback as used by {@link google.spanner.v1.Spanner|listSessions}.
33214
34321
  * @memberof google.spanner.v1.Spanner
33215
34322
  * @typedef ListSessionsCallback
33216
34323
  * @type {function}
@@ -33243,7 +34350,7 @@
33243
34350
  */
33244
34351
 
33245
34352
  /**
33246
- * Callback as used by {@link google.spanner.v1.Spanner#deleteSession}.
34353
+ * Callback as used by {@link google.spanner.v1.Spanner|deleteSession}.
33247
34354
  * @memberof google.spanner.v1.Spanner
33248
34355
  * @typedef DeleteSessionCallback
33249
34356
  * @type {function}
@@ -33276,7 +34383,7 @@
33276
34383
  */
33277
34384
 
33278
34385
  /**
33279
- * Callback as used by {@link google.spanner.v1.Spanner#executeSql}.
34386
+ * Callback as used by {@link google.spanner.v1.Spanner|executeSql}.
33280
34387
  * @memberof google.spanner.v1.Spanner
33281
34388
  * @typedef ExecuteSqlCallback
33282
34389
  * @type {function}
@@ -33309,7 +34416,7 @@
33309
34416
  */
33310
34417
 
33311
34418
  /**
33312
- * Callback as used by {@link google.spanner.v1.Spanner#executeStreamingSql}.
34419
+ * Callback as used by {@link google.spanner.v1.Spanner|executeStreamingSql}.
33313
34420
  * @memberof google.spanner.v1.Spanner
33314
34421
  * @typedef ExecuteStreamingSqlCallback
33315
34422
  * @type {function}
@@ -33342,7 +34449,7 @@
33342
34449
  */
33343
34450
 
33344
34451
  /**
33345
- * Callback as used by {@link google.spanner.v1.Spanner#executeBatchDml}.
34452
+ * Callback as used by {@link google.spanner.v1.Spanner|executeBatchDml}.
33346
34453
  * @memberof google.spanner.v1.Spanner
33347
34454
  * @typedef ExecuteBatchDmlCallback
33348
34455
  * @type {function}
@@ -33375,7 +34482,7 @@
33375
34482
  */
33376
34483
 
33377
34484
  /**
33378
- * Callback as used by {@link google.spanner.v1.Spanner#read}.
34485
+ * Callback as used by {@link google.spanner.v1.Spanner|read}.
33379
34486
  * @memberof google.spanner.v1.Spanner
33380
34487
  * @typedef ReadCallback
33381
34488
  * @type {function}
@@ -33408,7 +34515,7 @@
33408
34515
  */
33409
34516
 
33410
34517
  /**
33411
- * Callback as used by {@link google.spanner.v1.Spanner#streamingRead}.
34518
+ * Callback as used by {@link google.spanner.v1.Spanner|streamingRead}.
33412
34519
  * @memberof google.spanner.v1.Spanner
33413
34520
  * @typedef StreamingReadCallback
33414
34521
  * @type {function}
@@ -33441,7 +34548,7 @@
33441
34548
  */
33442
34549
 
33443
34550
  /**
33444
- * Callback as used by {@link google.spanner.v1.Spanner#beginTransaction}.
34551
+ * Callback as used by {@link google.spanner.v1.Spanner|beginTransaction}.
33445
34552
  * @memberof google.spanner.v1.Spanner
33446
34553
  * @typedef BeginTransactionCallback
33447
34554
  * @type {function}
@@ -33474,7 +34581,7 @@
33474
34581
  */
33475
34582
 
33476
34583
  /**
33477
- * Callback as used by {@link google.spanner.v1.Spanner#commit}.
34584
+ * Callback as used by {@link google.spanner.v1.Spanner|commit}.
33478
34585
  * @memberof google.spanner.v1.Spanner
33479
34586
  * @typedef CommitCallback
33480
34587
  * @type {function}
@@ -33507,7 +34614,7 @@
33507
34614
  */
33508
34615
 
33509
34616
  /**
33510
- * Callback as used by {@link google.spanner.v1.Spanner#rollback}.
34617
+ * Callback as used by {@link google.spanner.v1.Spanner|rollback}.
33511
34618
  * @memberof google.spanner.v1.Spanner
33512
34619
  * @typedef RollbackCallback
33513
34620
  * @type {function}
@@ -33540,7 +34647,7 @@
33540
34647
  */
33541
34648
 
33542
34649
  /**
33543
- * Callback as used by {@link google.spanner.v1.Spanner#partitionQuery}.
34650
+ * Callback as used by {@link google.spanner.v1.Spanner|partitionQuery}.
33544
34651
  * @memberof google.spanner.v1.Spanner
33545
34652
  * @typedef PartitionQueryCallback
33546
34653
  * @type {function}
@@ -33573,7 +34680,7 @@
33573
34680
  */
33574
34681
 
33575
34682
  /**
33576
- * Callback as used by {@link google.spanner.v1.Spanner#partitionRead}.
34683
+ * Callback as used by {@link google.spanner.v1.Spanner|partitionRead}.
33577
34684
  * @memberof google.spanner.v1.Spanner
33578
34685
  * @typedef PartitionReadCallback
33579
34686
  * @type {function}
@@ -36218,6 +37325,22 @@
36218
37325
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
36219
37326
  };
36220
37327
 
37328
+ /**
37329
+ * QueryMode enum.
37330
+ * @name google.spanner.v1.ExecuteSqlRequest.QueryMode
37331
+ * @enum {number}
37332
+ * @property {number} NORMAL=0 NORMAL value
37333
+ * @property {number} PLAN=1 PLAN value
37334
+ * @property {number} PROFILE=2 PROFILE value
37335
+ */
37336
+ ExecuteSqlRequest.QueryMode = (function() {
37337
+ var valuesById = {}, values = Object.create(valuesById);
37338
+ values[valuesById[0] = "NORMAL"] = 0;
37339
+ values[valuesById[1] = "PLAN"] = 1;
37340
+ values[valuesById[2] = "PROFILE"] = 2;
37341
+ return values;
37342
+ })();
37343
+
36221
37344
  ExecuteSqlRequest.QueryOptions = (function() {
36222
37345
 
36223
37346
  /**
@@ -36428,22 +37551,6 @@
36428
37551
  return QueryOptions;
36429
37552
  })();
36430
37553
 
36431
- /**
36432
- * QueryMode enum.
36433
- * @name google.spanner.v1.ExecuteSqlRequest.QueryMode
36434
- * @enum {number}
36435
- * @property {number} NORMAL=0 NORMAL value
36436
- * @property {number} PLAN=1 PLAN value
36437
- * @property {number} PROFILE=2 PROFILE value
36438
- */
36439
- ExecuteSqlRequest.QueryMode = (function() {
36440
- var valuesById = {}, values = Object.create(valuesById);
36441
- values[valuesById[0] = "NORMAL"] = 0;
36442
- values[valuesById[1] = "PLAN"] = 1;
36443
- values[valuesById[2] = "PROFILE"] = 2;
36444
- return values;
36445
- })();
36446
-
36447
37554
  return ExecuteSqlRequest;
36448
37555
  })();
36449
37556
 
@@ -41558,7 +42665,7 @@
41558
42665
  };
41559
42666
 
41560
42667
  /**
41561
- * Callback as used by {@link google.longrunning.Operations#listOperations}.
42668
+ * Callback as used by {@link google.longrunning.Operations|listOperations}.
41562
42669
  * @memberof google.longrunning.Operations
41563
42670
  * @typedef ListOperationsCallback
41564
42671
  * @type {function}
@@ -41591,7 +42698,7 @@
41591
42698
  */
41592
42699
 
41593
42700
  /**
41594
- * Callback as used by {@link google.longrunning.Operations#getOperation}.
42701
+ * Callback as used by {@link google.longrunning.Operations|getOperation}.
41595
42702
  * @memberof google.longrunning.Operations
41596
42703
  * @typedef GetOperationCallback
41597
42704
  * @type {function}
@@ -41624,7 +42731,7 @@
41624
42731
  */
41625
42732
 
41626
42733
  /**
41627
- * Callback as used by {@link google.longrunning.Operations#deleteOperation}.
42734
+ * Callback as used by {@link google.longrunning.Operations|deleteOperation}.
41628
42735
  * @memberof google.longrunning.Operations
41629
42736
  * @typedef DeleteOperationCallback
41630
42737
  * @type {function}
@@ -41657,7 +42764,7 @@
41657
42764
  */
41658
42765
 
41659
42766
  /**
41660
- * Callback as used by {@link google.longrunning.Operations#cancelOperation}.
42767
+ * Callback as used by {@link google.longrunning.Operations|cancelOperation}.
41661
42768
  * @memberof google.longrunning.Operations
41662
42769
  * @typedef CancelOperationCallback
41663
42770
  * @type {function}
@@ -41690,7 +42797,7 @@
41690
42797
  */
41691
42798
 
41692
42799
  /**
41693
- * Callback as used by {@link google.longrunning.Operations#waitOperation}.
42800
+ * Callback as used by {@link google.longrunning.Operations|waitOperation}.
41694
42801
  * @memberof google.longrunning.Operations
41695
42802
  * @typedef WaitOperationCallback
41696
42803
  * @type {function}
@@ -43568,7 +44675,7 @@
43568
44675
  };
43569
44676
 
43570
44677
  /**
43571
- * Callback as used by {@link google.iam.v1.IAMPolicy#setIamPolicy}.
44678
+ * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}.
43572
44679
  * @memberof google.iam.v1.IAMPolicy
43573
44680
  * @typedef SetIamPolicyCallback
43574
44681
  * @type {function}
@@ -43601,7 +44708,7 @@
43601
44708
  */
43602
44709
 
43603
44710
  /**
43604
- * Callback as used by {@link google.iam.v1.IAMPolicy#getIamPolicy}.
44711
+ * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}.
43605
44712
  * @memberof google.iam.v1.IAMPolicy
43606
44713
  * @typedef GetIamPolicyCallback
43607
44714
  * @type {function}
@@ -43634,7 +44741,7 @@
43634
44741
  */
43635
44742
 
43636
44743
  /**
43637
- * Callback as used by {@link google.iam.v1.IAMPolicy#testIamPermissions}.
44744
+ * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}.
43638
44745
  * @memberof google.iam.v1.IAMPolicy
43639
44746
  * @typedef TestIamPermissionsCallback
43640
44747
  * @type {function}
@@ -43677,6 +44784,7 @@
43677
44784
  * @interface ISetIamPolicyRequest
43678
44785
  * @property {string|null} [resource] SetIamPolicyRequest resource
43679
44786
  * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy
44787
+ * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask
43680
44788
  */
43681
44789
 
43682
44790
  /**
@@ -43710,6 +44818,14 @@
43710
44818
  */
43711
44819
  SetIamPolicyRequest.prototype.policy = null;
43712
44820
 
44821
+ /**
44822
+ * SetIamPolicyRequest updateMask.
44823
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
44824
+ * @memberof google.iam.v1.SetIamPolicyRequest
44825
+ * @instance
44826
+ */
44827
+ SetIamPolicyRequest.prototype.updateMask = null;
44828
+
43713
44829
  /**
43714
44830
  * Creates a new SetIamPolicyRequest instance using the specified properties.
43715
44831
  * @function create
@@ -43738,6 +44854,8 @@
43738
44854
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
43739
44855
  if (message.policy != null && Object.hasOwnProperty.call(message, "policy"))
43740
44856
  $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
44857
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
44858
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
43741
44859
  return writer;
43742
44860
  };
43743
44861
 
@@ -43778,6 +44896,9 @@
43778
44896
  case 2:
43779
44897
  message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32());
43780
44898
  break;
44899
+ case 3:
44900
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
44901
+ break;
43781
44902
  default:
43782
44903
  reader.skipType(tag & 7);
43783
44904
  break;
@@ -43821,6 +44942,11 @@
43821
44942
  if (error)
43822
44943
  return "policy." + error;
43823
44944
  }
44945
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
44946
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
44947
+ if (error)
44948
+ return "updateMask." + error;
44949
+ }
43824
44950
  return null;
43825
44951
  };
43826
44952
 
@@ -43843,6 +44969,11 @@
43843
44969
  throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected");
43844
44970
  message.policy = $root.google.iam.v1.Policy.fromObject(object.policy);
43845
44971
  }
44972
+ if (object.updateMask != null) {
44973
+ if (typeof object.updateMask !== "object")
44974
+ throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected");
44975
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
44976
+ }
43846
44977
  return message;
43847
44978
  };
43848
44979
 
@@ -43862,11 +44993,14 @@
43862
44993
  if (options.defaults) {
43863
44994
  object.resource = "";
43864
44995
  object.policy = null;
44996
+ object.updateMask = null;
43865
44997
  }
43866
44998
  if (message.resource != null && message.hasOwnProperty("resource"))
43867
44999
  object.resource = message.resource;
43868
45000
  if (message.policy != null && message.hasOwnProperty("policy"))
43869
45001
  object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options);
45002
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
45003
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
43870
45004
  return object;
43871
45005
  };
43872
45006
 
@@ -44723,6 +45857,7 @@
44723
45857
  * @interface IPolicy
44724
45858
  * @property {number|null} [version] Policy version
44725
45859
  * @property {Array.<google.iam.v1.IBinding>|null} [bindings] Policy bindings
45860
+ * @property {Array.<google.iam.v1.IAuditConfig>|null} [auditConfigs] Policy auditConfigs
44726
45861
  * @property {Uint8Array|null} [etag] Policy etag
44727
45862
  */
44728
45863
 
@@ -44736,6 +45871,7 @@
44736
45871
  */
44737
45872
  function Policy(properties) {
44738
45873
  this.bindings = [];
45874
+ this.auditConfigs = [];
44739
45875
  if (properties)
44740
45876
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
44741
45877
  if (properties[keys[i]] != null)
@@ -44758,6 +45894,14 @@
44758
45894
  */
44759
45895
  Policy.prototype.bindings = $util.emptyArray;
44760
45896
 
45897
+ /**
45898
+ * Policy auditConfigs.
45899
+ * @member {Array.<google.iam.v1.IAuditConfig>} auditConfigs
45900
+ * @memberof google.iam.v1.Policy
45901
+ * @instance
45902
+ */
45903
+ Policy.prototype.auditConfigs = $util.emptyArray;
45904
+
44761
45905
  /**
44762
45906
  * Policy etag.
44763
45907
  * @member {Uint8Array} etag
@@ -44797,6 +45941,9 @@
44797
45941
  if (message.bindings != null && message.bindings.length)
44798
45942
  for (var i = 0; i < message.bindings.length; ++i)
44799
45943
  $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
45944
+ if (message.auditConfigs != null && message.auditConfigs.length)
45945
+ for (var i = 0; i < message.auditConfigs.length; ++i)
45946
+ $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
44800
45947
  return writer;
44801
45948
  };
44802
45949
 
@@ -44839,6 +45986,11 @@
44839
45986
  message.bindings = [];
44840
45987
  message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32()));
44841
45988
  break;
45989
+ case 6:
45990
+ if (!(message.auditConfigs && message.auditConfigs.length))
45991
+ message.auditConfigs = [];
45992
+ message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32()));
45993
+ break;
44842
45994
  case 3:
44843
45995
  message.etag = reader.bytes();
44844
45996
  break;
@@ -44889,6 +46041,15 @@
44889
46041
  return "bindings." + error;
44890
46042
  }
44891
46043
  }
46044
+ if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) {
46045
+ if (!Array.isArray(message.auditConfigs))
46046
+ return "auditConfigs: array expected";
46047
+ for (var i = 0; i < message.auditConfigs.length; ++i) {
46048
+ var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]);
46049
+ if (error)
46050
+ return "auditConfigs." + error;
46051
+ }
46052
+ }
44892
46053
  if (message.etag != null && message.hasOwnProperty("etag"))
44893
46054
  if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag)))
44894
46055
  return "etag: buffer expected";
@@ -44919,6 +46080,16 @@
44919
46080
  message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]);
44920
46081
  }
44921
46082
  }
46083
+ if (object.auditConfigs) {
46084
+ if (!Array.isArray(object.auditConfigs))
46085
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected");
46086
+ message.auditConfigs = [];
46087
+ for (var i = 0; i < object.auditConfigs.length; ++i) {
46088
+ if (typeof object.auditConfigs[i] !== "object")
46089
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected");
46090
+ message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]);
46091
+ }
46092
+ }
44922
46093
  if (object.etag != null)
44923
46094
  if (typeof object.etag === "string")
44924
46095
  $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0);
@@ -44940,8 +46111,10 @@
44940
46111
  if (!options)
44941
46112
  options = {};
44942
46113
  var object = {};
44943
- if (options.arrays || options.defaults)
46114
+ if (options.arrays || options.defaults) {
44944
46115
  object.bindings = [];
46116
+ object.auditConfigs = [];
46117
+ }
44945
46118
  if (options.defaults) {
44946
46119
  object.version = 0;
44947
46120
  if (options.bytes === String)
@@ -44961,6 +46134,11 @@
44961
46134
  for (var j = 0; j < message.bindings.length; ++j)
44962
46135
  object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options);
44963
46136
  }
46137
+ if (message.auditConfigs && message.auditConfigs.length) {
46138
+ object.auditConfigs = [];
46139
+ for (var j = 0; j < message.auditConfigs.length; ++j)
46140
+ object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options);
46141
+ }
44964
46142
  return object;
44965
46143
  };
44966
46144
 
@@ -45232,6 +46410,504 @@
45232
46410
  return Binding;
45233
46411
  })();
45234
46412
 
46413
+ v1.AuditConfig = (function() {
46414
+
46415
+ /**
46416
+ * Properties of an AuditConfig.
46417
+ * @memberof google.iam.v1
46418
+ * @interface IAuditConfig
46419
+ * @property {string|null} [service] AuditConfig service
46420
+ * @property {Array.<google.iam.v1.IAuditLogConfig>|null} [auditLogConfigs] AuditConfig auditLogConfigs
46421
+ */
46422
+
46423
+ /**
46424
+ * Constructs a new AuditConfig.
46425
+ * @memberof google.iam.v1
46426
+ * @classdesc Represents an AuditConfig.
46427
+ * @implements IAuditConfig
46428
+ * @constructor
46429
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
46430
+ */
46431
+ function AuditConfig(properties) {
46432
+ this.auditLogConfigs = [];
46433
+ if (properties)
46434
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46435
+ if (properties[keys[i]] != null)
46436
+ this[keys[i]] = properties[keys[i]];
46437
+ }
46438
+
46439
+ /**
46440
+ * AuditConfig service.
46441
+ * @member {string} service
46442
+ * @memberof google.iam.v1.AuditConfig
46443
+ * @instance
46444
+ */
46445
+ AuditConfig.prototype.service = "";
46446
+
46447
+ /**
46448
+ * AuditConfig auditLogConfigs.
46449
+ * @member {Array.<google.iam.v1.IAuditLogConfig>} auditLogConfigs
46450
+ * @memberof google.iam.v1.AuditConfig
46451
+ * @instance
46452
+ */
46453
+ AuditConfig.prototype.auditLogConfigs = $util.emptyArray;
46454
+
46455
+ /**
46456
+ * Creates a new AuditConfig instance using the specified properties.
46457
+ * @function create
46458
+ * @memberof google.iam.v1.AuditConfig
46459
+ * @static
46460
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
46461
+ * @returns {google.iam.v1.AuditConfig} AuditConfig instance
46462
+ */
46463
+ AuditConfig.create = function create(properties) {
46464
+ return new AuditConfig(properties);
46465
+ };
46466
+
46467
+ /**
46468
+ * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
46469
+ * @function encode
46470
+ * @memberof google.iam.v1.AuditConfig
46471
+ * @static
46472
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
46473
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46474
+ * @returns {$protobuf.Writer} Writer
46475
+ */
46476
+ AuditConfig.encode = function encode(message, writer) {
46477
+ if (!writer)
46478
+ writer = $Writer.create();
46479
+ if (message.service != null && Object.hasOwnProperty.call(message, "service"))
46480
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.service);
46481
+ if (message.auditLogConfigs != null && message.auditLogConfigs.length)
46482
+ for (var i = 0; i < message.auditLogConfigs.length; ++i)
46483
+ $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
46484
+ return writer;
46485
+ };
46486
+
46487
+ /**
46488
+ * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
46489
+ * @function encodeDelimited
46490
+ * @memberof google.iam.v1.AuditConfig
46491
+ * @static
46492
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
46493
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46494
+ * @returns {$protobuf.Writer} Writer
46495
+ */
46496
+ AuditConfig.encodeDelimited = function encodeDelimited(message, writer) {
46497
+ return this.encode(message, writer).ldelim();
46498
+ };
46499
+
46500
+ /**
46501
+ * Decodes an AuditConfig message from the specified reader or buffer.
46502
+ * @function decode
46503
+ * @memberof google.iam.v1.AuditConfig
46504
+ * @static
46505
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46506
+ * @param {number} [length] Message length if known beforehand
46507
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46508
+ * @throws {Error} If the payload is not a reader or valid buffer
46509
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46510
+ */
46511
+ AuditConfig.decode = function decode(reader, length) {
46512
+ if (!(reader instanceof $Reader))
46513
+ reader = $Reader.create(reader);
46514
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig();
46515
+ while (reader.pos < end) {
46516
+ var tag = reader.uint32();
46517
+ switch (tag >>> 3) {
46518
+ case 1:
46519
+ message.service = reader.string();
46520
+ break;
46521
+ case 3:
46522
+ if (!(message.auditLogConfigs && message.auditLogConfigs.length))
46523
+ message.auditLogConfigs = [];
46524
+ message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32()));
46525
+ break;
46526
+ default:
46527
+ reader.skipType(tag & 7);
46528
+ break;
46529
+ }
46530
+ }
46531
+ return message;
46532
+ };
46533
+
46534
+ /**
46535
+ * Decodes an AuditConfig message from the specified reader or buffer, length delimited.
46536
+ * @function decodeDelimited
46537
+ * @memberof google.iam.v1.AuditConfig
46538
+ * @static
46539
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46540
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46541
+ * @throws {Error} If the payload is not a reader or valid buffer
46542
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46543
+ */
46544
+ AuditConfig.decodeDelimited = function decodeDelimited(reader) {
46545
+ if (!(reader instanceof $Reader))
46546
+ reader = new $Reader(reader);
46547
+ return this.decode(reader, reader.uint32());
46548
+ };
46549
+
46550
+ /**
46551
+ * Verifies an AuditConfig message.
46552
+ * @function verify
46553
+ * @memberof google.iam.v1.AuditConfig
46554
+ * @static
46555
+ * @param {Object.<string,*>} message Plain object to verify
46556
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46557
+ */
46558
+ AuditConfig.verify = function verify(message) {
46559
+ if (typeof message !== "object" || message === null)
46560
+ return "object expected";
46561
+ if (message.service != null && message.hasOwnProperty("service"))
46562
+ if (!$util.isString(message.service))
46563
+ return "service: string expected";
46564
+ if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) {
46565
+ if (!Array.isArray(message.auditLogConfigs))
46566
+ return "auditLogConfigs: array expected";
46567
+ for (var i = 0; i < message.auditLogConfigs.length; ++i) {
46568
+ var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]);
46569
+ if (error)
46570
+ return "auditLogConfigs." + error;
46571
+ }
46572
+ }
46573
+ return null;
46574
+ };
46575
+
46576
+ /**
46577
+ * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types.
46578
+ * @function fromObject
46579
+ * @memberof google.iam.v1.AuditConfig
46580
+ * @static
46581
+ * @param {Object.<string,*>} object Plain object
46582
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46583
+ */
46584
+ AuditConfig.fromObject = function fromObject(object) {
46585
+ if (object instanceof $root.google.iam.v1.AuditConfig)
46586
+ return object;
46587
+ var message = new $root.google.iam.v1.AuditConfig();
46588
+ if (object.service != null)
46589
+ message.service = String(object.service);
46590
+ if (object.auditLogConfigs) {
46591
+ if (!Array.isArray(object.auditLogConfigs))
46592
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected");
46593
+ message.auditLogConfigs = [];
46594
+ for (var i = 0; i < object.auditLogConfigs.length; ++i) {
46595
+ if (typeof object.auditLogConfigs[i] !== "object")
46596
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected");
46597
+ message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]);
46598
+ }
46599
+ }
46600
+ return message;
46601
+ };
46602
+
46603
+ /**
46604
+ * Creates a plain object from an AuditConfig message. Also converts values to other types if specified.
46605
+ * @function toObject
46606
+ * @memberof google.iam.v1.AuditConfig
46607
+ * @static
46608
+ * @param {google.iam.v1.AuditConfig} message AuditConfig
46609
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46610
+ * @returns {Object.<string,*>} Plain object
46611
+ */
46612
+ AuditConfig.toObject = function toObject(message, options) {
46613
+ if (!options)
46614
+ options = {};
46615
+ var object = {};
46616
+ if (options.arrays || options.defaults)
46617
+ object.auditLogConfigs = [];
46618
+ if (options.defaults)
46619
+ object.service = "";
46620
+ if (message.service != null && message.hasOwnProperty("service"))
46621
+ object.service = message.service;
46622
+ if (message.auditLogConfigs && message.auditLogConfigs.length) {
46623
+ object.auditLogConfigs = [];
46624
+ for (var j = 0; j < message.auditLogConfigs.length; ++j)
46625
+ object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options);
46626
+ }
46627
+ return object;
46628
+ };
46629
+
46630
+ /**
46631
+ * Converts this AuditConfig to JSON.
46632
+ * @function toJSON
46633
+ * @memberof google.iam.v1.AuditConfig
46634
+ * @instance
46635
+ * @returns {Object.<string,*>} JSON object
46636
+ */
46637
+ AuditConfig.prototype.toJSON = function toJSON() {
46638
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46639
+ };
46640
+
46641
+ return AuditConfig;
46642
+ })();
46643
+
46644
+ v1.AuditLogConfig = (function() {
46645
+
46646
+ /**
46647
+ * Properties of an AuditLogConfig.
46648
+ * @memberof google.iam.v1
46649
+ * @interface IAuditLogConfig
46650
+ * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType
46651
+ * @property {Array.<string>|null} [exemptedMembers] AuditLogConfig exemptedMembers
46652
+ */
46653
+
46654
+ /**
46655
+ * Constructs a new AuditLogConfig.
46656
+ * @memberof google.iam.v1
46657
+ * @classdesc Represents an AuditLogConfig.
46658
+ * @implements IAuditLogConfig
46659
+ * @constructor
46660
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
46661
+ */
46662
+ function AuditLogConfig(properties) {
46663
+ this.exemptedMembers = [];
46664
+ if (properties)
46665
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46666
+ if (properties[keys[i]] != null)
46667
+ this[keys[i]] = properties[keys[i]];
46668
+ }
46669
+
46670
+ /**
46671
+ * AuditLogConfig logType.
46672
+ * @member {google.iam.v1.AuditLogConfig.LogType} logType
46673
+ * @memberof google.iam.v1.AuditLogConfig
46674
+ * @instance
46675
+ */
46676
+ AuditLogConfig.prototype.logType = 0;
46677
+
46678
+ /**
46679
+ * AuditLogConfig exemptedMembers.
46680
+ * @member {Array.<string>} exemptedMembers
46681
+ * @memberof google.iam.v1.AuditLogConfig
46682
+ * @instance
46683
+ */
46684
+ AuditLogConfig.prototype.exemptedMembers = $util.emptyArray;
46685
+
46686
+ /**
46687
+ * Creates a new AuditLogConfig instance using the specified properties.
46688
+ * @function create
46689
+ * @memberof google.iam.v1.AuditLogConfig
46690
+ * @static
46691
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
46692
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance
46693
+ */
46694
+ AuditLogConfig.create = function create(properties) {
46695
+ return new AuditLogConfig(properties);
46696
+ };
46697
+
46698
+ /**
46699
+ * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
46700
+ * @function encode
46701
+ * @memberof google.iam.v1.AuditLogConfig
46702
+ * @static
46703
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
46704
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46705
+ * @returns {$protobuf.Writer} Writer
46706
+ */
46707
+ AuditLogConfig.encode = function encode(message, writer) {
46708
+ if (!writer)
46709
+ writer = $Writer.create();
46710
+ if (message.logType != null && Object.hasOwnProperty.call(message, "logType"))
46711
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType);
46712
+ if (message.exemptedMembers != null && message.exemptedMembers.length)
46713
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
46714
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]);
46715
+ return writer;
46716
+ };
46717
+
46718
+ /**
46719
+ * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
46720
+ * @function encodeDelimited
46721
+ * @memberof google.iam.v1.AuditLogConfig
46722
+ * @static
46723
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
46724
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46725
+ * @returns {$protobuf.Writer} Writer
46726
+ */
46727
+ AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) {
46728
+ return this.encode(message, writer).ldelim();
46729
+ };
46730
+
46731
+ /**
46732
+ * Decodes an AuditLogConfig message from the specified reader or buffer.
46733
+ * @function decode
46734
+ * @memberof google.iam.v1.AuditLogConfig
46735
+ * @static
46736
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46737
+ * @param {number} [length] Message length if known beforehand
46738
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46739
+ * @throws {Error} If the payload is not a reader or valid buffer
46740
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46741
+ */
46742
+ AuditLogConfig.decode = function decode(reader, length) {
46743
+ if (!(reader instanceof $Reader))
46744
+ reader = $Reader.create(reader);
46745
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig();
46746
+ while (reader.pos < end) {
46747
+ var tag = reader.uint32();
46748
+ switch (tag >>> 3) {
46749
+ case 1:
46750
+ message.logType = reader.int32();
46751
+ break;
46752
+ case 2:
46753
+ if (!(message.exemptedMembers && message.exemptedMembers.length))
46754
+ message.exemptedMembers = [];
46755
+ message.exemptedMembers.push(reader.string());
46756
+ break;
46757
+ default:
46758
+ reader.skipType(tag & 7);
46759
+ break;
46760
+ }
46761
+ }
46762
+ return message;
46763
+ };
46764
+
46765
+ /**
46766
+ * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited.
46767
+ * @function decodeDelimited
46768
+ * @memberof google.iam.v1.AuditLogConfig
46769
+ * @static
46770
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46771
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46772
+ * @throws {Error} If the payload is not a reader or valid buffer
46773
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46774
+ */
46775
+ AuditLogConfig.decodeDelimited = function decodeDelimited(reader) {
46776
+ if (!(reader instanceof $Reader))
46777
+ reader = new $Reader(reader);
46778
+ return this.decode(reader, reader.uint32());
46779
+ };
46780
+
46781
+ /**
46782
+ * Verifies an AuditLogConfig message.
46783
+ * @function verify
46784
+ * @memberof google.iam.v1.AuditLogConfig
46785
+ * @static
46786
+ * @param {Object.<string,*>} message Plain object to verify
46787
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46788
+ */
46789
+ AuditLogConfig.verify = function verify(message) {
46790
+ if (typeof message !== "object" || message === null)
46791
+ return "object expected";
46792
+ if (message.logType != null && message.hasOwnProperty("logType"))
46793
+ switch (message.logType) {
46794
+ default:
46795
+ return "logType: enum value expected";
46796
+ case 0:
46797
+ case 1:
46798
+ case 2:
46799
+ case 3:
46800
+ break;
46801
+ }
46802
+ if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) {
46803
+ if (!Array.isArray(message.exemptedMembers))
46804
+ return "exemptedMembers: array expected";
46805
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
46806
+ if (!$util.isString(message.exemptedMembers[i]))
46807
+ return "exemptedMembers: string[] expected";
46808
+ }
46809
+ return null;
46810
+ };
46811
+
46812
+ /**
46813
+ * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types.
46814
+ * @function fromObject
46815
+ * @memberof google.iam.v1.AuditLogConfig
46816
+ * @static
46817
+ * @param {Object.<string,*>} object Plain object
46818
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46819
+ */
46820
+ AuditLogConfig.fromObject = function fromObject(object) {
46821
+ if (object instanceof $root.google.iam.v1.AuditLogConfig)
46822
+ return object;
46823
+ var message = new $root.google.iam.v1.AuditLogConfig();
46824
+ switch (object.logType) {
46825
+ case "LOG_TYPE_UNSPECIFIED":
46826
+ case 0:
46827
+ message.logType = 0;
46828
+ break;
46829
+ case "ADMIN_READ":
46830
+ case 1:
46831
+ message.logType = 1;
46832
+ break;
46833
+ case "DATA_WRITE":
46834
+ case 2:
46835
+ message.logType = 2;
46836
+ break;
46837
+ case "DATA_READ":
46838
+ case 3:
46839
+ message.logType = 3;
46840
+ break;
46841
+ }
46842
+ if (object.exemptedMembers) {
46843
+ if (!Array.isArray(object.exemptedMembers))
46844
+ throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected");
46845
+ message.exemptedMembers = [];
46846
+ for (var i = 0; i < object.exemptedMembers.length; ++i)
46847
+ message.exemptedMembers[i] = String(object.exemptedMembers[i]);
46848
+ }
46849
+ return message;
46850
+ };
46851
+
46852
+ /**
46853
+ * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified.
46854
+ * @function toObject
46855
+ * @memberof google.iam.v1.AuditLogConfig
46856
+ * @static
46857
+ * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig
46858
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46859
+ * @returns {Object.<string,*>} Plain object
46860
+ */
46861
+ AuditLogConfig.toObject = function toObject(message, options) {
46862
+ if (!options)
46863
+ options = {};
46864
+ var object = {};
46865
+ if (options.arrays || options.defaults)
46866
+ object.exemptedMembers = [];
46867
+ if (options.defaults)
46868
+ object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0;
46869
+ if (message.logType != null && message.hasOwnProperty("logType"))
46870
+ object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType;
46871
+ if (message.exemptedMembers && message.exemptedMembers.length) {
46872
+ object.exemptedMembers = [];
46873
+ for (var j = 0; j < message.exemptedMembers.length; ++j)
46874
+ object.exemptedMembers[j] = message.exemptedMembers[j];
46875
+ }
46876
+ return object;
46877
+ };
46878
+
46879
+ /**
46880
+ * Converts this AuditLogConfig to JSON.
46881
+ * @function toJSON
46882
+ * @memberof google.iam.v1.AuditLogConfig
46883
+ * @instance
46884
+ * @returns {Object.<string,*>} JSON object
46885
+ */
46886
+ AuditLogConfig.prototype.toJSON = function toJSON() {
46887
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46888
+ };
46889
+
46890
+ /**
46891
+ * LogType enum.
46892
+ * @name google.iam.v1.AuditLogConfig.LogType
46893
+ * @enum {number}
46894
+ * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value
46895
+ * @property {number} ADMIN_READ=1 ADMIN_READ value
46896
+ * @property {number} DATA_WRITE=2 DATA_WRITE value
46897
+ * @property {number} DATA_READ=3 DATA_READ value
46898
+ */
46899
+ AuditLogConfig.LogType = (function() {
46900
+ var valuesById = {}, values = Object.create(valuesById);
46901
+ values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0;
46902
+ values[valuesById[1] = "ADMIN_READ"] = 1;
46903
+ values[valuesById[2] = "DATA_WRITE"] = 2;
46904
+ values[valuesById[3] = "DATA_READ"] = 3;
46905
+ return values;
46906
+ })();
46907
+
46908
+ return AuditLogConfig;
46909
+ })();
46910
+
45235
46911
  v1.PolicyDelta = (function() {
45236
46912
 
45237
46913
  /**