@google-cloud/spanner 5.17.0 → 6.1.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 +16 -0
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +174 -9
  4. package/build/protos/google/spanner/admin/database/v1/common.proto +1 -2
  5. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +27 -2
  6. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +22 -10
  7. package/build/protos/google/spanner/v1/commit_response.proto +1 -3
  8. package/build/protos/google/spanner/v1/keys.proto +1 -2
  9. package/build/protos/google/spanner/v1/mutation.proto +1 -2
  10. package/build/protos/google/spanner/v1/query_plan.proto +1 -2
  11. package/build/protos/google/spanner/v1/result_set.proto +1 -3
  12. package/build/protos/google/spanner/v1/spanner.proto +4 -1
  13. package/build/protos/google/spanner/v1/transaction.proto +73 -22
  14. package/build/protos/google/spanner/v1/type.proto +1 -2
  15. package/build/protos/protos.d.ts +883 -282
  16. package/build/protos/protos.js +2447 -880
  17. package/build/protos/protos.json +297 -87
  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 +12 -1
  22. package/build/src/codec.js +44 -13
  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 +41 -1
  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 +267 -30
  40. package/build/src/v1/database_admin_client.js +148 -13
  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 +63 -18
  44. package/build/src/v1/instance_admin_client.js +42 -9
  45. package/build/src/v1/spanner_client.d.ts +70 -19
  46. package/build/src/v1/spanner_client.js +7 -8
  47. package/package.json +12 -12
@@ -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)
@@ -13979,6 +14001,8 @@
13979
14001
  * @property {Array.<string>|null} [referencingDatabases] Backup referencingDatabases
13980
14002
  * @property {google.spanner.admin.database.v1.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo
13981
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
13982
14006
  */
13983
14007
 
13984
14008
  /**
@@ -13991,6 +14015,7 @@
13991
14015
  */
13992
14016
  function Backup(properties) {
13993
14017
  this.referencingDatabases = [];
14018
+ this.referencingBackups = [];
13994
14019
  if (properties)
13995
14020
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
13996
14021
  if (properties[keys[i]] != null)
@@ -14077,6 +14102,22 @@
14077
14102
  */
14078
14103
  Backup.prototype.databaseDialect = 0;
14079
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
+
14080
14121
  /**
14081
14122
  * Creates a new Backup instance using the specified properties.
14082
14123
  * @function create
@@ -14122,6 +14163,11 @@
14122
14163
  $root.google.protobuf.Timestamp.encode(message.versionTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
14123
14164
  if (message.databaseDialect != null && Object.hasOwnProperty.call(message, "databaseDialect"))
14124
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();
14125
14171
  return writer;
14126
14172
  };
14127
14173
 
@@ -14188,6 +14234,14 @@
14188
14234
  case 10:
14189
14235
  message.databaseDialect = reader.int32();
14190
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;
14191
14245
  default:
14192
14246
  reader.skipType(tag & 7);
14193
14247
  break;
@@ -14277,6 +14331,18 @@
14277
14331
  case 2:
14278
14332
  break;
14279
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
+ }
14280
14346
  return null;
14281
14347
  };
14282
14348
 
@@ -14360,6 +14426,18 @@
14360
14426
  message.databaseDialect = 2;
14361
14427
  break;
14362
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
+ }
14363
14441
  return message;
14364
14442
  };
14365
14443
 
@@ -14376,8 +14454,10 @@
14376
14454
  if (!options)
14377
14455
  options = {};
14378
14456
  var object = {};
14379
- if (options.arrays || options.defaults)
14457
+ if (options.arrays || options.defaults) {
14380
14458
  object.referencingDatabases = [];
14459
+ object.referencingBackups = [];
14460
+ }
14381
14461
  if (options.defaults) {
14382
14462
  object.name = "";
14383
14463
  object.database = "";
@@ -14392,6 +14472,7 @@
14392
14472
  object.encryptionInfo = null;
14393
14473
  object.versionTime = null;
14394
14474
  object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0;
14475
+ object.maxExpireTime = null;
14395
14476
  }
14396
14477
  if (message.name != null && message.hasOwnProperty("name"))
14397
14478
  object.name = message.name;
@@ -14419,6 +14500,13 @@
14419
14500
  object.versionTime = $root.google.protobuf.Timestamp.toObject(message.versionTime, options);
14420
14501
  if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
14421
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);
14422
14510
  return object;
14423
14511
  };
14424
14512
 
@@ -14980,6 +15068,556 @@
14980
15068
  return CreateBackupMetadata;
14981
15069
  })();
14982
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
+
14983
15621
  v1.UpdateBackupRequest = (function() {
14984
15622
 
14985
15623
  /**
@@ -17059,6 +17697,257 @@
17059
17697
  return CreateBackupEncryptionConfig;
17060
17698
  })();
17061
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
+
17062
17951
  v1.OperationProgress = (function() {
17063
17952
 
17064
17953
  /**
@@ -18137,6 +19026,39 @@
18137
19026
  * @variation 2
18138
19027
  */
18139
19028
 
19029
+ /**
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
+
18140
19062
  /**
18141
19063
  * Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|getBackup}.
18142
19064
  * @memberof google.spanner.admin.database.v1.DatabaseAdmin
@@ -23978,6 +24900,8 @@
23978
24900
  * @property {google.spanner.admin.instance.v1.Instance.State|null} [state] Instance state
23979
24901
  * @property {Object.<string,string>|null} [labels] Instance labels
23980
24902
  * @property {Array.<string>|null} [endpointUris] Instance endpointUris
24903
+ * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime
24904
+ * @property {google.protobuf.ITimestamp|null} [updateTime] Instance updateTime
23981
24905
  */
23982
24906
 
23983
24907
  /**
@@ -24061,6 +24985,22 @@
24061
24985
  */
24062
24986
  Instance.prototype.endpointUris = $util.emptyArray;
24063
24987
 
24988
+ /**
24989
+ * Instance createTime.
24990
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
24991
+ * @memberof google.spanner.admin.instance.v1.Instance
24992
+ * @instance
24993
+ */
24994
+ Instance.prototype.createTime = null;
24995
+
24996
+ /**
24997
+ * Instance updateTime.
24998
+ * @member {google.protobuf.ITimestamp|null|undefined} updateTime
24999
+ * @memberof google.spanner.admin.instance.v1.Instance
25000
+ * @instance
25001
+ */
25002
+ Instance.prototype.updateTime = null;
25003
+
24064
25004
  /**
24065
25005
  * Creates a new Instance instance using the specified properties.
24066
25006
  * @function create
@@ -24103,6 +25043,10 @@
24103
25043
  writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUris[i]);
24104
25044
  if (message.processingUnits != null && Object.hasOwnProperty.call(message, "processingUnits"))
24105
25045
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.processingUnits);
25046
+ if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
25047
+ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
25048
+ if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
25049
+ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
24106
25050
  return writer;
24107
25051
  };
24108
25052
 
@@ -24182,6 +25126,12 @@
24182
25126
  message.endpointUris = [];
24183
25127
  message.endpointUris.push(reader.string());
24184
25128
  break;
25129
+ case 11:
25130
+ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
25131
+ break;
25132
+ case 12:
25133
+ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
25134
+ break;
24185
25135
  default:
24186
25136
  reader.skipType(tag & 7);
24187
25137
  break;
@@ -24256,6 +25206,16 @@
24256
25206
  if (!$util.isString(message.endpointUris[i]))
24257
25207
  return "endpointUris: string[] expected";
24258
25208
  }
25209
+ if (message.createTime != null && message.hasOwnProperty("createTime")) {
25210
+ var error = $root.google.protobuf.Timestamp.verify(message.createTime);
25211
+ if (error)
25212
+ return "createTime." + error;
25213
+ }
25214
+ if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
25215
+ var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
25216
+ if (error)
25217
+ return "updateTime." + error;
25218
+ }
24259
25219
  return null;
24260
25220
  };
24261
25221
 
@@ -24309,6 +25269,16 @@
24309
25269
  for (var i = 0; i < object.endpointUris.length; ++i)
24310
25270
  message.endpointUris[i] = String(object.endpointUris[i]);
24311
25271
  }
25272
+ if (object.createTime != null) {
25273
+ if (typeof object.createTime !== "object")
25274
+ throw TypeError(".google.spanner.admin.instance.v1.Instance.createTime: object expected");
25275
+ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
25276
+ }
25277
+ if (object.updateTime != null) {
25278
+ if (typeof object.updateTime !== "object")
25279
+ throw TypeError(".google.spanner.admin.instance.v1.Instance.updateTime: object expected");
25280
+ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
25281
+ }
24312
25282
  return message;
24313
25283
  };
24314
25284
 
@@ -24336,6 +25306,8 @@
24336
25306
  object.nodeCount = 0;
24337
25307
  object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
24338
25308
  object.processingUnits = 0;
25309
+ object.createTime = null;
25310
+ object.updateTime = null;
24339
25311
  }
24340
25312
  if (message.name != null && message.hasOwnProperty("name"))
24341
25313
  object.name = message.name;
@@ -24360,6 +25332,10 @@
24360
25332
  }
24361
25333
  if (message.processingUnits != null && message.hasOwnProperty("processingUnits"))
24362
25334
  object.processingUnits = message.processingUnits;
25335
+ if (message.createTime != null && message.hasOwnProperty("createTime"))
25336
+ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
25337
+ if (message.updateTime != null && message.hasOwnProperty("updateTime"))
25338
+ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
24363
25339
  return object;
24364
25340
  };
24365
25341
 
@@ -34463,6 +35439,7 @@
34463
35439
  * @property {Object.<string,string>|null} [labels] Session labels
34464
35440
  * @property {google.protobuf.ITimestamp|null} [createTime] Session createTime
34465
35441
  * @property {google.protobuf.ITimestamp|null} [approximateLastUseTime] Session approximateLastUseTime
35442
+ * @property {string|null} [creatorRole] Session creatorRole
34466
35443
  */
34467
35444
 
34468
35445
  /**
@@ -34513,6 +35490,14 @@
34513
35490
  */
34514
35491
  Session.prototype.approximateLastUseTime = null;
34515
35492
 
35493
+ /**
35494
+ * Session creatorRole.
35495
+ * @member {string} creatorRole
35496
+ * @memberof google.spanner.v1.Session
35497
+ * @instance
35498
+ */
35499
+ Session.prototype.creatorRole = "";
35500
+
34516
35501
  /**
34517
35502
  * Creates a new Session instance using the specified properties.
34518
35503
  * @function create
@@ -34546,6 +35531,8 @@
34546
35531
  $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
34547
35532
  if (message.approximateLastUseTime != null && Object.hasOwnProperty.call(message, "approximateLastUseTime"))
34548
35533
  $root.google.protobuf.Timestamp.encode(message.approximateLastUseTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
35534
+ if (message.creatorRole != null && Object.hasOwnProperty.call(message, "creatorRole"))
35535
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.creatorRole);
34549
35536
  return writer;
34550
35537
  };
34551
35538
 
@@ -34611,6 +35598,9 @@
34611
35598
  case 4:
34612
35599
  message.approximateLastUseTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
34613
35600
  break;
35601
+ case 5:
35602
+ message.creatorRole = reader.string();
35603
+ break;
34614
35604
  default:
34615
35605
  reader.skipType(tag & 7);
34616
35606
  break;
@@ -34667,6 +35657,9 @@
34667
35657
  if (error)
34668
35658
  return "approximateLastUseTime." + error;
34669
35659
  }
35660
+ if (message.creatorRole != null && message.hasOwnProperty("creatorRole"))
35661
+ if (!$util.isString(message.creatorRole))
35662
+ return "creatorRole: string expected";
34670
35663
  return null;
34671
35664
  };
34672
35665
 
@@ -34701,6 +35694,8 @@
34701
35694
  throw TypeError(".google.spanner.v1.Session.approximateLastUseTime: object expected");
34702
35695
  message.approximateLastUseTime = $root.google.protobuf.Timestamp.fromObject(object.approximateLastUseTime);
34703
35696
  }
35697
+ if (object.creatorRole != null)
35698
+ message.creatorRole = String(object.creatorRole);
34704
35699
  return message;
34705
35700
  };
34706
35701
 
@@ -34723,6 +35718,7 @@
34723
35718
  object.name = "";
34724
35719
  object.createTime = null;
34725
35720
  object.approximateLastUseTime = null;
35721
+ object.creatorRole = "";
34726
35722
  }
34727
35723
  if (message.name != null && message.hasOwnProperty("name"))
34728
35724
  object.name = message.name;
@@ -34736,6 +35732,8 @@
34736
35732
  object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
34737
35733
  if (message.approximateLastUseTime != null && message.hasOwnProperty("approximateLastUseTime"))
34738
35734
  object.approximateLastUseTime = $root.google.protobuf.Timestamp.toObject(message.approximateLastUseTime, options);
35735
+ if (message.creatorRole != null && message.hasOwnProperty("creatorRole"))
35736
+ object.creatorRole = message.creatorRole;
34739
35737
  return object;
34740
35738
  };
34741
35739
 
@@ -40133,26 +41131,58 @@
40133
41131
  */
40134
41132
  var api = {};
40135
41133
 
40136
- api.Http = (function() {
41134
+ /**
41135
+ * FieldBehavior enum.
41136
+ * @name google.api.FieldBehavior
41137
+ * @enum {number}
41138
+ * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value
41139
+ * @property {number} OPTIONAL=1 OPTIONAL value
41140
+ * @property {number} REQUIRED=2 REQUIRED value
41141
+ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value
41142
+ * @property {number} INPUT_ONLY=4 INPUT_ONLY value
41143
+ * @property {number} IMMUTABLE=5 IMMUTABLE value
41144
+ * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value
41145
+ * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value
41146
+ */
41147
+ api.FieldBehavior = (function() {
41148
+ var valuesById = {}, values = Object.create(valuesById);
41149
+ values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0;
41150
+ values[valuesById[1] = "OPTIONAL"] = 1;
41151
+ values[valuesById[2] = "REQUIRED"] = 2;
41152
+ values[valuesById[3] = "OUTPUT_ONLY"] = 3;
41153
+ values[valuesById[4] = "INPUT_ONLY"] = 4;
41154
+ values[valuesById[5] = "IMMUTABLE"] = 5;
41155
+ values[valuesById[6] = "UNORDERED_LIST"] = 6;
41156
+ values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7;
41157
+ return values;
41158
+ })();
41159
+
41160
+ api.ResourceDescriptor = (function() {
40137
41161
 
40138
41162
  /**
40139
- * Properties of a Http.
41163
+ * Properties of a ResourceDescriptor.
40140
41164
  * @memberof google.api
40141
- * @interface IHttp
40142
- * @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
40143
- * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
41165
+ * @interface IResourceDescriptor
41166
+ * @property {string|null} [type] ResourceDescriptor type
41167
+ * @property {Array.<string>|null} [pattern] ResourceDescriptor pattern
41168
+ * @property {string|null} [nameField] ResourceDescriptor nameField
41169
+ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history
41170
+ * @property {string|null} [plural] ResourceDescriptor plural
41171
+ * @property {string|null} [singular] ResourceDescriptor singular
41172
+ * @property {Array.<google.api.ResourceDescriptor.Style>|null} [style] ResourceDescriptor style
40144
41173
  */
40145
41174
 
40146
41175
  /**
40147
- * Constructs a new Http.
41176
+ * Constructs a new ResourceDescriptor.
40148
41177
  * @memberof google.api
40149
- * @classdesc Represents a Http.
40150
- * @implements IHttp
41178
+ * @classdesc Represents a ResourceDescriptor.
41179
+ * @implements IResourceDescriptor
40151
41180
  * @constructor
40152
- * @param {google.api.IHttp=} [properties] Properties to set
41181
+ * @param {google.api.IResourceDescriptor=} [properties] Properties to set
40153
41182
  */
40154
- function Http(properties) {
40155
- this.rules = [];
41183
+ function ResourceDescriptor(properties) {
41184
+ this.pattern = [];
41185
+ this.style = [];
40156
41186
  if (properties)
40157
41187
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
40158
41188
  if (properties[keys[i]] != null)
@@ -40160,91 +41190,167 @@
40160
41190
  }
40161
41191
 
40162
41192
  /**
40163
- * Http rules.
40164
- * @member {Array.<google.api.IHttpRule>} rules
40165
- * @memberof google.api.Http
41193
+ * ResourceDescriptor type.
41194
+ * @member {string} type
41195
+ * @memberof google.api.ResourceDescriptor
40166
41196
  * @instance
40167
41197
  */
40168
- Http.prototype.rules = $util.emptyArray;
41198
+ ResourceDescriptor.prototype.type = "";
40169
41199
 
40170
41200
  /**
40171
- * Http fullyDecodeReservedExpansion.
40172
- * @member {boolean} fullyDecodeReservedExpansion
40173
- * @memberof google.api.Http
41201
+ * ResourceDescriptor pattern.
41202
+ * @member {Array.<string>} pattern
41203
+ * @memberof google.api.ResourceDescriptor
40174
41204
  * @instance
40175
41205
  */
40176
- Http.prototype.fullyDecodeReservedExpansion = false;
41206
+ ResourceDescriptor.prototype.pattern = $util.emptyArray;
40177
41207
 
40178
41208
  /**
40179
- * Creates a new Http instance using the specified properties.
41209
+ * ResourceDescriptor nameField.
41210
+ * @member {string} nameField
41211
+ * @memberof google.api.ResourceDescriptor
41212
+ * @instance
41213
+ */
41214
+ ResourceDescriptor.prototype.nameField = "";
41215
+
41216
+ /**
41217
+ * ResourceDescriptor history.
41218
+ * @member {google.api.ResourceDescriptor.History} history
41219
+ * @memberof google.api.ResourceDescriptor
41220
+ * @instance
41221
+ */
41222
+ ResourceDescriptor.prototype.history = 0;
41223
+
41224
+ /**
41225
+ * ResourceDescriptor plural.
41226
+ * @member {string} plural
41227
+ * @memberof google.api.ResourceDescriptor
41228
+ * @instance
41229
+ */
41230
+ ResourceDescriptor.prototype.plural = "";
41231
+
41232
+ /**
41233
+ * ResourceDescriptor singular.
41234
+ * @member {string} singular
41235
+ * @memberof google.api.ResourceDescriptor
41236
+ * @instance
41237
+ */
41238
+ ResourceDescriptor.prototype.singular = "";
41239
+
41240
+ /**
41241
+ * ResourceDescriptor style.
41242
+ * @member {Array.<google.api.ResourceDescriptor.Style>} style
41243
+ * @memberof google.api.ResourceDescriptor
41244
+ * @instance
41245
+ */
41246
+ ResourceDescriptor.prototype.style = $util.emptyArray;
41247
+
41248
+ /**
41249
+ * Creates a new ResourceDescriptor instance using the specified properties.
40180
41250
  * @function create
40181
- * @memberof google.api.Http
41251
+ * @memberof google.api.ResourceDescriptor
40182
41252
  * @static
40183
- * @param {google.api.IHttp=} [properties] Properties to set
40184
- * @returns {google.api.Http} Http instance
41253
+ * @param {google.api.IResourceDescriptor=} [properties] Properties to set
41254
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance
40185
41255
  */
40186
- Http.create = function create(properties) {
40187
- return new Http(properties);
41256
+ ResourceDescriptor.create = function create(properties) {
41257
+ return new ResourceDescriptor(properties);
40188
41258
  };
40189
41259
 
40190
41260
  /**
40191
- * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
41261
+ * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
40192
41262
  * @function encode
40193
- * @memberof google.api.Http
41263
+ * @memberof google.api.ResourceDescriptor
40194
41264
  * @static
40195
- * @param {google.api.IHttp} message Http message or plain object to encode
41265
+ * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
40196
41266
  * @param {$protobuf.Writer} [writer] Writer to encode to
40197
41267
  * @returns {$protobuf.Writer} Writer
40198
41268
  */
40199
- Http.encode = function encode(message, writer) {
41269
+ ResourceDescriptor.encode = function encode(message, writer) {
40200
41270
  if (!writer)
40201
41271
  writer = $Writer.create();
40202
- if (message.rules != null && message.rules.length)
40203
- for (var i = 0; i < message.rules.length; ++i)
40204
- $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
40205
- if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
40206
- writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
41272
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
41273
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
41274
+ if (message.pattern != null && message.pattern.length)
41275
+ for (var i = 0; i < message.pattern.length; ++i)
41276
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]);
41277
+ if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField"))
41278
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField);
41279
+ if (message.history != null && Object.hasOwnProperty.call(message, "history"))
41280
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history);
41281
+ if (message.plural != null && Object.hasOwnProperty.call(message, "plural"))
41282
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural);
41283
+ if (message.singular != null && Object.hasOwnProperty.call(message, "singular"))
41284
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular);
41285
+ if (message.style != null && message.style.length) {
41286
+ writer.uint32(/* id 10, wireType 2 =*/82).fork();
41287
+ for (var i = 0; i < message.style.length; ++i)
41288
+ writer.int32(message.style[i]);
41289
+ writer.ldelim();
41290
+ }
40207
41291
  return writer;
40208
41292
  };
40209
41293
 
40210
41294
  /**
40211
- * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
41295
+ * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
40212
41296
  * @function encodeDelimited
40213
- * @memberof google.api.Http
41297
+ * @memberof google.api.ResourceDescriptor
40214
41298
  * @static
40215
- * @param {google.api.IHttp} message Http message or plain object to encode
41299
+ * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
40216
41300
  * @param {$protobuf.Writer} [writer] Writer to encode to
40217
41301
  * @returns {$protobuf.Writer} Writer
40218
41302
  */
40219
- Http.encodeDelimited = function encodeDelimited(message, writer) {
41303
+ ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
40220
41304
  return this.encode(message, writer).ldelim();
40221
41305
  };
40222
41306
 
40223
41307
  /**
40224
- * Decodes a Http message from the specified reader or buffer.
41308
+ * Decodes a ResourceDescriptor message from the specified reader or buffer.
40225
41309
  * @function decode
40226
- * @memberof google.api.Http
41310
+ * @memberof google.api.ResourceDescriptor
40227
41311
  * @static
40228
41312
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40229
41313
  * @param {number} [length] Message length if known beforehand
40230
- * @returns {google.api.Http} Http
41314
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor
40231
41315
  * @throws {Error} If the payload is not a reader or valid buffer
40232
41316
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
40233
41317
  */
40234
- Http.decode = function decode(reader, length) {
41318
+ ResourceDescriptor.decode = function decode(reader, length) {
40235
41319
  if (!(reader instanceof $Reader))
40236
41320
  reader = $Reader.create(reader);
40237
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
41321
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor();
40238
41322
  while (reader.pos < end) {
40239
41323
  var tag = reader.uint32();
40240
41324
  switch (tag >>> 3) {
40241
41325
  case 1:
40242
- if (!(message.rules && message.rules.length))
40243
- message.rules = [];
40244
- message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
41326
+ message.type = reader.string();
40245
41327
  break;
40246
41328
  case 2:
40247
- message.fullyDecodeReservedExpansion = reader.bool();
41329
+ if (!(message.pattern && message.pattern.length))
41330
+ message.pattern = [];
41331
+ message.pattern.push(reader.string());
41332
+ break;
41333
+ case 3:
41334
+ message.nameField = reader.string();
41335
+ break;
41336
+ case 4:
41337
+ message.history = reader.int32();
41338
+ break;
41339
+ case 5:
41340
+ message.plural = reader.string();
41341
+ break;
41342
+ case 6:
41343
+ message.singular = reader.string();
41344
+ break;
41345
+ case 10:
41346
+ if (!(message.style && message.style.length))
41347
+ message.style = [];
41348
+ if ((tag & 7) === 2) {
41349
+ var end2 = reader.uint32() + reader.pos;
41350
+ while (reader.pos < end2)
41351
+ message.style.push(reader.int32());
41352
+ } else
41353
+ message.style.push(reader.int32());
40248
41354
  break;
40249
41355
  default:
40250
41356
  reader.skipType(tag & 7);
@@ -40255,143 +41361,246 @@
40255
41361
  };
40256
41362
 
40257
41363
  /**
40258
- * Decodes a Http message from the specified reader or buffer, length delimited.
41364
+ * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
40259
41365
  * @function decodeDelimited
40260
- * @memberof google.api.Http
41366
+ * @memberof google.api.ResourceDescriptor
40261
41367
  * @static
40262
41368
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40263
- * @returns {google.api.Http} Http
41369
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor
40264
41370
  * @throws {Error} If the payload is not a reader or valid buffer
40265
41371
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
40266
41372
  */
40267
- Http.decodeDelimited = function decodeDelimited(reader) {
41373
+ ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
40268
41374
  if (!(reader instanceof $Reader))
40269
41375
  reader = new $Reader(reader);
40270
41376
  return this.decode(reader, reader.uint32());
40271
41377
  };
40272
41378
 
40273
41379
  /**
40274
- * Verifies a Http message.
41380
+ * Verifies a ResourceDescriptor message.
40275
41381
  * @function verify
40276
- * @memberof google.api.Http
41382
+ * @memberof google.api.ResourceDescriptor
40277
41383
  * @static
40278
41384
  * @param {Object.<string,*>} message Plain object to verify
40279
41385
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
40280
41386
  */
40281
- Http.verify = function verify(message) {
41387
+ ResourceDescriptor.verify = function verify(message) {
40282
41388
  if (typeof message !== "object" || message === null)
40283
41389
  return "object expected";
40284
- if (message.rules != null && message.hasOwnProperty("rules")) {
40285
- if (!Array.isArray(message.rules))
40286
- return "rules: array expected";
40287
- for (var i = 0; i < message.rules.length; ++i) {
40288
- var error = $root.google.api.HttpRule.verify(message.rules[i]);
40289
- if (error)
40290
- return "rules." + error;
41390
+ if (message.type != null && message.hasOwnProperty("type"))
41391
+ if (!$util.isString(message.type))
41392
+ return "type: string expected";
41393
+ if (message.pattern != null && message.hasOwnProperty("pattern")) {
41394
+ if (!Array.isArray(message.pattern))
41395
+ return "pattern: array expected";
41396
+ for (var i = 0; i < message.pattern.length; ++i)
41397
+ if (!$util.isString(message.pattern[i]))
41398
+ return "pattern: string[] expected";
41399
+ }
41400
+ if (message.nameField != null && message.hasOwnProperty("nameField"))
41401
+ if (!$util.isString(message.nameField))
41402
+ return "nameField: string expected";
41403
+ if (message.history != null && message.hasOwnProperty("history"))
41404
+ switch (message.history) {
41405
+ default:
41406
+ return "history: enum value expected";
41407
+ case 0:
41408
+ case 1:
41409
+ case 2:
41410
+ break;
40291
41411
  }
41412
+ if (message.plural != null && message.hasOwnProperty("plural"))
41413
+ if (!$util.isString(message.plural))
41414
+ return "plural: string expected";
41415
+ if (message.singular != null && message.hasOwnProperty("singular"))
41416
+ if (!$util.isString(message.singular))
41417
+ return "singular: string expected";
41418
+ if (message.style != null && message.hasOwnProperty("style")) {
41419
+ if (!Array.isArray(message.style))
41420
+ return "style: array expected";
41421
+ for (var i = 0; i < message.style.length; ++i)
41422
+ switch (message.style[i]) {
41423
+ default:
41424
+ return "style: enum value[] expected";
41425
+ case 0:
41426
+ case 1:
41427
+ break;
41428
+ }
40292
41429
  }
40293
- if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
40294
- if (typeof message.fullyDecodeReservedExpansion !== "boolean")
40295
- return "fullyDecodeReservedExpansion: boolean expected";
40296
41430
  return null;
40297
41431
  };
40298
41432
 
40299
41433
  /**
40300
- * Creates a Http message from a plain object. Also converts values to their respective internal types.
41434
+ * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
40301
41435
  * @function fromObject
40302
- * @memberof google.api.Http
41436
+ * @memberof google.api.ResourceDescriptor
40303
41437
  * @static
40304
41438
  * @param {Object.<string,*>} object Plain object
40305
- * @returns {google.api.Http} Http
41439
+ * @returns {google.api.ResourceDescriptor} ResourceDescriptor
40306
41440
  */
40307
- Http.fromObject = function fromObject(object) {
40308
- if (object instanceof $root.google.api.Http)
41441
+ ResourceDescriptor.fromObject = function fromObject(object) {
41442
+ if (object instanceof $root.google.api.ResourceDescriptor)
40309
41443
  return object;
40310
- var message = new $root.google.api.Http();
40311
- if (object.rules) {
40312
- if (!Array.isArray(object.rules))
40313
- throw TypeError(".google.api.Http.rules: array expected");
40314
- message.rules = [];
40315
- for (var i = 0; i < object.rules.length; ++i) {
40316
- if (typeof object.rules[i] !== "object")
40317
- throw TypeError(".google.api.Http.rules: object expected");
40318
- message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
40319
- }
41444
+ var message = new $root.google.api.ResourceDescriptor();
41445
+ if (object.type != null)
41446
+ message.type = String(object.type);
41447
+ if (object.pattern) {
41448
+ if (!Array.isArray(object.pattern))
41449
+ throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");
41450
+ message.pattern = [];
41451
+ for (var i = 0; i < object.pattern.length; ++i)
41452
+ message.pattern[i] = String(object.pattern[i]);
41453
+ }
41454
+ if (object.nameField != null)
41455
+ message.nameField = String(object.nameField);
41456
+ switch (object.history) {
41457
+ case "HISTORY_UNSPECIFIED":
41458
+ case 0:
41459
+ message.history = 0;
41460
+ break;
41461
+ case "ORIGINALLY_SINGLE_PATTERN":
41462
+ case 1:
41463
+ message.history = 1;
41464
+ break;
41465
+ case "FUTURE_MULTI_PATTERN":
41466
+ case 2:
41467
+ message.history = 2;
41468
+ break;
41469
+ }
41470
+ if (object.plural != null)
41471
+ message.plural = String(object.plural);
41472
+ if (object.singular != null)
41473
+ message.singular = String(object.singular);
41474
+ if (object.style) {
41475
+ if (!Array.isArray(object.style))
41476
+ throw TypeError(".google.api.ResourceDescriptor.style: array expected");
41477
+ message.style = [];
41478
+ for (var i = 0; i < object.style.length; ++i)
41479
+ switch (object.style[i]) {
41480
+ default:
41481
+ case "STYLE_UNSPECIFIED":
41482
+ case 0:
41483
+ message.style[i] = 0;
41484
+ break;
41485
+ case "DECLARATIVE_FRIENDLY":
41486
+ case 1:
41487
+ message.style[i] = 1;
41488
+ break;
41489
+ }
40320
41490
  }
40321
- if (object.fullyDecodeReservedExpansion != null)
40322
- message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
40323
41491
  return message;
40324
41492
  };
40325
41493
 
40326
41494
  /**
40327
- * Creates a plain object from a Http message. Also converts values to other types if specified.
41495
+ * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
40328
41496
  * @function toObject
40329
- * @memberof google.api.Http
41497
+ * @memberof google.api.ResourceDescriptor
40330
41498
  * @static
40331
- * @param {google.api.Http} message Http
41499
+ * @param {google.api.ResourceDescriptor} message ResourceDescriptor
40332
41500
  * @param {$protobuf.IConversionOptions} [options] Conversion options
40333
41501
  * @returns {Object.<string,*>} Plain object
40334
41502
  */
40335
- Http.toObject = function toObject(message, options) {
41503
+ ResourceDescriptor.toObject = function toObject(message, options) {
40336
41504
  if (!options)
40337
41505
  options = {};
40338
41506
  var object = {};
40339
- if (options.arrays || options.defaults)
40340
- object.rules = [];
40341
- if (options.defaults)
40342
- object.fullyDecodeReservedExpansion = false;
40343
- if (message.rules && message.rules.length) {
40344
- object.rules = [];
40345
- for (var j = 0; j < message.rules.length; ++j)
40346
- object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
41507
+ if (options.arrays || options.defaults) {
41508
+ object.pattern = [];
41509
+ object.style = [];
41510
+ }
41511
+ if (options.defaults) {
41512
+ object.type = "";
41513
+ object.nameField = "";
41514
+ object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0;
41515
+ object.plural = "";
41516
+ object.singular = "";
41517
+ }
41518
+ if (message.type != null && message.hasOwnProperty("type"))
41519
+ object.type = message.type;
41520
+ if (message.pattern && message.pattern.length) {
41521
+ object.pattern = [];
41522
+ for (var j = 0; j < message.pattern.length; ++j)
41523
+ object.pattern[j] = message.pattern[j];
41524
+ }
41525
+ if (message.nameField != null && message.hasOwnProperty("nameField"))
41526
+ object.nameField = message.nameField;
41527
+ if (message.history != null && message.hasOwnProperty("history"))
41528
+ object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history;
41529
+ if (message.plural != null && message.hasOwnProperty("plural"))
41530
+ object.plural = message.plural;
41531
+ if (message.singular != null && message.hasOwnProperty("singular"))
41532
+ object.singular = message.singular;
41533
+ if (message.style && message.style.length) {
41534
+ object.style = [];
41535
+ for (var j = 0; j < message.style.length; ++j)
41536
+ object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j];
40347
41537
  }
40348
- if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
40349
- object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
40350
41538
  return object;
40351
41539
  };
40352
41540
 
40353
41541
  /**
40354
- * Converts this Http to JSON.
41542
+ * Converts this ResourceDescriptor to JSON.
40355
41543
  * @function toJSON
40356
- * @memberof google.api.Http
41544
+ * @memberof google.api.ResourceDescriptor
40357
41545
  * @instance
40358
41546
  * @returns {Object.<string,*>} JSON object
40359
41547
  */
40360
- Http.prototype.toJSON = function toJSON() {
41548
+ ResourceDescriptor.prototype.toJSON = function toJSON() {
40361
41549
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
40362
41550
  };
40363
41551
 
40364
- return Http;
41552
+ /**
41553
+ * History enum.
41554
+ * @name google.api.ResourceDescriptor.History
41555
+ * @enum {number}
41556
+ * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value
41557
+ * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value
41558
+ * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value
41559
+ */
41560
+ ResourceDescriptor.History = (function() {
41561
+ var valuesById = {}, values = Object.create(valuesById);
41562
+ values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0;
41563
+ values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1;
41564
+ values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2;
41565
+ return values;
41566
+ })();
41567
+
41568
+ /**
41569
+ * Style enum.
41570
+ * @name google.api.ResourceDescriptor.Style
41571
+ * @enum {number}
41572
+ * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value
41573
+ * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value
41574
+ */
41575
+ ResourceDescriptor.Style = (function() {
41576
+ var valuesById = {}, values = Object.create(valuesById);
41577
+ values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0;
41578
+ values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1;
41579
+ return values;
41580
+ })();
41581
+
41582
+ return ResourceDescriptor;
40365
41583
  })();
40366
41584
 
40367
- api.HttpRule = (function() {
41585
+ api.ResourceReference = (function() {
40368
41586
 
40369
41587
  /**
40370
- * Properties of a HttpRule.
41588
+ * Properties of a ResourceReference.
40371
41589
  * @memberof google.api
40372
- * @interface IHttpRule
40373
- * @property {string|null} [selector] HttpRule selector
40374
- * @property {string|null} [get] HttpRule get
40375
- * @property {string|null} [put] HttpRule put
40376
- * @property {string|null} [post] HttpRule post
40377
- * @property {string|null} ["delete"] HttpRule delete
40378
- * @property {string|null} [patch] HttpRule patch
40379
- * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
40380
- * @property {string|null} [body] HttpRule body
40381
- * @property {string|null} [responseBody] HttpRule responseBody
40382
- * @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
41590
+ * @interface IResourceReference
41591
+ * @property {string|null} [type] ResourceReference type
41592
+ * @property {string|null} [childType] ResourceReference childType
40383
41593
  */
40384
41594
 
40385
41595
  /**
40386
- * Constructs a new HttpRule.
41596
+ * Constructs a new ResourceReference.
40387
41597
  * @memberof google.api
40388
- * @classdesc Represents a HttpRule.
40389
- * @implements IHttpRule
41598
+ * @classdesc Represents a ResourceReference.
41599
+ * @implements IResourceReference
40390
41600
  * @constructor
40391
- * @param {google.api.IHttpRule=} [properties] Properties to set
41601
+ * @param {google.api.IResourceReference=} [properties] Properties to set
40392
41602
  */
40393
- function HttpRule(properties) {
40394
- this.additionalBindings = [];
41603
+ function ResourceReference(properties) {
40395
41604
  if (properties)
40396
41605
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
40397
41606
  if (properties[keys[i]] != null)
@@ -40399,209 +41608,88 @@
40399
41608
  }
40400
41609
 
40401
41610
  /**
40402
- * HttpRule selector.
40403
- * @member {string} selector
40404
- * @memberof google.api.HttpRule
40405
- * @instance
40406
- */
40407
- HttpRule.prototype.selector = "";
40408
-
40409
- /**
40410
- * HttpRule get.
40411
- * @member {string|null|undefined} get
40412
- * @memberof google.api.HttpRule
40413
- * @instance
40414
- */
40415
- HttpRule.prototype.get = null;
40416
-
40417
- /**
40418
- * HttpRule put.
40419
- * @member {string|null|undefined} put
40420
- * @memberof google.api.HttpRule
40421
- * @instance
40422
- */
40423
- HttpRule.prototype.put = null;
40424
-
40425
- /**
40426
- * HttpRule post.
40427
- * @member {string|null|undefined} post
40428
- * @memberof google.api.HttpRule
40429
- * @instance
40430
- */
40431
- HttpRule.prototype.post = null;
40432
-
40433
- /**
40434
- * HttpRule delete.
40435
- * @member {string|null|undefined} delete
40436
- * @memberof google.api.HttpRule
40437
- * @instance
40438
- */
40439
- HttpRule.prototype["delete"] = null;
40440
-
40441
- /**
40442
- * HttpRule patch.
40443
- * @member {string|null|undefined} patch
40444
- * @memberof google.api.HttpRule
40445
- * @instance
40446
- */
40447
- HttpRule.prototype.patch = null;
40448
-
40449
- /**
40450
- * HttpRule custom.
40451
- * @member {google.api.ICustomHttpPattern|null|undefined} custom
40452
- * @memberof google.api.HttpRule
40453
- * @instance
40454
- */
40455
- HttpRule.prototype.custom = null;
40456
-
40457
- /**
40458
- * HttpRule body.
40459
- * @member {string} body
40460
- * @memberof google.api.HttpRule
40461
- * @instance
40462
- */
40463
- HttpRule.prototype.body = "";
40464
-
40465
- /**
40466
- * HttpRule responseBody.
40467
- * @member {string} responseBody
40468
- * @memberof google.api.HttpRule
40469
- * @instance
40470
- */
40471
- HttpRule.prototype.responseBody = "";
40472
-
40473
- /**
40474
- * HttpRule additionalBindings.
40475
- * @member {Array.<google.api.IHttpRule>} additionalBindings
40476
- * @memberof google.api.HttpRule
41611
+ * ResourceReference type.
41612
+ * @member {string} type
41613
+ * @memberof google.api.ResourceReference
40477
41614
  * @instance
40478
41615
  */
40479
- HttpRule.prototype.additionalBindings = $util.emptyArray;
40480
-
40481
- // OneOf field names bound to virtual getters and setters
40482
- var $oneOfFields;
41616
+ ResourceReference.prototype.type = "";
40483
41617
 
40484
41618
  /**
40485
- * HttpRule pattern.
40486
- * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
40487
- * @memberof google.api.HttpRule
41619
+ * ResourceReference childType.
41620
+ * @member {string} childType
41621
+ * @memberof google.api.ResourceReference
40488
41622
  * @instance
40489
41623
  */
40490
- Object.defineProperty(HttpRule.prototype, "pattern", {
40491
- get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
40492
- set: $util.oneOfSetter($oneOfFields)
40493
- });
41624
+ ResourceReference.prototype.childType = "";
40494
41625
 
40495
41626
  /**
40496
- * Creates a new HttpRule instance using the specified properties.
41627
+ * Creates a new ResourceReference instance using the specified properties.
40497
41628
  * @function create
40498
- * @memberof google.api.HttpRule
41629
+ * @memberof google.api.ResourceReference
40499
41630
  * @static
40500
- * @param {google.api.IHttpRule=} [properties] Properties to set
40501
- * @returns {google.api.HttpRule} HttpRule instance
41631
+ * @param {google.api.IResourceReference=} [properties] Properties to set
41632
+ * @returns {google.api.ResourceReference} ResourceReference instance
40502
41633
  */
40503
- HttpRule.create = function create(properties) {
40504
- return new HttpRule(properties);
41634
+ ResourceReference.create = function create(properties) {
41635
+ return new ResourceReference(properties);
40505
41636
  };
40506
41637
 
40507
41638
  /**
40508
- * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
41639
+ * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
40509
41640
  * @function encode
40510
- * @memberof google.api.HttpRule
41641
+ * @memberof google.api.ResourceReference
40511
41642
  * @static
40512
- * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
41643
+ * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
40513
41644
  * @param {$protobuf.Writer} [writer] Writer to encode to
40514
41645
  * @returns {$protobuf.Writer} Writer
40515
41646
  */
40516
- HttpRule.encode = function encode(message, writer) {
41647
+ ResourceReference.encode = function encode(message, writer) {
40517
41648
  if (!writer)
40518
41649
  writer = $Writer.create();
40519
- if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
40520
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
40521
- if (message.get != null && Object.hasOwnProperty.call(message, "get"))
40522
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
40523
- if (message.put != null && Object.hasOwnProperty.call(message, "put"))
40524
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
40525
- if (message.post != null && Object.hasOwnProperty.call(message, "post"))
40526
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
40527
- if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
40528
- writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
40529
- if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
40530
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
40531
- if (message.body != null && Object.hasOwnProperty.call(message, "body"))
40532
- writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
40533
- if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
40534
- $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
40535
- if (message.additionalBindings != null && message.additionalBindings.length)
40536
- for (var i = 0; i < message.additionalBindings.length; ++i)
40537
- $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
40538
- if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
40539
- writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
41650
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
41651
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
41652
+ if (message.childType != null && Object.hasOwnProperty.call(message, "childType"))
41653
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType);
40540
41654
  return writer;
40541
41655
  };
40542
41656
 
40543
41657
  /**
40544
- * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
41658
+ * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
40545
41659
  * @function encodeDelimited
40546
- * @memberof google.api.HttpRule
41660
+ * @memberof google.api.ResourceReference
40547
41661
  * @static
40548
- * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
41662
+ * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
40549
41663
  * @param {$protobuf.Writer} [writer] Writer to encode to
40550
41664
  * @returns {$protobuf.Writer} Writer
40551
41665
  */
40552
- HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
41666
+ ResourceReference.encodeDelimited = function encodeDelimited(message, writer) {
40553
41667
  return this.encode(message, writer).ldelim();
40554
41668
  };
40555
41669
 
40556
41670
  /**
40557
- * Decodes a HttpRule message from the specified reader or buffer.
41671
+ * Decodes a ResourceReference message from the specified reader or buffer.
40558
41672
  * @function decode
40559
- * @memberof google.api.HttpRule
41673
+ * @memberof google.api.ResourceReference
40560
41674
  * @static
40561
41675
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40562
41676
  * @param {number} [length] Message length if known beforehand
40563
- * @returns {google.api.HttpRule} HttpRule
41677
+ * @returns {google.api.ResourceReference} ResourceReference
40564
41678
  * @throws {Error} If the payload is not a reader or valid buffer
40565
41679
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
40566
41680
  */
40567
- HttpRule.decode = function decode(reader, length) {
41681
+ ResourceReference.decode = function decode(reader, length) {
40568
41682
  if (!(reader instanceof $Reader))
40569
41683
  reader = $Reader.create(reader);
40570
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
41684
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference();
40571
41685
  while (reader.pos < end) {
40572
41686
  var tag = reader.uint32();
40573
41687
  switch (tag >>> 3) {
40574
41688
  case 1:
40575
- message.selector = reader.string();
41689
+ message.type = reader.string();
40576
41690
  break;
40577
41691
  case 2:
40578
- message.get = reader.string();
40579
- break;
40580
- case 3:
40581
- message.put = reader.string();
40582
- break;
40583
- case 4:
40584
- message.post = reader.string();
40585
- break;
40586
- case 5:
40587
- message["delete"] = reader.string();
40588
- break;
40589
- case 6:
40590
- message.patch = reader.string();
40591
- break;
40592
- case 8:
40593
- message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
40594
- break;
40595
- case 7:
40596
- message.body = reader.string();
40597
- break;
40598
- case 12:
40599
- message.responseBody = reader.string();
40600
- break;
40601
- case 11:
40602
- if (!(message.additionalBindings && message.additionalBindings.length))
40603
- message.additionalBindings = [];
40604
- message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
41692
+ message.childType = reader.string();
40605
41693
  break;
40606
41694
  default:
40607
41695
  reader.skipType(tag & 7);
@@ -40612,240 +41700,118 @@
40612
41700
  };
40613
41701
 
40614
41702
  /**
40615
- * Decodes a HttpRule message from the specified reader or buffer, length delimited.
41703
+ * Decodes a ResourceReference message from the specified reader or buffer, length delimited.
40616
41704
  * @function decodeDelimited
40617
- * @memberof google.api.HttpRule
41705
+ * @memberof google.api.ResourceReference
40618
41706
  * @static
40619
41707
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40620
- * @returns {google.api.HttpRule} HttpRule
41708
+ * @returns {google.api.ResourceReference} ResourceReference
40621
41709
  * @throws {Error} If the payload is not a reader or valid buffer
40622
41710
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
40623
41711
  */
40624
- HttpRule.decodeDelimited = function decodeDelimited(reader) {
41712
+ ResourceReference.decodeDelimited = function decodeDelimited(reader) {
40625
41713
  if (!(reader instanceof $Reader))
40626
41714
  reader = new $Reader(reader);
40627
41715
  return this.decode(reader, reader.uint32());
40628
41716
  };
40629
41717
 
40630
41718
  /**
40631
- * Verifies a HttpRule message.
41719
+ * Verifies a ResourceReference message.
40632
41720
  * @function verify
40633
- * @memberof google.api.HttpRule
41721
+ * @memberof google.api.ResourceReference
40634
41722
  * @static
40635
41723
  * @param {Object.<string,*>} message Plain object to verify
40636
41724
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
40637
41725
  */
40638
- HttpRule.verify = function verify(message) {
41726
+ ResourceReference.verify = function verify(message) {
40639
41727
  if (typeof message !== "object" || message === null)
40640
41728
  return "object expected";
40641
- var properties = {};
40642
- if (message.selector != null && message.hasOwnProperty("selector"))
40643
- if (!$util.isString(message.selector))
40644
- return "selector: string expected";
40645
- if (message.get != null && message.hasOwnProperty("get")) {
40646
- properties.pattern = 1;
40647
- if (!$util.isString(message.get))
40648
- return "get: string expected";
40649
- }
40650
- if (message.put != null && message.hasOwnProperty("put")) {
40651
- if (properties.pattern === 1)
40652
- return "pattern: multiple values";
40653
- properties.pattern = 1;
40654
- if (!$util.isString(message.put))
40655
- return "put: string expected";
40656
- }
40657
- if (message.post != null && message.hasOwnProperty("post")) {
40658
- if (properties.pattern === 1)
40659
- return "pattern: multiple values";
40660
- properties.pattern = 1;
40661
- if (!$util.isString(message.post))
40662
- return "post: string expected";
40663
- }
40664
- if (message["delete"] != null && message.hasOwnProperty("delete")) {
40665
- if (properties.pattern === 1)
40666
- return "pattern: multiple values";
40667
- properties.pattern = 1;
40668
- if (!$util.isString(message["delete"]))
40669
- return "delete: string expected";
40670
- }
40671
- if (message.patch != null && message.hasOwnProperty("patch")) {
40672
- if (properties.pattern === 1)
40673
- return "pattern: multiple values";
40674
- properties.pattern = 1;
40675
- if (!$util.isString(message.patch))
40676
- return "patch: string expected";
40677
- }
40678
- if (message.custom != null && message.hasOwnProperty("custom")) {
40679
- if (properties.pattern === 1)
40680
- return "pattern: multiple values";
40681
- properties.pattern = 1;
40682
- {
40683
- var error = $root.google.api.CustomHttpPattern.verify(message.custom);
40684
- if (error)
40685
- return "custom." + error;
40686
- }
40687
- }
40688
- if (message.body != null && message.hasOwnProperty("body"))
40689
- if (!$util.isString(message.body))
40690
- return "body: string expected";
40691
- if (message.responseBody != null && message.hasOwnProperty("responseBody"))
40692
- if (!$util.isString(message.responseBody))
40693
- return "responseBody: string expected";
40694
- if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
40695
- if (!Array.isArray(message.additionalBindings))
40696
- return "additionalBindings: array expected";
40697
- for (var i = 0; i < message.additionalBindings.length; ++i) {
40698
- var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
40699
- if (error)
40700
- return "additionalBindings." + error;
40701
- }
40702
- }
41729
+ if (message.type != null && message.hasOwnProperty("type"))
41730
+ if (!$util.isString(message.type))
41731
+ return "type: string expected";
41732
+ if (message.childType != null && message.hasOwnProperty("childType"))
41733
+ if (!$util.isString(message.childType))
41734
+ return "childType: string expected";
40703
41735
  return null;
40704
41736
  };
40705
41737
 
40706
41738
  /**
40707
- * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
41739
+ * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
40708
41740
  * @function fromObject
40709
- * @memberof google.api.HttpRule
41741
+ * @memberof google.api.ResourceReference
40710
41742
  * @static
40711
41743
  * @param {Object.<string,*>} object Plain object
40712
- * @returns {google.api.HttpRule} HttpRule
41744
+ * @returns {google.api.ResourceReference} ResourceReference
40713
41745
  */
40714
- HttpRule.fromObject = function fromObject(object) {
40715
- if (object instanceof $root.google.api.HttpRule)
41746
+ ResourceReference.fromObject = function fromObject(object) {
41747
+ if (object instanceof $root.google.api.ResourceReference)
40716
41748
  return object;
40717
- var message = new $root.google.api.HttpRule();
40718
- if (object.selector != null)
40719
- message.selector = String(object.selector);
40720
- if (object.get != null)
40721
- message.get = String(object.get);
40722
- if (object.put != null)
40723
- message.put = String(object.put);
40724
- if (object.post != null)
40725
- message.post = String(object.post);
40726
- if (object["delete"] != null)
40727
- message["delete"] = String(object["delete"]);
40728
- if (object.patch != null)
40729
- message.patch = String(object.patch);
40730
- if (object.custom != null) {
40731
- if (typeof object.custom !== "object")
40732
- throw TypeError(".google.api.HttpRule.custom: object expected");
40733
- message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
40734
- }
40735
- if (object.body != null)
40736
- message.body = String(object.body);
40737
- if (object.responseBody != null)
40738
- message.responseBody = String(object.responseBody);
40739
- if (object.additionalBindings) {
40740
- if (!Array.isArray(object.additionalBindings))
40741
- throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
40742
- message.additionalBindings = [];
40743
- for (var i = 0; i < object.additionalBindings.length; ++i) {
40744
- if (typeof object.additionalBindings[i] !== "object")
40745
- throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
40746
- message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
40747
- }
40748
- }
41749
+ var message = new $root.google.api.ResourceReference();
41750
+ if (object.type != null)
41751
+ message.type = String(object.type);
41752
+ if (object.childType != null)
41753
+ message.childType = String(object.childType);
40749
41754
  return message;
40750
41755
  };
40751
41756
 
40752
41757
  /**
40753
- * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
41758
+ * Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
40754
41759
  * @function toObject
40755
- * @memberof google.api.HttpRule
41760
+ * @memberof google.api.ResourceReference
40756
41761
  * @static
40757
- * @param {google.api.HttpRule} message HttpRule
41762
+ * @param {google.api.ResourceReference} message ResourceReference
40758
41763
  * @param {$protobuf.IConversionOptions} [options] Conversion options
40759
41764
  * @returns {Object.<string,*>} Plain object
40760
41765
  */
40761
- HttpRule.toObject = function toObject(message, options) {
41766
+ ResourceReference.toObject = function toObject(message, options) {
40762
41767
  if (!options)
40763
41768
  options = {};
40764
41769
  var object = {};
40765
- if (options.arrays || options.defaults)
40766
- object.additionalBindings = [];
40767
41770
  if (options.defaults) {
40768
- object.selector = "";
40769
- object.body = "";
40770
- object.responseBody = "";
40771
- }
40772
- if (message.selector != null && message.hasOwnProperty("selector"))
40773
- object.selector = message.selector;
40774
- if (message.get != null && message.hasOwnProperty("get")) {
40775
- object.get = message.get;
40776
- if (options.oneofs)
40777
- object.pattern = "get";
40778
- }
40779
- if (message.put != null && message.hasOwnProperty("put")) {
40780
- object.put = message.put;
40781
- if (options.oneofs)
40782
- object.pattern = "put";
40783
- }
40784
- if (message.post != null && message.hasOwnProperty("post")) {
40785
- object.post = message.post;
40786
- if (options.oneofs)
40787
- object.pattern = "post";
40788
- }
40789
- if (message["delete"] != null && message.hasOwnProperty("delete")) {
40790
- object["delete"] = message["delete"];
40791
- if (options.oneofs)
40792
- object.pattern = "delete";
40793
- }
40794
- if (message.patch != null && message.hasOwnProperty("patch")) {
40795
- object.patch = message.patch;
40796
- if (options.oneofs)
40797
- object.pattern = "patch";
40798
- }
40799
- if (message.body != null && message.hasOwnProperty("body"))
40800
- object.body = message.body;
40801
- if (message.custom != null && message.hasOwnProperty("custom")) {
40802
- object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
40803
- if (options.oneofs)
40804
- object.pattern = "custom";
40805
- }
40806
- if (message.additionalBindings && message.additionalBindings.length) {
40807
- object.additionalBindings = [];
40808
- for (var j = 0; j < message.additionalBindings.length; ++j)
40809
- object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
41771
+ object.type = "";
41772
+ object.childType = "";
40810
41773
  }
40811
- if (message.responseBody != null && message.hasOwnProperty("responseBody"))
40812
- object.responseBody = message.responseBody;
41774
+ if (message.type != null && message.hasOwnProperty("type"))
41775
+ object.type = message.type;
41776
+ if (message.childType != null && message.hasOwnProperty("childType"))
41777
+ object.childType = message.childType;
40813
41778
  return object;
40814
41779
  };
40815
41780
 
40816
41781
  /**
40817
- * Converts this HttpRule to JSON.
41782
+ * Converts this ResourceReference to JSON.
40818
41783
  * @function toJSON
40819
- * @memberof google.api.HttpRule
41784
+ * @memberof google.api.ResourceReference
40820
41785
  * @instance
40821
41786
  * @returns {Object.<string,*>} JSON object
40822
41787
  */
40823
- HttpRule.prototype.toJSON = function toJSON() {
41788
+ ResourceReference.prototype.toJSON = function toJSON() {
40824
41789
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
40825
41790
  };
40826
41791
 
40827
- return HttpRule;
41792
+ return ResourceReference;
40828
41793
  })();
40829
41794
 
40830
- api.CustomHttpPattern = (function() {
41795
+ api.Http = (function() {
40831
41796
 
40832
41797
  /**
40833
- * Properties of a CustomHttpPattern.
41798
+ * Properties of a Http.
40834
41799
  * @memberof google.api
40835
- * @interface ICustomHttpPattern
40836
- * @property {string|null} [kind] CustomHttpPattern kind
40837
- * @property {string|null} [path] CustomHttpPattern path
41800
+ * @interface IHttp
41801
+ * @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
41802
+ * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
40838
41803
  */
40839
41804
 
40840
41805
  /**
40841
- * Constructs a new CustomHttpPattern.
41806
+ * Constructs a new Http.
40842
41807
  * @memberof google.api
40843
- * @classdesc Represents a CustomHttpPattern.
40844
- * @implements ICustomHttpPattern
41808
+ * @classdesc Represents a Http.
41809
+ * @implements IHttp
40845
41810
  * @constructor
40846
- * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
41811
+ * @param {google.api.IHttp=} [properties] Properties to set
40847
41812
  */
40848
- function CustomHttpPattern(properties) {
41813
+ function Http(properties) {
41814
+ this.rules = [];
40849
41815
  if (properties)
40850
41816
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
40851
41817
  if (properties[keys[i]] != null)
@@ -40853,88 +41819,91 @@
40853
41819
  }
40854
41820
 
40855
41821
  /**
40856
- * CustomHttpPattern kind.
40857
- * @member {string} kind
40858
- * @memberof google.api.CustomHttpPattern
41822
+ * Http rules.
41823
+ * @member {Array.<google.api.IHttpRule>} rules
41824
+ * @memberof google.api.Http
40859
41825
  * @instance
40860
41826
  */
40861
- CustomHttpPattern.prototype.kind = "";
41827
+ Http.prototype.rules = $util.emptyArray;
40862
41828
 
40863
41829
  /**
40864
- * CustomHttpPattern path.
40865
- * @member {string} path
40866
- * @memberof google.api.CustomHttpPattern
41830
+ * Http fullyDecodeReservedExpansion.
41831
+ * @member {boolean} fullyDecodeReservedExpansion
41832
+ * @memberof google.api.Http
40867
41833
  * @instance
40868
41834
  */
40869
- CustomHttpPattern.prototype.path = "";
41835
+ Http.prototype.fullyDecodeReservedExpansion = false;
40870
41836
 
40871
41837
  /**
40872
- * Creates a new CustomHttpPattern instance using the specified properties.
41838
+ * Creates a new Http instance using the specified properties.
40873
41839
  * @function create
40874
- * @memberof google.api.CustomHttpPattern
41840
+ * @memberof google.api.Http
40875
41841
  * @static
40876
- * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
40877
- * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
41842
+ * @param {google.api.IHttp=} [properties] Properties to set
41843
+ * @returns {google.api.Http} Http instance
40878
41844
  */
40879
- CustomHttpPattern.create = function create(properties) {
40880
- return new CustomHttpPattern(properties);
41845
+ Http.create = function create(properties) {
41846
+ return new Http(properties);
40881
41847
  };
40882
41848
 
40883
41849
  /**
40884
- * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
41850
+ * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
40885
41851
  * @function encode
40886
- * @memberof google.api.CustomHttpPattern
41852
+ * @memberof google.api.Http
40887
41853
  * @static
40888
- * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
41854
+ * @param {google.api.IHttp} message Http message or plain object to encode
40889
41855
  * @param {$protobuf.Writer} [writer] Writer to encode to
40890
41856
  * @returns {$protobuf.Writer} Writer
40891
41857
  */
40892
- CustomHttpPattern.encode = function encode(message, writer) {
41858
+ Http.encode = function encode(message, writer) {
40893
41859
  if (!writer)
40894
41860
  writer = $Writer.create();
40895
- if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
40896
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
40897
- if (message.path != null && Object.hasOwnProperty.call(message, "path"))
40898
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
41861
+ if (message.rules != null && message.rules.length)
41862
+ for (var i = 0; i < message.rules.length; ++i)
41863
+ $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
41864
+ if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
41865
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
40899
41866
  return writer;
40900
41867
  };
40901
41868
 
40902
41869
  /**
40903
- * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
41870
+ * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
40904
41871
  * @function encodeDelimited
40905
- * @memberof google.api.CustomHttpPattern
41872
+ * @memberof google.api.Http
40906
41873
  * @static
40907
- * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
41874
+ * @param {google.api.IHttp} message Http message or plain object to encode
40908
41875
  * @param {$protobuf.Writer} [writer] Writer to encode to
40909
41876
  * @returns {$protobuf.Writer} Writer
40910
41877
  */
40911
- CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
41878
+ Http.encodeDelimited = function encodeDelimited(message, writer) {
40912
41879
  return this.encode(message, writer).ldelim();
40913
41880
  };
40914
41881
 
40915
41882
  /**
40916
- * Decodes a CustomHttpPattern message from the specified reader or buffer.
41883
+ * Decodes a Http message from the specified reader or buffer.
40917
41884
  * @function decode
40918
- * @memberof google.api.CustomHttpPattern
41885
+ * @memberof google.api.Http
40919
41886
  * @static
40920
41887
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40921
41888
  * @param {number} [length] Message length if known beforehand
40922
- * @returns {google.api.CustomHttpPattern} CustomHttpPattern
41889
+ * @returns {google.api.Http} Http
40923
41890
  * @throws {Error} If the payload is not a reader or valid buffer
40924
41891
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
40925
41892
  */
40926
- CustomHttpPattern.decode = function decode(reader, length) {
41893
+ Http.decode = function decode(reader, length) {
40927
41894
  if (!(reader instanceof $Reader))
40928
41895
  reader = $Reader.create(reader);
40929
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
41896
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
40930
41897
  while (reader.pos < end) {
40931
41898
  var tag = reader.uint32();
40932
41899
  switch (tag >>> 3) {
40933
41900
  case 1:
40934
- message.kind = reader.string();
41901
+ if (!(message.rules && message.rules.length))
41902
+ message.rules = [];
41903
+ message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
40935
41904
  break;
40936
41905
  case 2:
40937
- message.path = reader.string();
41906
+ message.fullyDecodeReservedExpansion = reader.bool();
40938
41907
  break;
40939
41908
  default:
40940
41909
  reader.skipType(tag & 7);
@@ -40945,150 +41914,143 @@
40945
41914
  };
40946
41915
 
40947
41916
  /**
40948
- * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
41917
+ * Decodes a Http message from the specified reader or buffer, length delimited.
40949
41918
  * @function decodeDelimited
40950
- * @memberof google.api.CustomHttpPattern
41919
+ * @memberof google.api.Http
40951
41920
  * @static
40952
41921
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
40953
- * @returns {google.api.CustomHttpPattern} CustomHttpPattern
41922
+ * @returns {google.api.Http} Http
40954
41923
  * @throws {Error} If the payload is not a reader or valid buffer
40955
41924
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
40956
41925
  */
40957
- CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
41926
+ Http.decodeDelimited = function decodeDelimited(reader) {
40958
41927
  if (!(reader instanceof $Reader))
40959
41928
  reader = new $Reader(reader);
40960
41929
  return this.decode(reader, reader.uint32());
40961
41930
  };
40962
41931
 
40963
41932
  /**
40964
- * Verifies a CustomHttpPattern message.
41933
+ * Verifies a Http message.
40965
41934
  * @function verify
40966
- * @memberof google.api.CustomHttpPattern
41935
+ * @memberof google.api.Http
40967
41936
  * @static
40968
41937
  * @param {Object.<string,*>} message Plain object to verify
40969
41938
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
40970
41939
  */
40971
- CustomHttpPattern.verify = function verify(message) {
41940
+ Http.verify = function verify(message) {
40972
41941
  if (typeof message !== "object" || message === null)
40973
41942
  return "object expected";
40974
- if (message.kind != null && message.hasOwnProperty("kind"))
40975
- if (!$util.isString(message.kind))
40976
- return "kind: string expected";
40977
- if (message.path != null && message.hasOwnProperty("path"))
40978
- if (!$util.isString(message.path))
40979
- return "path: string expected";
41943
+ if (message.rules != null && message.hasOwnProperty("rules")) {
41944
+ if (!Array.isArray(message.rules))
41945
+ return "rules: array expected";
41946
+ for (var i = 0; i < message.rules.length; ++i) {
41947
+ var error = $root.google.api.HttpRule.verify(message.rules[i]);
41948
+ if (error)
41949
+ return "rules." + error;
41950
+ }
41951
+ }
41952
+ if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
41953
+ if (typeof message.fullyDecodeReservedExpansion !== "boolean")
41954
+ return "fullyDecodeReservedExpansion: boolean expected";
40980
41955
  return null;
40981
41956
  };
40982
41957
 
40983
41958
  /**
40984
- * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
41959
+ * Creates a Http message from a plain object. Also converts values to their respective internal types.
40985
41960
  * @function fromObject
40986
- * @memberof google.api.CustomHttpPattern
41961
+ * @memberof google.api.Http
40987
41962
  * @static
40988
41963
  * @param {Object.<string,*>} object Plain object
40989
- * @returns {google.api.CustomHttpPattern} CustomHttpPattern
41964
+ * @returns {google.api.Http} Http
40990
41965
  */
40991
- CustomHttpPattern.fromObject = function fromObject(object) {
40992
- if (object instanceof $root.google.api.CustomHttpPattern)
41966
+ Http.fromObject = function fromObject(object) {
41967
+ if (object instanceof $root.google.api.Http)
40993
41968
  return object;
40994
- var message = new $root.google.api.CustomHttpPattern();
40995
- if (object.kind != null)
40996
- message.kind = String(object.kind);
40997
- if (object.path != null)
40998
- message.path = String(object.path);
41969
+ var message = new $root.google.api.Http();
41970
+ if (object.rules) {
41971
+ if (!Array.isArray(object.rules))
41972
+ throw TypeError(".google.api.Http.rules: array expected");
41973
+ message.rules = [];
41974
+ for (var i = 0; i < object.rules.length; ++i) {
41975
+ if (typeof object.rules[i] !== "object")
41976
+ throw TypeError(".google.api.Http.rules: object expected");
41977
+ message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
41978
+ }
41979
+ }
41980
+ if (object.fullyDecodeReservedExpansion != null)
41981
+ message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
40999
41982
  return message;
41000
41983
  };
41001
41984
 
41002
41985
  /**
41003
- * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
41986
+ * Creates a plain object from a Http message. Also converts values to other types if specified.
41004
41987
  * @function toObject
41005
- * @memberof google.api.CustomHttpPattern
41988
+ * @memberof google.api.Http
41006
41989
  * @static
41007
- * @param {google.api.CustomHttpPattern} message CustomHttpPattern
41990
+ * @param {google.api.Http} message Http
41008
41991
  * @param {$protobuf.IConversionOptions} [options] Conversion options
41009
41992
  * @returns {Object.<string,*>} Plain object
41010
41993
  */
41011
- CustomHttpPattern.toObject = function toObject(message, options) {
41994
+ Http.toObject = function toObject(message, options) {
41012
41995
  if (!options)
41013
41996
  options = {};
41014
41997
  var object = {};
41015
- if (options.defaults) {
41016
- object.kind = "";
41017
- object.path = "";
41998
+ if (options.arrays || options.defaults)
41999
+ object.rules = [];
42000
+ if (options.defaults)
42001
+ object.fullyDecodeReservedExpansion = false;
42002
+ if (message.rules && message.rules.length) {
42003
+ object.rules = [];
42004
+ for (var j = 0; j < message.rules.length; ++j)
42005
+ object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
41018
42006
  }
41019
- if (message.kind != null && message.hasOwnProperty("kind"))
41020
- object.kind = message.kind;
41021
- if (message.path != null && message.hasOwnProperty("path"))
41022
- object.path = message.path;
42007
+ if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
42008
+ object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
41023
42009
  return object;
41024
42010
  };
41025
42011
 
41026
42012
  /**
41027
- * Converts this CustomHttpPattern to JSON.
42013
+ * Converts this Http to JSON.
41028
42014
  * @function toJSON
41029
- * @memberof google.api.CustomHttpPattern
42015
+ * @memberof google.api.Http
41030
42016
  * @instance
41031
42017
  * @returns {Object.<string,*>} JSON object
41032
42018
  */
41033
- CustomHttpPattern.prototype.toJSON = function toJSON() {
42019
+ Http.prototype.toJSON = function toJSON() {
41034
42020
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
41035
42021
  };
41036
42022
 
41037
- return CustomHttpPattern;
41038
- })();
41039
-
41040
- /**
41041
- * FieldBehavior enum.
41042
- * @name google.api.FieldBehavior
41043
- * @enum {number}
41044
- * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value
41045
- * @property {number} OPTIONAL=1 OPTIONAL value
41046
- * @property {number} REQUIRED=2 REQUIRED value
41047
- * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value
41048
- * @property {number} INPUT_ONLY=4 INPUT_ONLY value
41049
- * @property {number} IMMUTABLE=5 IMMUTABLE value
41050
- * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value
41051
- * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value
41052
- */
41053
- api.FieldBehavior = (function() {
41054
- var valuesById = {}, values = Object.create(valuesById);
41055
- values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0;
41056
- values[valuesById[1] = "OPTIONAL"] = 1;
41057
- values[valuesById[2] = "REQUIRED"] = 2;
41058
- values[valuesById[3] = "OUTPUT_ONLY"] = 3;
41059
- values[valuesById[4] = "INPUT_ONLY"] = 4;
41060
- values[valuesById[5] = "IMMUTABLE"] = 5;
41061
- values[valuesById[6] = "UNORDERED_LIST"] = 6;
41062
- values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7;
41063
- return values;
42023
+ return Http;
41064
42024
  })();
41065
42025
 
41066
- api.ResourceDescriptor = (function() {
42026
+ api.HttpRule = (function() {
41067
42027
 
41068
42028
  /**
41069
- * Properties of a ResourceDescriptor.
42029
+ * Properties of a HttpRule.
41070
42030
  * @memberof google.api
41071
- * @interface IResourceDescriptor
41072
- * @property {string|null} [type] ResourceDescriptor type
41073
- * @property {Array.<string>|null} [pattern] ResourceDescriptor pattern
41074
- * @property {string|null} [nameField] ResourceDescriptor nameField
41075
- * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history
41076
- * @property {string|null} [plural] ResourceDescriptor plural
41077
- * @property {string|null} [singular] ResourceDescriptor singular
41078
- * @property {Array.<google.api.ResourceDescriptor.Style>|null} [style] ResourceDescriptor style
42031
+ * @interface IHttpRule
42032
+ * @property {string|null} [selector] HttpRule selector
42033
+ * @property {string|null} [get] HttpRule get
42034
+ * @property {string|null} [put] HttpRule put
42035
+ * @property {string|null} [post] HttpRule post
42036
+ * @property {string|null} ["delete"] HttpRule delete
42037
+ * @property {string|null} [patch] HttpRule patch
42038
+ * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
42039
+ * @property {string|null} [body] HttpRule body
42040
+ * @property {string|null} [responseBody] HttpRule responseBody
42041
+ * @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
41079
42042
  */
41080
42043
 
41081
42044
  /**
41082
- * Constructs a new ResourceDescriptor.
42045
+ * Constructs a new HttpRule.
41083
42046
  * @memberof google.api
41084
- * @classdesc Represents a ResourceDescriptor.
41085
- * @implements IResourceDescriptor
42047
+ * @classdesc Represents a HttpRule.
42048
+ * @implements IHttpRule
41086
42049
  * @constructor
41087
- * @param {google.api.IResourceDescriptor=} [properties] Properties to set
42050
+ * @param {google.api.IHttpRule=} [properties] Properties to set
41088
42051
  */
41089
- function ResourceDescriptor(properties) {
41090
- this.pattern = [];
41091
- this.style = [];
42052
+ function HttpRule(properties) {
42053
+ this.additionalBindings = [];
41092
42054
  if (properties)
41093
42055
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
41094
42056
  if (properties[keys[i]] != null)
@@ -41096,167 +42058,209 @@
41096
42058
  }
41097
42059
 
41098
42060
  /**
41099
- * ResourceDescriptor type.
41100
- * @member {string} type
41101
- * @memberof google.api.ResourceDescriptor
42061
+ * HttpRule selector.
42062
+ * @member {string} selector
42063
+ * @memberof google.api.HttpRule
41102
42064
  * @instance
41103
42065
  */
41104
- ResourceDescriptor.prototype.type = "";
42066
+ HttpRule.prototype.selector = "";
41105
42067
 
41106
42068
  /**
41107
- * ResourceDescriptor pattern.
41108
- * @member {Array.<string>} pattern
41109
- * @memberof google.api.ResourceDescriptor
42069
+ * HttpRule get.
42070
+ * @member {string|null|undefined} get
42071
+ * @memberof google.api.HttpRule
41110
42072
  * @instance
41111
42073
  */
41112
- ResourceDescriptor.prototype.pattern = $util.emptyArray;
42074
+ HttpRule.prototype.get = null;
41113
42075
 
41114
42076
  /**
41115
- * ResourceDescriptor nameField.
41116
- * @member {string} nameField
41117
- * @memberof google.api.ResourceDescriptor
42077
+ * HttpRule put.
42078
+ * @member {string|null|undefined} put
42079
+ * @memberof google.api.HttpRule
41118
42080
  * @instance
41119
42081
  */
41120
- ResourceDescriptor.prototype.nameField = "";
42082
+ HttpRule.prototype.put = null;
41121
42083
 
41122
42084
  /**
41123
- * ResourceDescriptor history.
41124
- * @member {google.api.ResourceDescriptor.History} history
41125
- * @memberof google.api.ResourceDescriptor
42085
+ * HttpRule post.
42086
+ * @member {string|null|undefined} post
42087
+ * @memberof google.api.HttpRule
41126
42088
  * @instance
41127
42089
  */
41128
- ResourceDescriptor.prototype.history = 0;
42090
+ HttpRule.prototype.post = null;
41129
42091
 
41130
42092
  /**
41131
- * ResourceDescriptor plural.
41132
- * @member {string} plural
41133
- * @memberof google.api.ResourceDescriptor
42093
+ * HttpRule delete.
42094
+ * @member {string|null|undefined} delete
42095
+ * @memberof google.api.HttpRule
41134
42096
  * @instance
41135
42097
  */
41136
- ResourceDescriptor.prototype.plural = "";
42098
+ HttpRule.prototype["delete"] = null;
41137
42099
 
41138
42100
  /**
41139
- * ResourceDescriptor singular.
41140
- * @member {string} singular
41141
- * @memberof google.api.ResourceDescriptor
42101
+ * HttpRule patch.
42102
+ * @member {string|null|undefined} patch
42103
+ * @memberof google.api.HttpRule
41142
42104
  * @instance
41143
42105
  */
41144
- ResourceDescriptor.prototype.singular = "";
42106
+ HttpRule.prototype.patch = null;
41145
42107
 
41146
42108
  /**
41147
- * ResourceDescriptor style.
41148
- * @member {Array.<google.api.ResourceDescriptor.Style>} style
41149
- * @memberof google.api.ResourceDescriptor
42109
+ * HttpRule custom.
42110
+ * @member {google.api.ICustomHttpPattern|null|undefined} custom
42111
+ * @memberof google.api.HttpRule
41150
42112
  * @instance
41151
42113
  */
41152
- ResourceDescriptor.prototype.style = $util.emptyArray;
42114
+ HttpRule.prototype.custom = null;
41153
42115
 
41154
42116
  /**
41155
- * Creates a new ResourceDescriptor instance using the specified properties.
42117
+ * HttpRule body.
42118
+ * @member {string} body
42119
+ * @memberof google.api.HttpRule
42120
+ * @instance
42121
+ */
42122
+ HttpRule.prototype.body = "";
42123
+
42124
+ /**
42125
+ * HttpRule responseBody.
42126
+ * @member {string} responseBody
42127
+ * @memberof google.api.HttpRule
42128
+ * @instance
42129
+ */
42130
+ HttpRule.prototype.responseBody = "";
42131
+
42132
+ /**
42133
+ * HttpRule additionalBindings.
42134
+ * @member {Array.<google.api.IHttpRule>} additionalBindings
42135
+ * @memberof google.api.HttpRule
42136
+ * @instance
42137
+ */
42138
+ HttpRule.prototype.additionalBindings = $util.emptyArray;
42139
+
42140
+ // OneOf field names bound to virtual getters and setters
42141
+ var $oneOfFields;
42142
+
42143
+ /**
42144
+ * HttpRule pattern.
42145
+ * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
42146
+ * @memberof google.api.HttpRule
42147
+ * @instance
42148
+ */
42149
+ Object.defineProperty(HttpRule.prototype, "pattern", {
42150
+ get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
42151
+ set: $util.oneOfSetter($oneOfFields)
42152
+ });
42153
+
42154
+ /**
42155
+ * Creates a new HttpRule instance using the specified properties.
41156
42156
  * @function create
41157
- * @memberof google.api.ResourceDescriptor
42157
+ * @memberof google.api.HttpRule
41158
42158
  * @static
41159
- * @param {google.api.IResourceDescriptor=} [properties] Properties to set
41160
- * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance
42159
+ * @param {google.api.IHttpRule=} [properties] Properties to set
42160
+ * @returns {google.api.HttpRule} HttpRule instance
41161
42161
  */
41162
- ResourceDescriptor.create = function create(properties) {
41163
- return new ResourceDescriptor(properties);
42162
+ HttpRule.create = function create(properties) {
42163
+ return new HttpRule(properties);
41164
42164
  };
41165
42165
 
41166
42166
  /**
41167
- * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
42167
+ * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
41168
42168
  * @function encode
41169
- * @memberof google.api.ResourceDescriptor
42169
+ * @memberof google.api.HttpRule
41170
42170
  * @static
41171
- * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
42171
+ * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
41172
42172
  * @param {$protobuf.Writer} [writer] Writer to encode to
41173
42173
  * @returns {$protobuf.Writer} Writer
41174
42174
  */
41175
- ResourceDescriptor.encode = function encode(message, writer) {
42175
+ HttpRule.encode = function encode(message, writer) {
41176
42176
  if (!writer)
41177
42177
  writer = $Writer.create();
41178
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
41179
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
41180
- if (message.pattern != null && message.pattern.length)
41181
- for (var i = 0; i < message.pattern.length; ++i)
41182
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]);
41183
- if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField"))
41184
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField);
41185
- if (message.history != null && Object.hasOwnProperty.call(message, "history"))
41186
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history);
41187
- if (message.plural != null && Object.hasOwnProperty.call(message, "plural"))
41188
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural);
41189
- if (message.singular != null && Object.hasOwnProperty.call(message, "singular"))
41190
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular);
41191
- if (message.style != null && message.style.length) {
41192
- writer.uint32(/* id 10, wireType 2 =*/82).fork();
41193
- for (var i = 0; i < message.style.length; ++i)
41194
- writer.int32(message.style[i]);
41195
- writer.ldelim();
41196
- }
42178
+ if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
42179
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
42180
+ if (message.get != null && Object.hasOwnProperty.call(message, "get"))
42181
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
42182
+ if (message.put != null && Object.hasOwnProperty.call(message, "put"))
42183
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
42184
+ if (message.post != null && Object.hasOwnProperty.call(message, "post"))
42185
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
42186
+ if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
42187
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
42188
+ if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
42189
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
42190
+ if (message.body != null && Object.hasOwnProperty.call(message, "body"))
42191
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
42192
+ if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
42193
+ $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
42194
+ if (message.additionalBindings != null && message.additionalBindings.length)
42195
+ for (var i = 0; i < message.additionalBindings.length; ++i)
42196
+ $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
42197
+ if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
42198
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
41197
42199
  return writer;
41198
42200
  };
41199
42201
 
41200
42202
  /**
41201
- * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
42203
+ * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
41202
42204
  * @function encodeDelimited
41203
- * @memberof google.api.ResourceDescriptor
42205
+ * @memberof google.api.HttpRule
41204
42206
  * @static
41205
- * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
42207
+ * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
41206
42208
  * @param {$protobuf.Writer} [writer] Writer to encode to
41207
42209
  * @returns {$protobuf.Writer} Writer
41208
42210
  */
41209
- ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
42211
+ HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
41210
42212
  return this.encode(message, writer).ldelim();
41211
42213
  };
41212
42214
 
41213
42215
  /**
41214
- * Decodes a ResourceDescriptor message from the specified reader or buffer.
42216
+ * Decodes a HttpRule message from the specified reader or buffer.
41215
42217
  * @function decode
41216
- * @memberof google.api.ResourceDescriptor
42218
+ * @memberof google.api.HttpRule
41217
42219
  * @static
41218
42220
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
41219
42221
  * @param {number} [length] Message length if known beforehand
41220
- * @returns {google.api.ResourceDescriptor} ResourceDescriptor
42222
+ * @returns {google.api.HttpRule} HttpRule
41221
42223
  * @throws {Error} If the payload is not a reader or valid buffer
41222
42224
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
41223
42225
  */
41224
- ResourceDescriptor.decode = function decode(reader, length) {
42226
+ HttpRule.decode = function decode(reader, length) {
41225
42227
  if (!(reader instanceof $Reader))
41226
42228
  reader = $Reader.create(reader);
41227
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor();
42229
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
41228
42230
  while (reader.pos < end) {
41229
42231
  var tag = reader.uint32();
41230
42232
  switch (tag >>> 3) {
41231
42233
  case 1:
41232
- message.type = reader.string();
42234
+ message.selector = reader.string();
41233
42235
  break;
41234
42236
  case 2:
41235
- if (!(message.pattern && message.pattern.length))
41236
- message.pattern = [];
41237
- message.pattern.push(reader.string());
42237
+ message.get = reader.string();
41238
42238
  break;
41239
42239
  case 3:
41240
- message.nameField = reader.string();
42240
+ message.put = reader.string();
41241
42241
  break;
41242
42242
  case 4:
41243
- message.history = reader.int32();
42243
+ message.post = reader.string();
41244
42244
  break;
41245
42245
  case 5:
41246
- message.plural = reader.string();
42246
+ message["delete"] = reader.string();
41247
42247
  break;
41248
42248
  case 6:
41249
- message.singular = reader.string();
42249
+ message.patch = reader.string();
41250
42250
  break;
41251
- case 10:
41252
- if (!(message.style && message.style.length))
41253
- message.style = [];
41254
- if ((tag & 7) === 2) {
41255
- var end2 = reader.uint32() + reader.pos;
41256
- while (reader.pos < end2)
41257
- message.style.push(reader.int32());
41258
- } else
41259
- message.style.push(reader.int32());
42251
+ case 8:
42252
+ message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
42253
+ break;
42254
+ case 7:
42255
+ message.body = reader.string();
42256
+ break;
42257
+ case 12:
42258
+ message.responseBody = reader.string();
42259
+ break;
42260
+ case 11:
42261
+ if (!(message.additionalBindings && message.additionalBindings.length))
42262
+ message.additionalBindings = [];
42263
+ message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
41260
42264
  break;
41261
42265
  default:
41262
42266
  reader.skipType(tag & 7);
@@ -41267,246 +42271,240 @@
41267
42271
  };
41268
42272
 
41269
42273
  /**
41270
- * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
42274
+ * Decodes a HttpRule message from the specified reader or buffer, length delimited.
41271
42275
  * @function decodeDelimited
41272
- * @memberof google.api.ResourceDescriptor
42276
+ * @memberof google.api.HttpRule
41273
42277
  * @static
41274
42278
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
41275
- * @returns {google.api.ResourceDescriptor} ResourceDescriptor
42279
+ * @returns {google.api.HttpRule} HttpRule
41276
42280
  * @throws {Error} If the payload is not a reader or valid buffer
41277
42281
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
41278
42282
  */
41279
- ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
42283
+ HttpRule.decodeDelimited = function decodeDelimited(reader) {
41280
42284
  if (!(reader instanceof $Reader))
41281
42285
  reader = new $Reader(reader);
41282
42286
  return this.decode(reader, reader.uint32());
41283
42287
  };
41284
42288
 
41285
42289
  /**
41286
- * Verifies a ResourceDescriptor message.
42290
+ * Verifies a HttpRule message.
41287
42291
  * @function verify
41288
- * @memberof google.api.ResourceDescriptor
42292
+ * @memberof google.api.HttpRule
41289
42293
  * @static
41290
42294
  * @param {Object.<string,*>} message Plain object to verify
41291
42295
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
41292
42296
  */
41293
- ResourceDescriptor.verify = function verify(message) {
42297
+ HttpRule.verify = function verify(message) {
41294
42298
  if (typeof message !== "object" || message === null)
41295
42299
  return "object expected";
41296
- if (message.type != null && message.hasOwnProperty("type"))
41297
- if (!$util.isString(message.type))
41298
- return "type: string expected";
41299
- if (message.pattern != null && message.hasOwnProperty("pattern")) {
41300
- if (!Array.isArray(message.pattern))
41301
- return "pattern: array expected";
41302
- for (var i = 0; i < message.pattern.length; ++i)
41303
- if (!$util.isString(message.pattern[i]))
41304
- return "pattern: string[] expected";
42300
+ var properties = {};
42301
+ if (message.selector != null && message.hasOwnProperty("selector"))
42302
+ if (!$util.isString(message.selector))
42303
+ return "selector: string expected";
42304
+ if (message.get != null && message.hasOwnProperty("get")) {
42305
+ properties.pattern = 1;
42306
+ if (!$util.isString(message.get))
42307
+ return "get: string expected";
41305
42308
  }
41306
- if (message.nameField != null && message.hasOwnProperty("nameField"))
41307
- if (!$util.isString(message.nameField))
41308
- return "nameField: string expected";
41309
- if (message.history != null && message.hasOwnProperty("history"))
41310
- switch (message.history) {
41311
- default:
41312
- return "history: enum value expected";
41313
- case 0:
41314
- case 1:
41315
- case 2:
41316
- break;
42309
+ if (message.put != null && message.hasOwnProperty("put")) {
42310
+ if (properties.pattern === 1)
42311
+ return "pattern: multiple values";
42312
+ properties.pattern = 1;
42313
+ if (!$util.isString(message.put))
42314
+ return "put: string expected";
42315
+ }
42316
+ if (message.post != null && message.hasOwnProperty("post")) {
42317
+ if (properties.pattern === 1)
42318
+ return "pattern: multiple values";
42319
+ properties.pattern = 1;
42320
+ if (!$util.isString(message.post))
42321
+ return "post: string expected";
42322
+ }
42323
+ if (message["delete"] != null && message.hasOwnProperty("delete")) {
42324
+ if (properties.pattern === 1)
42325
+ return "pattern: multiple values";
42326
+ properties.pattern = 1;
42327
+ if (!$util.isString(message["delete"]))
42328
+ return "delete: string expected";
42329
+ }
42330
+ if (message.patch != null && message.hasOwnProperty("patch")) {
42331
+ if (properties.pattern === 1)
42332
+ return "pattern: multiple values";
42333
+ properties.pattern = 1;
42334
+ if (!$util.isString(message.patch))
42335
+ return "patch: string expected";
42336
+ }
42337
+ if (message.custom != null && message.hasOwnProperty("custom")) {
42338
+ if (properties.pattern === 1)
42339
+ return "pattern: multiple values";
42340
+ properties.pattern = 1;
42341
+ {
42342
+ var error = $root.google.api.CustomHttpPattern.verify(message.custom);
42343
+ if (error)
42344
+ return "custom." + error;
42345
+ }
42346
+ }
42347
+ if (message.body != null && message.hasOwnProperty("body"))
42348
+ if (!$util.isString(message.body))
42349
+ return "body: string expected";
42350
+ if (message.responseBody != null && message.hasOwnProperty("responseBody"))
42351
+ if (!$util.isString(message.responseBody))
42352
+ return "responseBody: string expected";
42353
+ if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
42354
+ if (!Array.isArray(message.additionalBindings))
42355
+ return "additionalBindings: array expected";
42356
+ for (var i = 0; i < message.additionalBindings.length; ++i) {
42357
+ var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
42358
+ if (error)
42359
+ return "additionalBindings." + error;
41317
42360
  }
41318
- if (message.plural != null && message.hasOwnProperty("plural"))
41319
- if (!$util.isString(message.plural))
41320
- return "plural: string expected";
41321
- if (message.singular != null && message.hasOwnProperty("singular"))
41322
- if (!$util.isString(message.singular))
41323
- return "singular: string expected";
41324
- if (message.style != null && message.hasOwnProperty("style")) {
41325
- if (!Array.isArray(message.style))
41326
- return "style: array expected";
41327
- for (var i = 0; i < message.style.length; ++i)
41328
- switch (message.style[i]) {
41329
- default:
41330
- return "style: enum value[] expected";
41331
- case 0:
41332
- case 1:
41333
- break;
41334
- }
41335
42361
  }
41336
42362
  return null;
41337
42363
  };
41338
42364
 
41339
42365
  /**
41340
- * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
42366
+ * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
41341
42367
  * @function fromObject
41342
- * @memberof google.api.ResourceDescriptor
42368
+ * @memberof google.api.HttpRule
41343
42369
  * @static
41344
42370
  * @param {Object.<string,*>} object Plain object
41345
- * @returns {google.api.ResourceDescriptor} ResourceDescriptor
42371
+ * @returns {google.api.HttpRule} HttpRule
41346
42372
  */
41347
- ResourceDescriptor.fromObject = function fromObject(object) {
41348
- if (object instanceof $root.google.api.ResourceDescriptor)
42373
+ HttpRule.fromObject = function fromObject(object) {
42374
+ if (object instanceof $root.google.api.HttpRule)
41349
42375
  return object;
41350
- var message = new $root.google.api.ResourceDescriptor();
41351
- if (object.type != null)
41352
- message.type = String(object.type);
41353
- if (object.pattern) {
41354
- if (!Array.isArray(object.pattern))
41355
- throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");
41356
- message.pattern = [];
41357
- for (var i = 0; i < object.pattern.length; ++i)
41358
- message.pattern[i] = String(object.pattern[i]);
41359
- }
41360
- if (object.nameField != null)
41361
- message.nameField = String(object.nameField);
41362
- switch (object.history) {
41363
- case "HISTORY_UNSPECIFIED":
41364
- case 0:
41365
- message.history = 0;
41366
- break;
41367
- case "ORIGINALLY_SINGLE_PATTERN":
41368
- case 1:
41369
- message.history = 1;
41370
- break;
41371
- case "FUTURE_MULTI_PATTERN":
41372
- case 2:
41373
- message.history = 2;
41374
- break;
42376
+ var message = new $root.google.api.HttpRule();
42377
+ if (object.selector != null)
42378
+ message.selector = String(object.selector);
42379
+ if (object.get != null)
42380
+ message.get = String(object.get);
42381
+ if (object.put != null)
42382
+ message.put = String(object.put);
42383
+ if (object.post != null)
42384
+ message.post = String(object.post);
42385
+ if (object["delete"] != null)
42386
+ message["delete"] = String(object["delete"]);
42387
+ if (object.patch != null)
42388
+ message.patch = String(object.patch);
42389
+ if (object.custom != null) {
42390
+ if (typeof object.custom !== "object")
42391
+ throw TypeError(".google.api.HttpRule.custom: object expected");
42392
+ message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
41375
42393
  }
41376
- if (object.plural != null)
41377
- message.plural = String(object.plural);
41378
- if (object.singular != null)
41379
- message.singular = String(object.singular);
41380
- if (object.style) {
41381
- if (!Array.isArray(object.style))
41382
- throw TypeError(".google.api.ResourceDescriptor.style: array expected");
41383
- message.style = [];
41384
- for (var i = 0; i < object.style.length; ++i)
41385
- switch (object.style[i]) {
41386
- default:
41387
- case "STYLE_UNSPECIFIED":
41388
- case 0:
41389
- message.style[i] = 0;
41390
- break;
41391
- case "DECLARATIVE_FRIENDLY":
41392
- case 1:
41393
- message.style[i] = 1;
41394
- break;
41395
- }
42394
+ if (object.body != null)
42395
+ message.body = String(object.body);
42396
+ if (object.responseBody != null)
42397
+ message.responseBody = String(object.responseBody);
42398
+ if (object.additionalBindings) {
42399
+ if (!Array.isArray(object.additionalBindings))
42400
+ throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
42401
+ message.additionalBindings = [];
42402
+ for (var i = 0; i < object.additionalBindings.length; ++i) {
42403
+ if (typeof object.additionalBindings[i] !== "object")
42404
+ throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
42405
+ message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
42406
+ }
41396
42407
  }
41397
42408
  return message;
41398
42409
  };
41399
42410
 
41400
42411
  /**
41401
- * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
42412
+ * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
41402
42413
  * @function toObject
41403
- * @memberof google.api.ResourceDescriptor
42414
+ * @memberof google.api.HttpRule
41404
42415
  * @static
41405
- * @param {google.api.ResourceDescriptor} message ResourceDescriptor
42416
+ * @param {google.api.HttpRule} message HttpRule
41406
42417
  * @param {$protobuf.IConversionOptions} [options] Conversion options
41407
42418
  * @returns {Object.<string,*>} Plain object
41408
42419
  */
41409
- ResourceDescriptor.toObject = function toObject(message, options) {
42420
+ HttpRule.toObject = function toObject(message, options) {
41410
42421
  if (!options)
41411
42422
  options = {};
41412
42423
  var object = {};
41413
- if (options.arrays || options.defaults) {
41414
- object.pattern = [];
41415
- object.style = [];
41416
- }
42424
+ if (options.arrays || options.defaults)
42425
+ object.additionalBindings = [];
41417
42426
  if (options.defaults) {
41418
- object.type = "";
41419
- object.nameField = "";
41420
- object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0;
41421
- object.plural = "";
41422
- object.singular = "";
42427
+ object.selector = "";
42428
+ object.body = "";
42429
+ object.responseBody = "";
41423
42430
  }
41424
- if (message.type != null && message.hasOwnProperty("type"))
41425
- object.type = message.type;
41426
- if (message.pattern && message.pattern.length) {
41427
- object.pattern = [];
41428
- for (var j = 0; j < message.pattern.length; ++j)
41429
- object.pattern[j] = message.pattern[j];
42431
+ if (message.selector != null && message.hasOwnProperty("selector"))
42432
+ object.selector = message.selector;
42433
+ if (message.get != null && message.hasOwnProperty("get")) {
42434
+ object.get = message.get;
42435
+ if (options.oneofs)
42436
+ object.pattern = "get";
41430
42437
  }
41431
- if (message.nameField != null && message.hasOwnProperty("nameField"))
41432
- object.nameField = message.nameField;
41433
- if (message.history != null && message.hasOwnProperty("history"))
41434
- object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history;
41435
- if (message.plural != null && message.hasOwnProperty("plural"))
41436
- object.plural = message.plural;
41437
- if (message.singular != null && message.hasOwnProperty("singular"))
41438
- object.singular = message.singular;
41439
- if (message.style && message.style.length) {
41440
- object.style = [];
41441
- for (var j = 0; j < message.style.length; ++j)
41442
- object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j];
42438
+ if (message.put != null && message.hasOwnProperty("put")) {
42439
+ object.put = message.put;
42440
+ if (options.oneofs)
42441
+ object.pattern = "put";
42442
+ }
42443
+ if (message.post != null && message.hasOwnProperty("post")) {
42444
+ object.post = message.post;
42445
+ if (options.oneofs)
42446
+ object.pattern = "post";
42447
+ }
42448
+ if (message["delete"] != null && message.hasOwnProperty("delete")) {
42449
+ object["delete"] = message["delete"];
42450
+ if (options.oneofs)
42451
+ object.pattern = "delete";
42452
+ }
42453
+ if (message.patch != null && message.hasOwnProperty("patch")) {
42454
+ object.patch = message.patch;
42455
+ if (options.oneofs)
42456
+ object.pattern = "patch";
42457
+ }
42458
+ if (message.body != null && message.hasOwnProperty("body"))
42459
+ object.body = message.body;
42460
+ if (message.custom != null && message.hasOwnProperty("custom")) {
42461
+ object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
42462
+ if (options.oneofs)
42463
+ object.pattern = "custom";
42464
+ }
42465
+ if (message.additionalBindings && message.additionalBindings.length) {
42466
+ object.additionalBindings = [];
42467
+ for (var j = 0; j < message.additionalBindings.length; ++j)
42468
+ object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
41443
42469
  }
42470
+ if (message.responseBody != null && message.hasOwnProperty("responseBody"))
42471
+ object.responseBody = message.responseBody;
41444
42472
  return object;
41445
42473
  };
41446
42474
 
41447
42475
  /**
41448
- * Converts this ResourceDescriptor to JSON.
42476
+ * Converts this HttpRule to JSON.
41449
42477
  * @function toJSON
41450
- * @memberof google.api.ResourceDescriptor
42478
+ * @memberof google.api.HttpRule
41451
42479
  * @instance
41452
42480
  * @returns {Object.<string,*>} JSON object
41453
42481
  */
41454
- ResourceDescriptor.prototype.toJSON = function toJSON() {
42482
+ HttpRule.prototype.toJSON = function toJSON() {
41455
42483
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
41456
42484
  };
41457
42485
 
41458
- /**
41459
- * History enum.
41460
- * @name google.api.ResourceDescriptor.History
41461
- * @enum {number}
41462
- * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value
41463
- * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value
41464
- * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value
41465
- */
41466
- ResourceDescriptor.History = (function() {
41467
- var valuesById = {}, values = Object.create(valuesById);
41468
- values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0;
41469
- values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1;
41470
- values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2;
41471
- return values;
41472
- })();
41473
-
41474
- /**
41475
- * Style enum.
41476
- * @name google.api.ResourceDescriptor.Style
41477
- * @enum {number}
41478
- * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value
41479
- * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value
41480
- */
41481
- ResourceDescriptor.Style = (function() {
41482
- var valuesById = {}, values = Object.create(valuesById);
41483
- values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0;
41484
- values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1;
41485
- return values;
41486
- })();
41487
-
41488
- return ResourceDescriptor;
42486
+ return HttpRule;
41489
42487
  })();
41490
42488
 
41491
- api.ResourceReference = (function() {
42489
+ api.CustomHttpPattern = (function() {
41492
42490
 
41493
42491
  /**
41494
- * Properties of a ResourceReference.
42492
+ * Properties of a CustomHttpPattern.
41495
42493
  * @memberof google.api
41496
- * @interface IResourceReference
41497
- * @property {string|null} [type] ResourceReference type
41498
- * @property {string|null} [childType] ResourceReference childType
42494
+ * @interface ICustomHttpPattern
42495
+ * @property {string|null} [kind] CustomHttpPattern kind
42496
+ * @property {string|null} [path] CustomHttpPattern path
41499
42497
  */
41500
42498
 
41501
42499
  /**
41502
- * Constructs a new ResourceReference.
42500
+ * Constructs a new CustomHttpPattern.
41503
42501
  * @memberof google.api
41504
- * @classdesc Represents a ResourceReference.
41505
- * @implements IResourceReference
42502
+ * @classdesc Represents a CustomHttpPattern.
42503
+ * @implements ICustomHttpPattern
41506
42504
  * @constructor
41507
- * @param {google.api.IResourceReference=} [properties] Properties to set
42505
+ * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
41508
42506
  */
41509
- function ResourceReference(properties) {
42507
+ function CustomHttpPattern(properties) {
41510
42508
  if (properties)
41511
42509
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
41512
42510
  if (properties[keys[i]] != null)
@@ -41514,88 +42512,88 @@
41514
42512
  }
41515
42513
 
41516
42514
  /**
41517
- * ResourceReference type.
41518
- * @member {string} type
41519
- * @memberof google.api.ResourceReference
42515
+ * CustomHttpPattern kind.
42516
+ * @member {string} kind
42517
+ * @memberof google.api.CustomHttpPattern
41520
42518
  * @instance
41521
42519
  */
41522
- ResourceReference.prototype.type = "";
42520
+ CustomHttpPattern.prototype.kind = "";
41523
42521
 
41524
42522
  /**
41525
- * ResourceReference childType.
41526
- * @member {string} childType
41527
- * @memberof google.api.ResourceReference
42523
+ * CustomHttpPattern path.
42524
+ * @member {string} path
42525
+ * @memberof google.api.CustomHttpPattern
41528
42526
  * @instance
41529
42527
  */
41530
- ResourceReference.prototype.childType = "";
42528
+ CustomHttpPattern.prototype.path = "";
41531
42529
 
41532
42530
  /**
41533
- * Creates a new ResourceReference instance using the specified properties.
42531
+ * Creates a new CustomHttpPattern instance using the specified properties.
41534
42532
  * @function create
41535
- * @memberof google.api.ResourceReference
42533
+ * @memberof google.api.CustomHttpPattern
41536
42534
  * @static
41537
- * @param {google.api.IResourceReference=} [properties] Properties to set
41538
- * @returns {google.api.ResourceReference} ResourceReference instance
42535
+ * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
42536
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
41539
42537
  */
41540
- ResourceReference.create = function create(properties) {
41541
- return new ResourceReference(properties);
42538
+ CustomHttpPattern.create = function create(properties) {
42539
+ return new CustomHttpPattern(properties);
41542
42540
  };
41543
42541
 
41544
42542
  /**
41545
- * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
42543
+ * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
41546
42544
  * @function encode
41547
- * @memberof google.api.ResourceReference
42545
+ * @memberof google.api.CustomHttpPattern
41548
42546
  * @static
41549
- * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
42547
+ * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
41550
42548
  * @param {$protobuf.Writer} [writer] Writer to encode to
41551
42549
  * @returns {$protobuf.Writer} Writer
41552
42550
  */
41553
- ResourceReference.encode = function encode(message, writer) {
42551
+ CustomHttpPattern.encode = function encode(message, writer) {
41554
42552
  if (!writer)
41555
42553
  writer = $Writer.create();
41556
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
41557
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
41558
- if (message.childType != null && Object.hasOwnProperty.call(message, "childType"))
41559
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType);
42554
+ if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
42555
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
42556
+ if (message.path != null && Object.hasOwnProperty.call(message, "path"))
42557
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
41560
42558
  return writer;
41561
42559
  };
41562
42560
 
41563
42561
  /**
41564
- * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
42562
+ * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
41565
42563
  * @function encodeDelimited
41566
- * @memberof google.api.ResourceReference
42564
+ * @memberof google.api.CustomHttpPattern
41567
42565
  * @static
41568
- * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
42566
+ * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
41569
42567
  * @param {$protobuf.Writer} [writer] Writer to encode to
41570
42568
  * @returns {$protobuf.Writer} Writer
41571
42569
  */
41572
- ResourceReference.encodeDelimited = function encodeDelimited(message, writer) {
42570
+ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
41573
42571
  return this.encode(message, writer).ldelim();
41574
42572
  };
41575
42573
 
41576
42574
  /**
41577
- * Decodes a ResourceReference message from the specified reader or buffer.
42575
+ * Decodes a CustomHttpPattern message from the specified reader or buffer.
41578
42576
  * @function decode
41579
- * @memberof google.api.ResourceReference
42577
+ * @memberof google.api.CustomHttpPattern
41580
42578
  * @static
41581
42579
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
41582
42580
  * @param {number} [length] Message length if known beforehand
41583
- * @returns {google.api.ResourceReference} ResourceReference
42581
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
41584
42582
  * @throws {Error} If the payload is not a reader or valid buffer
41585
42583
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
41586
42584
  */
41587
- ResourceReference.decode = function decode(reader, length) {
42585
+ CustomHttpPattern.decode = function decode(reader, length) {
41588
42586
  if (!(reader instanceof $Reader))
41589
42587
  reader = $Reader.create(reader);
41590
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference();
42588
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
41591
42589
  while (reader.pos < end) {
41592
42590
  var tag = reader.uint32();
41593
42591
  switch (tag >>> 3) {
41594
42592
  case 1:
41595
- message.type = reader.string();
42593
+ message.kind = reader.string();
41596
42594
  break;
41597
42595
  case 2:
41598
- message.childType = reader.string();
42596
+ message.path = reader.string();
41599
42597
  break;
41600
42598
  default:
41601
42599
  reader.skipType(tag & 7);
@@ -41606,96 +42604,96 @@
41606
42604
  };
41607
42605
 
41608
42606
  /**
41609
- * Decodes a ResourceReference message from the specified reader or buffer, length delimited.
42607
+ * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
41610
42608
  * @function decodeDelimited
41611
- * @memberof google.api.ResourceReference
42609
+ * @memberof google.api.CustomHttpPattern
41612
42610
  * @static
41613
42611
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
41614
- * @returns {google.api.ResourceReference} ResourceReference
42612
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
41615
42613
  * @throws {Error} If the payload is not a reader or valid buffer
41616
42614
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
41617
42615
  */
41618
- ResourceReference.decodeDelimited = function decodeDelimited(reader) {
42616
+ CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
41619
42617
  if (!(reader instanceof $Reader))
41620
42618
  reader = new $Reader(reader);
41621
42619
  return this.decode(reader, reader.uint32());
41622
42620
  };
41623
42621
 
41624
42622
  /**
41625
- * Verifies a ResourceReference message.
42623
+ * Verifies a CustomHttpPattern message.
41626
42624
  * @function verify
41627
- * @memberof google.api.ResourceReference
42625
+ * @memberof google.api.CustomHttpPattern
41628
42626
  * @static
41629
42627
  * @param {Object.<string,*>} message Plain object to verify
41630
42628
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
41631
42629
  */
41632
- ResourceReference.verify = function verify(message) {
42630
+ CustomHttpPattern.verify = function verify(message) {
41633
42631
  if (typeof message !== "object" || message === null)
41634
42632
  return "object expected";
41635
- if (message.type != null && message.hasOwnProperty("type"))
41636
- if (!$util.isString(message.type))
41637
- return "type: string expected";
41638
- if (message.childType != null && message.hasOwnProperty("childType"))
41639
- if (!$util.isString(message.childType))
41640
- return "childType: string expected";
42633
+ if (message.kind != null && message.hasOwnProperty("kind"))
42634
+ if (!$util.isString(message.kind))
42635
+ return "kind: string expected";
42636
+ if (message.path != null && message.hasOwnProperty("path"))
42637
+ if (!$util.isString(message.path))
42638
+ return "path: string expected";
41641
42639
  return null;
41642
42640
  };
41643
42641
 
41644
42642
  /**
41645
- * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
42643
+ * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
41646
42644
  * @function fromObject
41647
- * @memberof google.api.ResourceReference
42645
+ * @memberof google.api.CustomHttpPattern
41648
42646
  * @static
41649
42647
  * @param {Object.<string,*>} object Plain object
41650
- * @returns {google.api.ResourceReference} ResourceReference
42648
+ * @returns {google.api.CustomHttpPattern} CustomHttpPattern
41651
42649
  */
41652
- ResourceReference.fromObject = function fromObject(object) {
41653
- if (object instanceof $root.google.api.ResourceReference)
42650
+ CustomHttpPattern.fromObject = function fromObject(object) {
42651
+ if (object instanceof $root.google.api.CustomHttpPattern)
41654
42652
  return object;
41655
- var message = new $root.google.api.ResourceReference();
41656
- if (object.type != null)
41657
- message.type = String(object.type);
41658
- if (object.childType != null)
41659
- message.childType = String(object.childType);
42653
+ var message = new $root.google.api.CustomHttpPattern();
42654
+ if (object.kind != null)
42655
+ message.kind = String(object.kind);
42656
+ if (object.path != null)
42657
+ message.path = String(object.path);
41660
42658
  return message;
41661
42659
  };
41662
42660
 
41663
42661
  /**
41664
- * Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
42662
+ * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
41665
42663
  * @function toObject
41666
- * @memberof google.api.ResourceReference
42664
+ * @memberof google.api.CustomHttpPattern
41667
42665
  * @static
41668
- * @param {google.api.ResourceReference} message ResourceReference
42666
+ * @param {google.api.CustomHttpPattern} message CustomHttpPattern
41669
42667
  * @param {$protobuf.IConversionOptions} [options] Conversion options
41670
42668
  * @returns {Object.<string,*>} Plain object
41671
42669
  */
41672
- ResourceReference.toObject = function toObject(message, options) {
42670
+ CustomHttpPattern.toObject = function toObject(message, options) {
41673
42671
  if (!options)
41674
42672
  options = {};
41675
42673
  var object = {};
41676
42674
  if (options.defaults) {
41677
- object.type = "";
41678
- object.childType = "";
42675
+ object.kind = "";
42676
+ object.path = "";
41679
42677
  }
41680
- if (message.type != null && message.hasOwnProperty("type"))
41681
- object.type = message.type;
41682
- if (message.childType != null && message.hasOwnProperty("childType"))
41683
- object.childType = message.childType;
42678
+ if (message.kind != null && message.hasOwnProperty("kind"))
42679
+ object.kind = message.kind;
42680
+ if (message.path != null && message.hasOwnProperty("path"))
42681
+ object.path = message.path;
41684
42682
  return object;
41685
42683
  };
41686
42684
 
41687
42685
  /**
41688
- * Converts this ResourceReference to JSON.
42686
+ * Converts this CustomHttpPattern to JSON.
41689
42687
  * @function toJSON
41690
- * @memberof google.api.ResourceReference
42688
+ * @memberof google.api.CustomHttpPattern
41691
42689
  * @instance
41692
42690
  * @returns {Object.<string,*>} JSON object
41693
42691
  */
41694
- ResourceReference.prototype.toJSON = function toJSON() {
42692
+ CustomHttpPattern.prototype.toJSON = function toJSON() {
41695
42693
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
41696
42694
  };
41697
42695
 
41698
- return ResourceReference;
42696
+ return CustomHttpPattern;
41699
42697
  })();
41700
42698
 
41701
42699
  return api;
@@ -43862,6 +44860,7 @@
43862
44860
  * @interface ISetIamPolicyRequest
43863
44861
  * @property {string|null} [resource] SetIamPolicyRequest resource
43864
44862
  * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy
44863
+ * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask
43865
44864
  */
43866
44865
 
43867
44866
  /**
@@ -43895,6 +44894,14 @@
43895
44894
  */
43896
44895
  SetIamPolicyRequest.prototype.policy = null;
43897
44896
 
44897
+ /**
44898
+ * SetIamPolicyRequest updateMask.
44899
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
44900
+ * @memberof google.iam.v1.SetIamPolicyRequest
44901
+ * @instance
44902
+ */
44903
+ SetIamPolicyRequest.prototype.updateMask = null;
44904
+
43898
44905
  /**
43899
44906
  * Creates a new SetIamPolicyRequest instance using the specified properties.
43900
44907
  * @function create
@@ -43923,6 +44930,8 @@
43923
44930
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
43924
44931
  if (message.policy != null && Object.hasOwnProperty.call(message, "policy"))
43925
44932
  $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
44933
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
44934
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
43926
44935
  return writer;
43927
44936
  };
43928
44937
 
@@ -43963,6 +44972,9 @@
43963
44972
  case 2:
43964
44973
  message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32());
43965
44974
  break;
44975
+ case 3:
44976
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
44977
+ break;
43966
44978
  default:
43967
44979
  reader.skipType(tag & 7);
43968
44980
  break;
@@ -44006,6 +45018,11 @@
44006
45018
  if (error)
44007
45019
  return "policy." + error;
44008
45020
  }
45021
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
45022
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
45023
+ if (error)
45024
+ return "updateMask." + error;
45025
+ }
44009
45026
  return null;
44010
45027
  };
44011
45028
 
@@ -44028,6 +45045,11 @@
44028
45045
  throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected");
44029
45046
  message.policy = $root.google.iam.v1.Policy.fromObject(object.policy);
44030
45047
  }
45048
+ if (object.updateMask != null) {
45049
+ if (typeof object.updateMask !== "object")
45050
+ throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected");
45051
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
45052
+ }
44031
45053
  return message;
44032
45054
  };
44033
45055
 
@@ -44047,11 +45069,14 @@
44047
45069
  if (options.defaults) {
44048
45070
  object.resource = "";
44049
45071
  object.policy = null;
45072
+ object.updateMask = null;
44050
45073
  }
44051
45074
  if (message.resource != null && message.hasOwnProperty("resource"))
44052
45075
  object.resource = message.resource;
44053
45076
  if (message.policy != null && message.hasOwnProperty("policy"))
44054
45077
  object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options);
45078
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
45079
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
44055
45080
  return object;
44056
45081
  };
44057
45082
 
@@ -44908,6 +45933,7 @@
44908
45933
  * @interface IPolicy
44909
45934
  * @property {number|null} [version] Policy version
44910
45935
  * @property {Array.<google.iam.v1.IBinding>|null} [bindings] Policy bindings
45936
+ * @property {Array.<google.iam.v1.IAuditConfig>|null} [auditConfigs] Policy auditConfigs
44911
45937
  * @property {Uint8Array|null} [etag] Policy etag
44912
45938
  */
44913
45939
 
@@ -44921,6 +45947,7 @@
44921
45947
  */
44922
45948
  function Policy(properties) {
44923
45949
  this.bindings = [];
45950
+ this.auditConfigs = [];
44924
45951
  if (properties)
44925
45952
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
44926
45953
  if (properties[keys[i]] != null)
@@ -44943,6 +45970,14 @@
44943
45970
  */
44944
45971
  Policy.prototype.bindings = $util.emptyArray;
44945
45972
 
45973
+ /**
45974
+ * Policy auditConfigs.
45975
+ * @member {Array.<google.iam.v1.IAuditConfig>} auditConfigs
45976
+ * @memberof google.iam.v1.Policy
45977
+ * @instance
45978
+ */
45979
+ Policy.prototype.auditConfigs = $util.emptyArray;
45980
+
44946
45981
  /**
44947
45982
  * Policy etag.
44948
45983
  * @member {Uint8Array} etag
@@ -44982,6 +46017,9 @@
44982
46017
  if (message.bindings != null && message.bindings.length)
44983
46018
  for (var i = 0; i < message.bindings.length; ++i)
44984
46019
  $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
46020
+ if (message.auditConfigs != null && message.auditConfigs.length)
46021
+ for (var i = 0; i < message.auditConfigs.length; ++i)
46022
+ $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
44985
46023
  return writer;
44986
46024
  };
44987
46025
 
@@ -45024,6 +46062,11 @@
45024
46062
  message.bindings = [];
45025
46063
  message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32()));
45026
46064
  break;
46065
+ case 6:
46066
+ if (!(message.auditConfigs && message.auditConfigs.length))
46067
+ message.auditConfigs = [];
46068
+ message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32()));
46069
+ break;
45027
46070
  case 3:
45028
46071
  message.etag = reader.bytes();
45029
46072
  break;
@@ -45074,6 +46117,15 @@
45074
46117
  return "bindings." + error;
45075
46118
  }
45076
46119
  }
46120
+ if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) {
46121
+ if (!Array.isArray(message.auditConfigs))
46122
+ return "auditConfigs: array expected";
46123
+ for (var i = 0; i < message.auditConfigs.length; ++i) {
46124
+ var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]);
46125
+ if (error)
46126
+ return "auditConfigs." + error;
46127
+ }
46128
+ }
45077
46129
  if (message.etag != null && message.hasOwnProperty("etag"))
45078
46130
  if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag)))
45079
46131
  return "etag: buffer expected";
@@ -45104,6 +46156,16 @@
45104
46156
  message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]);
45105
46157
  }
45106
46158
  }
46159
+ if (object.auditConfigs) {
46160
+ if (!Array.isArray(object.auditConfigs))
46161
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected");
46162
+ message.auditConfigs = [];
46163
+ for (var i = 0; i < object.auditConfigs.length; ++i) {
46164
+ if (typeof object.auditConfigs[i] !== "object")
46165
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected");
46166
+ message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]);
46167
+ }
46168
+ }
45107
46169
  if (object.etag != null)
45108
46170
  if (typeof object.etag === "string")
45109
46171
  $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0);
@@ -45125,8 +46187,10 @@
45125
46187
  if (!options)
45126
46188
  options = {};
45127
46189
  var object = {};
45128
- if (options.arrays || options.defaults)
46190
+ if (options.arrays || options.defaults) {
45129
46191
  object.bindings = [];
46192
+ object.auditConfigs = [];
46193
+ }
45130
46194
  if (options.defaults) {
45131
46195
  object.version = 0;
45132
46196
  if (options.bytes === String)
@@ -45146,6 +46210,11 @@
45146
46210
  for (var j = 0; j < message.bindings.length; ++j)
45147
46211
  object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options);
45148
46212
  }
46213
+ if (message.auditConfigs && message.auditConfigs.length) {
46214
+ object.auditConfigs = [];
46215
+ for (var j = 0; j < message.auditConfigs.length; ++j)
46216
+ object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options);
46217
+ }
45149
46218
  return object;
45150
46219
  };
45151
46220
 
@@ -45417,6 +46486,504 @@
45417
46486
  return Binding;
45418
46487
  })();
45419
46488
 
46489
+ v1.AuditConfig = (function() {
46490
+
46491
+ /**
46492
+ * Properties of an AuditConfig.
46493
+ * @memberof google.iam.v1
46494
+ * @interface IAuditConfig
46495
+ * @property {string|null} [service] AuditConfig service
46496
+ * @property {Array.<google.iam.v1.IAuditLogConfig>|null} [auditLogConfigs] AuditConfig auditLogConfigs
46497
+ */
46498
+
46499
+ /**
46500
+ * Constructs a new AuditConfig.
46501
+ * @memberof google.iam.v1
46502
+ * @classdesc Represents an AuditConfig.
46503
+ * @implements IAuditConfig
46504
+ * @constructor
46505
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
46506
+ */
46507
+ function AuditConfig(properties) {
46508
+ this.auditLogConfigs = [];
46509
+ if (properties)
46510
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46511
+ if (properties[keys[i]] != null)
46512
+ this[keys[i]] = properties[keys[i]];
46513
+ }
46514
+
46515
+ /**
46516
+ * AuditConfig service.
46517
+ * @member {string} service
46518
+ * @memberof google.iam.v1.AuditConfig
46519
+ * @instance
46520
+ */
46521
+ AuditConfig.prototype.service = "";
46522
+
46523
+ /**
46524
+ * AuditConfig auditLogConfigs.
46525
+ * @member {Array.<google.iam.v1.IAuditLogConfig>} auditLogConfigs
46526
+ * @memberof google.iam.v1.AuditConfig
46527
+ * @instance
46528
+ */
46529
+ AuditConfig.prototype.auditLogConfigs = $util.emptyArray;
46530
+
46531
+ /**
46532
+ * Creates a new AuditConfig instance using the specified properties.
46533
+ * @function create
46534
+ * @memberof google.iam.v1.AuditConfig
46535
+ * @static
46536
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
46537
+ * @returns {google.iam.v1.AuditConfig} AuditConfig instance
46538
+ */
46539
+ AuditConfig.create = function create(properties) {
46540
+ return new AuditConfig(properties);
46541
+ };
46542
+
46543
+ /**
46544
+ * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
46545
+ * @function encode
46546
+ * @memberof google.iam.v1.AuditConfig
46547
+ * @static
46548
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
46549
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46550
+ * @returns {$protobuf.Writer} Writer
46551
+ */
46552
+ AuditConfig.encode = function encode(message, writer) {
46553
+ if (!writer)
46554
+ writer = $Writer.create();
46555
+ if (message.service != null && Object.hasOwnProperty.call(message, "service"))
46556
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.service);
46557
+ if (message.auditLogConfigs != null && message.auditLogConfigs.length)
46558
+ for (var i = 0; i < message.auditLogConfigs.length; ++i)
46559
+ $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
46560
+ return writer;
46561
+ };
46562
+
46563
+ /**
46564
+ * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
46565
+ * @function encodeDelimited
46566
+ * @memberof google.iam.v1.AuditConfig
46567
+ * @static
46568
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
46569
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46570
+ * @returns {$protobuf.Writer} Writer
46571
+ */
46572
+ AuditConfig.encodeDelimited = function encodeDelimited(message, writer) {
46573
+ return this.encode(message, writer).ldelim();
46574
+ };
46575
+
46576
+ /**
46577
+ * Decodes an AuditConfig message from the specified reader or buffer.
46578
+ * @function decode
46579
+ * @memberof google.iam.v1.AuditConfig
46580
+ * @static
46581
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46582
+ * @param {number} [length] Message length if known beforehand
46583
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46584
+ * @throws {Error} If the payload is not a reader or valid buffer
46585
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46586
+ */
46587
+ AuditConfig.decode = function decode(reader, length) {
46588
+ if (!(reader instanceof $Reader))
46589
+ reader = $Reader.create(reader);
46590
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig();
46591
+ while (reader.pos < end) {
46592
+ var tag = reader.uint32();
46593
+ switch (tag >>> 3) {
46594
+ case 1:
46595
+ message.service = reader.string();
46596
+ break;
46597
+ case 3:
46598
+ if (!(message.auditLogConfigs && message.auditLogConfigs.length))
46599
+ message.auditLogConfigs = [];
46600
+ message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32()));
46601
+ break;
46602
+ default:
46603
+ reader.skipType(tag & 7);
46604
+ break;
46605
+ }
46606
+ }
46607
+ return message;
46608
+ };
46609
+
46610
+ /**
46611
+ * Decodes an AuditConfig message from the specified reader or buffer, length delimited.
46612
+ * @function decodeDelimited
46613
+ * @memberof google.iam.v1.AuditConfig
46614
+ * @static
46615
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46616
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46617
+ * @throws {Error} If the payload is not a reader or valid buffer
46618
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46619
+ */
46620
+ AuditConfig.decodeDelimited = function decodeDelimited(reader) {
46621
+ if (!(reader instanceof $Reader))
46622
+ reader = new $Reader(reader);
46623
+ return this.decode(reader, reader.uint32());
46624
+ };
46625
+
46626
+ /**
46627
+ * Verifies an AuditConfig message.
46628
+ * @function verify
46629
+ * @memberof google.iam.v1.AuditConfig
46630
+ * @static
46631
+ * @param {Object.<string,*>} message Plain object to verify
46632
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46633
+ */
46634
+ AuditConfig.verify = function verify(message) {
46635
+ if (typeof message !== "object" || message === null)
46636
+ return "object expected";
46637
+ if (message.service != null && message.hasOwnProperty("service"))
46638
+ if (!$util.isString(message.service))
46639
+ return "service: string expected";
46640
+ if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) {
46641
+ if (!Array.isArray(message.auditLogConfigs))
46642
+ return "auditLogConfigs: array expected";
46643
+ for (var i = 0; i < message.auditLogConfigs.length; ++i) {
46644
+ var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]);
46645
+ if (error)
46646
+ return "auditLogConfigs." + error;
46647
+ }
46648
+ }
46649
+ return null;
46650
+ };
46651
+
46652
+ /**
46653
+ * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types.
46654
+ * @function fromObject
46655
+ * @memberof google.iam.v1.AuditConfig
46656
+ * @static
46657
+ * @param {Object.<string,*>} object Plain object
46658
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46659
+ */
46660
+ AuditConfig.fromObject = function fromObject(object) {
46661
+ if (object instanceof $root.google.iam.v1.AuditConfig)
46662
+ return object;
46663
+ var message = new $root.google.iam.v1.AuditConfig();
46664
+ if (object.service != null)
46665
+ message.service = String(object.service);
46666
+ if (object.auditLogConfigs) {
46667
+ if (!Array.isArray(object.auditLogConfigs))
46668
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected");
46669
+ message.auditLogConfigs = [];
46670
+ for (var i = 0; i < object.auditLogConfigs.length; ++i) {
46671
+ if (typeof object.auditLogConfigs[i] !== "object")
46672
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected");
46673
+ message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]);
46674
+ }
46675
+ }
46676
+ return message;
46677
+ };
46678
+
46679
+ /**
46680
+ * Creates a plain object from an AuditConfig message. Also converts values to other types if specified.
46681
+ * @function toObject
46682
+ * @memberof google.iam.v1.AuditConfig
46683
+ * @static
46684
+ * @param {google.iam.v1.AuditConfig} message AuditConfig
46685
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46686
+ * @returns {Object.<string,*>} Plain object
46687
+ */
46688
+ AuditConfig.toObject = function toObject(message, options) {
46689
+ if (!options)
46690
+ options = {};
46691
+ var object = {};
46692
+ if (options.arrays || options.defaults)
46693
+ object.auditLogConfigs = [];
46694
+ if (options.defaults)
46695
+ object.service = "";
46696
+ if (message.service != null && message.hasOwnProperty("service"))
46697
+ object.service = message.service;
46698
+ if (message.auditLogConfigs && message.auditLogConfigs.length) {
46699
+ object.auditLogConfigs = [];
46700
+ for (var j = 0; j < message.auditLogConfigs.length; ++j)
46701
+ object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options);
46702
+ }
46703
+ return object;
46704
+ };
46705
+
46706
+ /**
46707
+ * Converts this AuditConfig to JSON.
46708
+ * @function toJSON
46709
+ * @memberof google.iam.v1.AuditConfig
46710
+ * @instance
46711
+ * @returns {Object.<string,*>} JSON object
46712
+ */
46713
+ AuditConfig.prototype.toJSON = function toJSON() {
46714
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46715
+ };
46716
+
46717
+ return AuditConfig;
46718
+ })();
46719
+
46720
+ v1.AuditLogConfig = (function() {
46721
+
46722
+ /**
46723
+ * Properties of an AuditLogConfig.
46724
+ * @memberof google.iam.v1
46725
+ * @interface IAuditLogConfig
46726
+ * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType
46727
+ * @property {Array.<string>|null} [exemptedMembers] AuditLogConfig exemptedMembers
46728
+ */
46729
+
46730
+ /**
46731
+ * Constructs a new AuditLogConfig.
46732
+ * @memberof google.iam.v1
46733
+ * @classdesc Represents an AuditLogConfig.
46734
+ * @implements IAuditLogConfig
46735
+ * @constructor
46736
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
46737
+ */
46738
+ function AuditLogConfig(properties) {
46739
+ this.exemptedMembers = [];
46740
+ if (properties)
46741
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46742
+ if (properties[keys[i]] != null)
46743
+ this[keys[i]] = properties[keys[i]];
46744
+ }
46745
+
46746
+ /**
46747
+ * AuditLogConfig logType.
46748
+ * @member {google.iam.v1.AuditLogConfig.LogType} logType
46749
+ * @memberof google.iam.v1.AuditLogConfig
46750
+ * @instance
46751
+ */
46752
+ AuditLogConfig.prototype.logType = 0;
46753
+
46754
+ /**
46755
+ * AuditLogConfig exemptedMembers.
46756
+ * @member {Array.<string>} exemptedMembers
46757
+ * @memberof google.iam.v1.AuditLogConfig
46758
+ * @instance
46759
+ */
46760
+ AuditLogConfig.prototype.exemptedMembers = $util.emptyArray;
46761
+
46762
+ /**
46763
+ * Creates a new AuditLogConfig instance using the specified properties.
46764
+ * @function create
46765
+ * @memberof google.iam.v1.AuditLogConfig
46766
+ * @static
46767
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
46768
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance
46769
+ */
46770
+ AuditLogConfig.create = function create(properties) {
46771
+ return new AuditLogConfig(properties);
46772
+ };
46773
+
46774
+ /**
46775
+ * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
46776
+ * @function encode
46777
+ * @memberof google.iam.v1.AuditLogConfig
46778
+ * @static
46779
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
46780
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46781
+ * @returns {$protobuf.Writer} Writer
46782
+ */
46783
+ AuditLogConfig.encode = function encode(message, writer) {
46784
+ if (!writer)
46785
+ writer = $Writer.create();
46786
+ if (message.logType != null && Object.hasOwnProperty.call(message, "logType"))
46787
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType);
46788
+ if (message.exemptedMembers != null && message.exemptedMembers.length)
46789
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
46790
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]);
46791
+ return writer;
46792
+ };
46793
+
46794
+ /**
46795
+ * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
46796
+ * @function encodeDelimited
46797
+ * @memberof google.iam.v1.AuditLogConfig
46798
+ * @static
46799
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
46800
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46801
+ * @returns {$protobuf.Writer} Writer
46802
+ */
46803
+ AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) {
46804
+ return this.encode(message, writer).ldelim();
46805
+ };
46806
+
46807
+ /**
46808
+ * Decodes an AuditLogConfig message from the specified reader or buffer.
46809
+ * @function decode
46810
+ * @memberof google.iam.v1.AuditLogConfig
46811
+ * @static
46812
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46813
+ * @param {number} [length] Message length if known beforehand
46814
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46815
+ * @throws {Error} If the payload is not a reader or valid buffer
46816
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46817
+ */
46818
+ AuditLogConfig.decode = function decode(reader, length) {
46819
+ if (!(reader instanceof $Reader))
46820
+ reader = $Reader.create(reader);
46821
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig();
46822
+ while (reader.pos < end) {
46823
+ var tag = reader.uint32();
46824
+ switch (tag >>> 3) {
46825
+ case 1:
46826
+ message.logType = reader.int32();
46827
+ break;
46828
+ case 2:
46829
+ if (!(message.exemptedMembers && message.exemptedMembers.length))
46830
+ message.exemptedMembers = [];
46831
+ message.exemptedMembers.push(reader.string());
46832
+ break;
46833
+ default:
46834
+ reader.skipType(tag & 7);
46835
+ break;
46836
+ }
46837
+ }
46838
+ return message;
46839
+ };
46840
+
46841
+ /**
46842
+ * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited.
46843
+ * @function decodeDelimited
46844
+ * @memberof google.iam.v1.AuditLogConfig
46845
+ * @static
46846
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46847
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46848
+ * @throws {Error} If the payload is not a reader or valid buffer
46849
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46850
+ */
46851
+ AuditLogConfig.decodeDelimited = function decodeDelimited(reader) {
46852
+ if (!(reader instanceof $Reader))
46853
+ reader = new $Reader(reader);
46854
+ return this.decode(reader, reader.uint32());
46855
+ };
46856
+
46857
+ /**
46858
+ * Verifies an AuditLogConfig message.
46859
+ * @function verify
46860
+ * @memberof google.iam.v1.AuditLogConfig
46861
+ * @static
46862
+ * @param {Object.<string,*>} message Plain object to verify
46863
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46864
+ */
46865
+ AuditLogConfig.verify = function verify(message) {
46866
+ if (typeof message !== "object" || message === null)
46867
+ return "object expected";
46868
+ if (message.logType != null && message.hasOwnProperty("logType"))
46869
+ switch (message.logType) {
46870
+ default:
46871
+ return "logType: enum value expected";
46872
+ case 0:
46873
+ case 1:
46874
+ case 2:
46875
+ case 3:
46876
+ break;
46877
+ }
46878
+ if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) {
46879
+ if (!Array.isArray(message.exemptedMembers))
46880
+ return "exemptedMembers: array expected";
46881
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
46882
+ if (!$util.isString(message.exemptedMembers[i]))
46883
+ return "exemptedMembers: string[] expected";
46884
+ }
46885
+ return null;
46886
+ };
46887
+
46888
+ /**
46889
+ * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types.
46890
+ * @function fromObject
46891
+ * @memberof google.iam.v1.AuditLogConfig
46892
+ * @static
46893
+ * @param {Object.<string,*>} object Plain object
46894
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46895
+ */
46896
+ AuditLogConfig.fromObject = function fromObject(object) {
46897
+ if (object instanceof $root.google.iam.v1.AuditLogConfig)
46898
+ return object;
46899
+ var message = new $root.google.iam.v1.AuditLogConfig();
46900
+ switch (object.logType) {
46901
+ case "LOG_TYPE_UNSPECIFIED":
46902
+ case 0:
46903
+ message.logType = 0;
46904
+ break;
46905
+ case "ADMIN_READ":
46906
+ case 1:
46907
+ message.logType = 1;
46908
+ break;
46909
+ case "DATA_WRITE":
46910
+ case 2:
46911
+ message.logType = 2;
46912
+ break;
46913
+ case "DATA_READ":
46914
+ case 3:
46915
+ message.logType = 3;
46916
+ break;
46917
+ }
46918
+ if (object.exemptedMembers) {
46919
+ if (!Array.isArray(object.exemptedMembers))
46920
+ throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected");
46921
+ message.exemptedMembers = [];
46922
+ for (var i = 0; i < object.exemptedMembers.length; ++i)
46923
+ message.exemptedMembers[i] = String(object.exemptedMembers[i]);
46924
+ }
46925
+ return message;
46926
+ };
46927
+
46928
+ /**
46929
+ * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified.
46930
+ * @function toObject
46931
+ * @memberof google.iam.v1.AuditLogConfig
46932
+ * @static
46933
+ * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig
46934
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46935
+ * @returns {Object.<string,*>} Plain object
46936
+ */
46937
+ AuditLogConfig.toObject = function toObject(message, options) {
46938
+ if (!options)
46939
+ options = {};
46940
+ var object = {};
46941
+ if (options.arrays || options.defaults)
46942
+ object.exemptedMembers = [];
46943
+ if (options.defaults)
46944
+ object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0;
46945
+ if (message.logType != null && message.hasOwnProperty("logType"))
46946
+ object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType;
46947
+ if (message.exemptedMembers && message.exemptedMembers.length) {
46948
+ object.exemptedMembers = [];
46949
+ for (var j = 0; j < message.exemptedMembers.length; ++j)
46950
+ object.exemptedMembers[j] = message.exemptedMembers[j];
46951
+ }
46952
+ return object;
46953
+ };
46954
+
46955
+ /**
46956
+ * Converts this AuditLogConfig to JSON.
46957
+ * @function toJSON
46958
+ * @memberof google.iam.v1.AuditLogConfig
46959
+ * @instance
46960
+ * @returns {Object.<string,*>} JSON object
46961
+ */
46962
+ AuditLogConfig.prototype.toJSON = function toJSON() {
46963
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46964
+ };
46965
+
46966
+ /**
46967
+ * LogType enum.
46968
+ * @name google.iam.v1.AuditLogConfig.LogType
46969
+ * @enum {number}
46970
+ * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value
46971
+ * @property {number} ADMIN_READ=1 ADMIN_READ value
46972
+ * @property {number} DATA_WRITE=2 DATA_WRITE value
46973
+ * @property {number} DATA_READ=3 DATA_READ value
46974
+ */
46975
+ AuditLogConfig.LogType = (function() {
46976
+ var valuesById = {}, values = Object.create(valuesById);
46977
+ values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0;
46978
+ values[valuesById[1] = "ADMIN_READ"] = 1;
46979
+ values[valuesById[2] = "DATA_WRITE"] = 2;
46980
+ values[valuesById[3] = "DATA_READ"] = 3;
46981
+ return values;
46982
+ })();
46983
+
46984
+ return AuditLogConfig;
46985
+ })();
46986
+
45420
46987
  v1.PolicyDelta = (function() {
45421
46988
 
45422
46989
  /**