@google-cloud/spanner 5.18.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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)
@@ -44762,6 +44784,7 @@
44762
44784
  * @interface ISetIamPolicyRequest
44763
44785
  * @property {string|null} [resource] SetIamPolicyRequest resource
44764
44786
  * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy
44787
+ * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask
44765
44788
  */
44766
44789
 
44767
44790
  /**
@@ -44795,6 +44818,14 @@
44795
44818
  */
44796
44819
  SetIamPolicyRequest.prototype.policy = null;
44797
44820
 
44821
+ /**
44822
+ * SetIamPolicyRequest updateMask.
44823
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
44824
+ * @memberof google.iam.v1.SetIamPolicyRequest
44825
+ * @instance
44826
+ */
44827
+ SetIamPolicyRequest.prototype.updateMask = null;
44828
+
44798
44829
  /**
44799
44830
  * Creates a new SetIamPolicyRequest instance using the specified properties.
44800
44831
  * @function create
@@ -44823,6 +44854,8 @@
44823
44854
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
44824
44855
  if (message.policy != null && Object.hasOwnProperty.call(message, "policy"))
44825
44856
  $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
44857
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
44858
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
44826
44859
  return writer;
44827
44860
  };
44828
44861
 
@@ -44863,6 +44896,9 @@
44863
44896
  case 2:
44864
44897
  message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32());
44865
44898
  break;
44899
+ case 3:
44900
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
44901
+ break;
44866
44902
  default:
44867
44903
  reader.skipType(tag & 7);
44868
44904
  break;
@@ -44906,6 +44942,11 @@
44906
44942
  if (error)
44907
44943
  return "policy." + error;
44908
44944
  }
44945
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
44946
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
44947
+ if (error)
44948
+ return "updateMask." + error;
44949
+ }
44909
44950
  return null;
44910
44951
  };
44911
44952
 
@@ -44928,6 +44969,11 @@
44928
44969
  throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected");
44929
44970
  message.policy = $root.google.iam.v1.Policy.fromObject(object.policy);
44930
44971
  }
44972
+ if (object.updateMask != null) {
44973
+ if (typeof object.updateMask !== "object")
44974
+ throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected");
44975
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
44976
+ }
44931
44977
  return message;
44932
44978
  };
44933
44979
 
@@ -44947,11 +44993,14 @@
44947
44993
  if (options.defaults) {
44948
44994
  object.resource = "";
44949
44995
  object.policy = null;
44996
+ object.updateMask = null;
44950
44997
  }
44951
44998
  if (message.resource != null && message.hasOwnProperty("resource"))
44952
44999
  object.resource = message.resource;
44953
45000
  if (message.policy != null && message.hasOwnProperty("policy"))
44954
45001
  object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options);
45002
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
45003
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
44955
45004
  return object;
44956
45005
  };
44957
45006
 
@@ -45808,6 +45857,7 @@
45808
45857
  * @interface IPolicy
45809
45858
  * @property {number|null} [version] Policy version
45810
45859
  * @property {Array.<google.iam.v1.IBinding>|null} [bindings] Policy bindings
45860
+ * @property {Array.<google.iam.v1.IAuditConfig>|null} [auditConfigs] Policy auditConfigs
45811
45861
  * @property {Uint8Array|null} [etag] Policy etag
45812
45862
  */
45813
45863
 
@@ -45821,6 +45871,7 @@
45821
45871
  */
45822
45872
  function Policy(properties) {
45823
45873
  this.bindings = [];
45874
+ this.auditConfigs = [];
45824
45875
  if (properties)
45825
45876
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
45826
45877
  if (properties[keys[i]] != null)
@@ -45843,6 +45894,14 @@
45843
45894
  */
45844
45895
  Policy.prototype.bindings = $util.emptyArray;
45845
45896
 
45897
+ /**
45898
+ * Policy auditConfigs.
45899
+ * @member {Array.<google.iam.v1.IAuditConfig>} auditConfigs
45900
+ * @memberof google.iam.v1.Policy
45901
+ * @instance
45902
+ */
45903
+ Policy.prototype.auditConfigs = $util.emptyArray;
45904
+
45846
45905
  /**
45847
45906
  * Policy etag.
45848
45907
  * @member {Uint8Array} etag
@@ -45882,6 +45941,9 @@
45882
45941
  if (message.bindings != null && message.bindings.length)
45883
45942
  for (var i = 0; i < message.bindings.length; ++i)
45884
45943
  $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
45944
+ if (message.auditConfigs != null && message.auditConfigs.length)
45945
+ for (var i = 0; i < message.auditConfigs.length; ++i)
45946
+ $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
45885
45947
  return writer;
45886
45948
  };
45887
45949
 
@@ -45924,6 +45986,11 @@
45924
45986
  message.bindings = [];
45925
45987
  message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32()));
45926
45988
  break;
45989
+ case 6:
45990
+ if (!(message.auditConfigs && message.auditConfigs.length))
45991
+ message.auditConfigs = [];
45992
+ message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32()));
45993
+ break;
45927
45994
  case 3:
45928
45995
  message.etag = reader.bytes();
45929
45996
  break;
@@ -45974,6 +46041,15 @@
45974
46041
  return "bindings." + error;
45975
46042
  }
45976
46043
  }
46044
+ if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) {
46045
+ if (!Array.isArray(message.auditConfigs))
46046
+ return "auditConfigs: array expected";
46047
+ for (var i = 0; i < message.auditConfigs.length; ++i) {
46048
+ var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]);
46049
+ if (error)
46050
+ return "auditConfigs." + error;
46051
+ }
46052
+ }
45977
46053
  if (message.etag != null && message.hasOwnProperty("etag"))
45978
46054
  if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag)))
45979
46055
  return "etag: buffer expected";
@@ -46004,6 +46080,16 @@
46004
46080
  message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]);
46005
46081
  }
46006
46082
  }
46083
+ if (object.auditConfigs) {
46084
+ if (!Array.isArray(object.auditConfigs))
46085
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected");
46086
+ message.auditConfigs = [];
46087
+ for (var i = 0; i < object.auditConfigs.length; ++i) {
46088
+ if (typeof object.auditConfigs[i] !== "object")
46089
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected");
46090
+ message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]);
46091
+ }
46092
+ }
46007
46093
  if (object.etag != null)
46008
46094
  if (typeof object.etag === "string")
46009
46095
  $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0);
@@ -46025,8 +46111,10 @@
46025
46111
  if (!options)
46026
46112
  options = {};
46027
46113
  var object = {};
46028
- if (options.arrays || options.defaults)
46114
+ if (options.arrays || options.defaults) {
46029
46115
  object.bindings = [];
46116
+ object.auditConfigs = [];
46117
+ }
46030
46118
  if (options.defaults) {
46031
46119
  object.version = 0;
46032
46120
  if (options.bytes === String)
@@ -46046,6 +46134,11 @@
46046
46134
  for (var j = 0; j < message.bindings.length; ++j)
46047
46135
  object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options);
46048
46136
  }
46137
+ if (message.auditConfigs && message.auditConfigs.length) {
46138
+ object.auditConfigs = [];
46139
+ for (var j = 0; j < message.auditConfigs.length; ++j)
46140
+ object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options);
46141
+ }
46049
46142
  return object;
46050
46143
  };
46051
46144
 
@@ -46317,6 +46410,504 @@
46317
46410
  return Binding;
46318
46411
  })();
46319
46412
 
46413
+ v1.AuditConfig = (function() {
46414
+
46415
+ /**
46416
+ * Properties of an AuditConfig.
46417
+ * @memberof google.iam.v1
46418
+ * @interface IAuditConfig
46419
+ * @property {string|null} [service] AuditConfig service
46420
+ * @property {Array.<google.iam.v1.IAuditLogConfig>|null} [auditLogConfigs] AuditConfig auditLogConfigs
46421
+ */
46422
+
46423
+ /**
46424
+ * Constructs a new AuditConfig.
46425
+ * @memberof google.iam.v1
46426
+ * @classdesc Represents an AuditConfig.
46427
+ * @implements IAuditConfig
46428
+ * @constructor
46429
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
46430
+ */
46431
+ function AuditConfig(properties) {
46432
+ this.auditLogConfigs = [];
46433
+ if (properties)
46434
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46435
+ if (properties[keys[i]] != null)
46436
+ this[keys[i]] = properties[keys[i]];
46437
+ }
46438
+
46439
+ /**
46440
+ * AuditConfig service.
46441
+ * @member {string} service
46442
+ * @memberof google.iam.v1.AuditConfig
46443
+ * @instance
46444
+ */
46445
+ AuditConfig.prototype.service = "";
46446
+
46447
+ /**
46448
+ * AuditConfig auditLogConfigs.
46449
+ * @member {Array.<google.iam.v1.IAuditLogConfig>} auditLogConfigs
46450
+ * @memberof google.iam.v1.AuditConfig
46451
+ * @instance
46452
+ */
46453
+ AuditConfig.prototype.auditLogConfigs = $util.emptyArray;
46454
+
46455
+ /**
46456
+ * Creates a new AuditConfig instance using the specified properties.
46457
+ * @function create
46458
+ * @memberof google.iam.v1.AuditConfig
46459
+ * @static
46460
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
46461
+ * @returns {google.iam.v1.AuditConfig} AuditConfig instance
46462
+ */
46463
+ AuditConfig.create = function create(properties) {
46464
+ return new AuditConfig(properties);
46465
+ };
46466
+
46467
+ /**
46468
+ * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
46469
+ * @function encode
46470
+ * @memberof google.iam.v1.AuditConfig
46471
+ * @static
46472
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
46473
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46474
+ * @returns {$protobuf.Writer} Writer
46475
+ */
46476
+ AuditConfig.encode = function encode(message, writer) {
46477
+ if (!writer)
46478
+ writer = $Writer.create();
46479
+ if (message.service != null && Object.hasOwnProperty.call(message, "service"))
46480
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.service);
46481
+ if (message.auditLogConfigs != null && message.auditLogConfigs.length)
46482
+ for (var i = 0; i < message.auditLogConfigs.length; ++i)
46483
+ $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
46484
+ return writer;
46485
+ };
46486
+
46487
+ /**
46488
+ * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
46489
+ * @function encodeDelimited
46490
+ * @memberof google.iam.v1.AuditConfig
46491
+ * @static
46492
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
46493
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46494
+ * @returns {$protobuf.Writer} Writer
46495
+ */
46496
+ AuditConfig.encodeDelimited = function encodeDelimited(message, writer) {
46497
+ return this.encode(message, writer).ldelim();
46498
+ };
46499
+
46500
+ /**
46501
+ * Decodes an AuditConfig message from the specified reader or buffer.
46502
+ * @function decode
46503
+ * @memberof google.iam.v1.AuditConfig
46504
+ * @static
46505
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46506
+ * @param {number} [length] Message length if known beforehand
46507
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46508
+ * @throws {Error} If the payload is not a reader or valid buffer
46509
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46510
+ */
46511
+ AuditConfig.decode = function decode(reader, length) {
46512
+ if (!(reader instanceof $Reader))
46513
+ reader = $Reader.create(reader);
46514
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig();
46515
+ while (reader.pos < end) {
46516
+ var tag = reader.uint32();
46517
+ switch (tag >>> 3) {
46518
+ case 1:
46519
+ message.service = reader.string();
46520
+ break;
46521
+ case 3:
46522
+ if (!(message.auditLogConfigs && message.auditLogConfigs.length))
46523
+ message.auditLogConfigs = [];
46524
+ message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32()));
46525
+ break;
46526
+ default:
46527
+ reader.skipType(tag & 7);
46528
+ break;
46529
+ }
46530
+ }
46531
+ return message;
46532
+ };
46533
+
46534
+ /**
46535
+ * Decodes an AuditConfig message from the specified reader or buffer, length delimited.
46536
+ * @function decodeDelimited
46537
+ * @memberof google.iam.v1.AuditConfig
46538
+ * @static
46539
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46540
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46541
+ * @throws {Error} If the payload is not a reader or valid buffer
46542
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46543
+ */
46544
+ AuditConfig.decodeDelimited = function decodeDelimited(reader) {
46545
+ if (!(reader instanceof $Reader))
46546
+ reader = new $Reader(reader);
46547
+ return this.decode(reader, reader.uint32());
46548
+ };
46549
+
46550
+ /**
46551
+ * Verifies an AuditConfig message.
46552
+ * @function verify
46553
+ * @memberof google.iam.v1.AuditConfig
46554
+ * @static
46555
+ * @param {Object.<string,*>} message Plain object to verify
46556
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46557
+ */
46558
+ AuditConfig.verify = function verify(message) {
46559
+ if (typeof message !== "object" || message === null)
46560
+ return "object expected";
46561
+ if (message.service != null && message.hasOwnProperty("service"))
46562
+ if (!$util.isString(message.service))
46563
+ return "service: string expected";
46564
+ if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) {
46565
+ if (!Array.isArray(message.auditLogConfigs))
46566
+ return "auditLogConfigs: array expected";
46567
+ for (var i = 0; i < message.auditLogConfigs.length; ++i) {
46568
+ var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]);
46569
+ if (error)
46570
+ return "auditLogConfigs." + error;
46571
+ }
46572
+ }
46573
+ return null;
46574
+ };
46575
+
46576
+ /**
46577
+ * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types.
46578
+ * @function fromObject
46579
+ * @memberof google.iam.v1.AuditConfig
46580
+ * @static
46581
+ * @param {Object.<string,*>} object Plain object
46582
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
46583
+ */
46584
+ AuditConfig.fromObject = function fromObject(object) {
46585
+ if (object instanceof $root.google.iam.v1.AuditConfig)
46586
+ return object;
46587
+ var message = new $root.google.iam.v1.AuditConfig();
46588
+ if (object.service != null)
46589
+ message.service = String(object.service);
46590
+ if (object.auditLogConfigs) {
46591
+ if (!Array.isArray(object.auditLogConfigs))
46592
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected");
46593
+ message.auditLogConfigs = [];
46594
+ for (var i = 0; i < object.auditLogConfigs.length; ++i) {
46595
+ if (typeof object.auditLogConfigs[i] !== "object")
46596
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected");
46597
+ message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]);
46598
+ }
46599
+ }
46600
+ return message;
46601
+ };
46602
+
46603
+ /**
46604
+ * Creates a plain object from an AuditConfig message. Also converts values to other types if specified.
46605
+ * @function toObject
46606
+ * @memberof google.iam.v1.AuditConfig
46607
+ * @static
46608
+ * @param {google.iam.v1.AuditConfig} message AuditConfig
46609
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46610
+ * @returns {Object.<string,*>} Plain object
46611
+ */
46612
+ AuditConfig.toObject = function toObject(message, options) {
46613
+ if (!options)
46614
+ options = {};
46615
+ var object = {};
46616
+ if (options.arrays || options.defaults)
46617
+ object.auditLogConfigs = [];
46618
+ if (options.defaults)
46619
+ object.service = "";
46620
+ if (message.service != null && message.hasOwnProperty("service"))
46621
+ object.service = message.service;
46622
+ if (message.auditLogConfigs && message.auditLogConfigs.length) {
46623
+ object.auditLogConfigs = [];
46624
+ for (var j = 0; j < message.auditLogConfigs.length; ++j)
46625
+ object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options);
46626
+ }
46627
+ return object;
46628
+ };
46629
+
46630
+ /**
46631
+ * Converts this AuditConfig to JSON.
46632
+ * @function toJSON
46633
+ * @memberof google.iam.v1.AuditConfig
46634
+ * @instance
46635
+ * @returns {Object.<string,*>} JSON object
46636
+ */
46637
+ AuditConfig.prototype.toJSON = function toJSON() {
46638
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46639
+ };
46640
+
46641
+ return AuditConfig;
46642
+ })();
46643
+
46644
+ v1.AuditLogConfig = (function() {
46645
+
46646
+ /**
46647
+ * Properties of an AuditLogConfig.
46648
+ * @memberof google.iam.v1
46649
+ * @interface IAuditLogConfig
46650
+ * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType
46651
+ * @property {Array.<string>|null} [exemptedMembers] AuditLogConfig exemptedMembers
46652
+ */
46653
+
46654
+ /**
46655
+ * Constructs a new AuditLogConfig.
46656
+ * @memberof google.iam.v1
46657
+ * @classdesc Represents an AuditLogConfig.
46658
+ * @implements IAuditLogConfig
46659
+ * @constructor
46660
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
46661
+ */
46662
+ function AuditLogConfig(properties) {
46663
+ this.exemptedMembers = [];
46664
+ if (properties)
46665
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46666
+ if (properties[keys[i]] != null)
46667
+ this[keys[i]] = properties[keys[i]];
46668
+ }
46669
+
46670
+ /**
46671
+ * AuditLogConfig logType.
46672
+ * @member {google.iam.v1.AuditLogConfig.LogType} logType
46673
+ * @memberof google.iam.v1.AuditLogConfig
46674
+ * @instance
46675
+ */
46676
+ AuditLogConfig.prototype.logType = 0;
46677
+
46678
+ /**
46679
+ * AuditLogConfig exemptedMembers.
46680
+ * @member {Array.<string>} exemptedMembers
46681
+ * @memberof google.iam.v1.AuditLogConfig
46682
+ * @instance
46683
+ */
46684
+ AuditLogConfig.prototype.exemptedMembers = $util.emptyArray;
46685
+
46686
+ /**
46687
+ * Creates a new AuditLogConfig instance using the specified properties.
46688
+ * @function create
46689
+ * @memberof google.iam.v1.AuditLogConfig
46690
+ * @static
46691
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
46692
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance
46693
+ */
46694
+ AuditLogConfig.create = function create(properties) {
46695
+ return new AuditLogConfig(properties);
46696
+ };
46697
+
46698
+ /**
46699
+ * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
46700
+ * @function encode
46701
+ * @memberof google.iam.v1.AuditLogConfig
46702
+ * @static
46703
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
46704
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46705
+ * @returns {$protobuf.Writer} Writer
46706
+ */
46707
+ AuditLogConfig.encode = function encode(message, writer) {
46708
+ if (!writer)
46709
+ writer = $Writer.create();
46710
+ if (message.logType != null && Object.hasOwnProperty.call(message, "logType"))
46711
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType);
46712
+ if (message.exemptedMembers != null && message.exemptedMembers.length)
46713
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
46714
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]);
46715
+ return writer;
46716
+ };
46717
+
46718
+ /**
46719
+ * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
46720
+ * @function encodeDelimited
46721
+ * @memberof google.iam.v1.AuditLogConfig
46722
+ * @static
46723
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
46724
+ * @param {$protobuf.Writer} [writer] Writer to encode to
46725
+ * @returns {$protobuf.Writer} Writer
46726
+ */
46727
+ AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) {
46728
+ return this.encode(message, writer).ldelim();
46729
+ };
46730
+
46731
+ /**
46732
+ * Decodes an AuditLogConfig message from the specified reader or buffer.
46733
+ * @function decode
46734
+ * @memberof google.iam.v1.AuditLogConfig
46735
+ * @static
46736
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46737
+ * @param {number} [length] Message length if known beforehand
46738
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46739
+ * @throws {Error} If the payload is not a reader or valid buffer
46740
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46741
+ */
46742
+ AuditLogConfig.decode = function decode(reader, length) {
46743
+ if (!(reader instanceof $Reader))
46744
+ reader = $Reader.create(reader);
46745
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig();
46746
+ while (reader.pos < end) {
46747
+ var tag = reader.uint32();
46748
+ switch (tag >>> 3) {
46749
+ case 1:
46750
+ message.logType = reader.int32();
46751
+ break;
46752
+ case 2:
46753
+ if (!(message.exemptedMembers && message.exemptedMembers.length))
46754
+ message.exemptedMembers = [];
46755
+ message.exemptedMembers.push(reader.string());
46756
+ break;
46757
+ default:
46758
+ reader.skipType(tag & 7);
46759
+ break;
46760
+ }
46761
+ }
46762
+ return message;
46763
+ };
46764
+
46765
+ /**
46766
+ * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited.
46767
+ * @function decodeDelimited
46768
+ * @memberof google.iam.v1.AuditLogConfig
46769
+ * @static
46770
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
46771
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46772
+ * @throws {Error} If the payload is not a reader or valid buffer
46773
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
46774
+ */
46775
+ AuditLogConfig.decodeDelimited = function decodeDelimited(reader) {
46776
+ if (!(reader instanceof $Reader))
46777
+ reader = new $Reader(reader);
46778
+ return this.decode(reader, reader.uint32());
46779
+ };
46780
+
46781
+ /**
46782
+ * Verifies an AuditLogConfig message.
46783
+ * @function verify
46784
+ * @memberof google.iam.v1.AuditLogConfig
46785
+ * @static
46786
+ * @param {Object.<string,*>} message Plain object to verify
46787
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
46788
+ */
46789
+ AuditLogConfig.verify = function verify(message) {
46790
+ if (typeof message !== "object" || message === null)
46791
+ return "object expected";
46792
+ if (message.logType != null && message.hasOwnProperty("logType"))
46793
+ switch (message.logType) {
46794
+ default:
46795
+ return "logType: enum value expected";
46796
+ case 0:
46797
+ case 1:
46798
+ case 2:
46799
+ case 3:
46800
+ break;
46801
+ }
46802
+ if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) {
46803
+ if (!Array.isArray(message.exemptedMembers))
46804
+ return "exemptedMembers: array expected";
46805
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
46806
+ if (!$util.isString(message.exemptedMembers[i]))
46807
+ return "exemptedMembers: string[] expected";
46808
+ }
46809
+ return null;
46810
+ };
46811
+
46812
+ /**
46813
+ * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types.
46814
+ * @function fromObject
46815
+ * @memberof google.iam.v1.AuditLogConfig
46816
+ * @static
46817
+ * @param {Object.<string,*>} object Plain object
46818
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
46819
+ */
46820
+ AuditLogConfig.fromObject = function fromObject(object) {
46821
+ if (object instanceof $root.google.iam.v1.AuditLogConfig)
46822
+ return object;
46823
+ var message = new $root.google.iam.v1.AuditLogConfig();
46824
+ switch (object.logType) {
46825
+ case "LOG_TYPE_UNSPECIFIED":
46826
+ case 0:
46827
+ message.logType = 0;
46828
+ break;
46829
+ case "ADMIN_READ":
46830
+ case 1:
46831
+ message.logType = 1;
46832
+ break;
46833
+ case "DATA_WRITE":
46834
+ case 2:
46835
+ message.logType = 2;
46836
+ break;
46837
+ case "DATA_READ":
46838
+ case 3:
46839
+ message.logType = 3;
46840
+ break;
46841
+ }
46842
+ if (object.exemptedMembers) {
46843
+ if (!Array.isArray(object.exemptedMembers))
46844
+ throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected");
46845
+ message.exemptedMembers = [];
46846
+ for (var i = 0; i < object.exemptedMembers.length; ++i)
46847
+ message.exemptedMembers[i] = String(object.exemptedMembers[i]);
46848
+ }
46849
+ return message;
46850
+ };
46851
+
46852
+ /**
46853
+ * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified.
46854
+ * @function toObject
46855
+ * @memberof google.iam.v1.AuditLogConfig
46856
+ * @static
46857
+ * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig
46858
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
46859
+ * @returns {Object.<string,*>} Plain object
46860
+ */
46861
+ AuditLogConfig.toObject = function toObject(message, options) {
46862
+ if (!options)
46863
+ options = {};
46864
+ var object = {};
46865
+ if (options.arrays || options.defaults)
46866
+ object.exemptedMembers = [];
46867
+ if (options.defaults)
46868
+ object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0;
46869
+ if (message.logType != null && message.hasOwnProperty("logType"))
46870
+ object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType;
46871
+ if (message.exemptedMembers && message.exemptedMembers.length) {
46872
+ object.exemptedMembers = [];
46873
+ for (var j = 0; j < message.exemptedMembers.length; ++j)
46874
+ object.exemptedMembers[j] = message.exemptedMembers[j];
46875
+ }
46876
+ return object;
46877
+ };
46878
+
46879
+ /**
46880
+ * Converts this AuditLogConfig to JSON.
46881
+ * @function toJSON
46882
+ * @memberof google.iam.v1.AuditLogConfig
46883
+ * @instance
46884
+ * @returns {Object.<string,*>} JSON object
46885
+ */
46886
+ AuditLogConfig.prototype.toJSON = function toJSON() {
46887
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
46888
+ };
46889
+
46890
+ /**
46891
+ * LogType enum.
46892
+ * @name google.iam.v1.AuditLogConfig.LogType
46893
+ * @enum {number}
46894
+ * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value
46895
+ * @property {number} ADMIN_READ=1 ADMIN_READ value
46896
+ * @property {number} DATA_WRITE=2 DATA_WRITE value
46897
+ * @property {number} DATA_READ=3 DATA_READ value
46898
+ */
46899
+ AuditLogConfig.LogType = (function() {
46900
+ var valuesById = {}, values = Object.create(valuesById);
46901
+ values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0;
46902
+ values[valuesById[1] = "ADMIN_READ"] = 1;
46903
+ values[valuesById[2] = "DATA_WRITE"] = 2;
46904
+ values[valuesById[3] = "DATA_READ"] = 3;
46905
+ return values;
46906
+ })();
46907
+
46908
+ return AuditLogConfig;
46909
+ })();
46910
+
46320
46911
  v1.PolicyDelta = (function() {
46321
46912
 
46322
46913
  /**